| OLD | NEW |
| 1 // Copyright 2016 The LUCI Authors. All rights reserved. | 1 // Copyright 2016 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // Package adminsrv implements Admin API. | 5 // Package adminsrv implements Admin API. |
| 6 // | 6 // |
| 7 // Code defined here is either invoked by an administrator or by the service | 7 // Code defined here is either invoked by an administrator or by the service |
| 8 // itself (via cron jobs or task queues). | 8 // itself (via cron jobs or task queues). |
| 9 package adminsrv | 9 package adminsrv |
| 10 | 10 |
| 11 import ( | 11 import ( |
| 12 "github.com/luci/luci-go/appengine/gaeauth/server/gaesigner" | 12 "github.com/luci/luci-go/appengine/gaeauth/server/gaesigner" |
| 13 | 13 |
| 14 "github.com/luci/luci-go/tokenserver/appengine/certconfig" | 14 "github.com/luci/luci-go/tokenserver/appengine/certconfig" |
| 15 "github.com/luci/luci-go/tokenserver/appengine/delegation" |
| 15 "github.com/luci/luci-go/tokenserver/appengine/machinetoken" | 16 "github.com/luci/luci-go/tokenserver/appengine/machinetoken" |
| 16 | 17 |
| 17 "github.com/luci/luci-go/tokenserver/api/admin/v1" | 18 "github.com/luci/luci-go/tokenserver/api/admin/v1" |
| 18 ) | 19 ) |
| 19 | 20 |
| 20 // serverImpl implements admin.AdminServer RPC interface. | 21 // serverImpl implements admin.AdminServer RPC interface. |
| 21 type serverImpl struct { | 22 type serverImpl struct { |
| 22 certconfig.ImportCAConfigsRPC | 23 certconfig.ImportCAConfigsRPC |
| 24 delegation.ImportDelegationConfigsRPC |
| 23 machinetoken.InspectMachineTokenRPC | 25 machinetoken.InspectMachineTokenRPC |
| 24 } | 26 } |
| 25 | 27 |
| 26 // NewServer returns prod AdminServer implementation. | 28 // NewServer returns prod AdminServer implementation. |
| 27 // | 29 // |
| 28 // It assumes authorization has happened already. | 30 // It assumes authorization has happened already. |
| 29 func NewServer() admin.AdminServer { | 31 func NewServer() admin.AdminServer { |
| 30 return &serverImpl{ | 32 return &serverImpl{ |
| 31 InspectMachineTokenRPC: machinetoken.InspectMachineTokenRPC{ | 33 InspectMachineTokenRPC: machinetoken.InspectMachineTokenRPC{ |
| 32 Signer: gaesigner.Signer{}, | 34 Signer: gaesigner.Signer{}, |
| 33 }, | 35 }, |
| 34 } | 36 } |
| 35 } | 37 } |
| OLD | NEW |