Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: tokenserver/appengine/impl/services/admin/adminsrv/service.go

Issue 2993023002: tokenserver: Boilerplate for loading and serving service_accounts.cfg. (Closed)
Patch Set: fix comments Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The LUCI Authors. 1 // Copyright 2016 The LUCI Authors.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 15 matching lines...) Expand all
26 "github.com/luci/luci-go/tokenserver/appengine/impl/machinetoken" 26 "github.com/luci/luci-go/tokenserver/appengine/impl/machinetoken"
27 "github.com/luci/luci-go/tokenserver/appengine/impl/serviceaccounts" 27 "github.com/luci/luci-go/tokenserver/appengine/impl/serviceaccounts"
28 28
29 "github.com/luci/luci-go/tokenserver/api/admin/v1" 29 "github.com/luci/luci-go/tokenserver/api/admin/v1"
30 ) 30 )
31 31
32 // serverImpl implements admin.AdminServer RPC interface. 32 // serverImpl implements admin.AdminServer RPC interface.
33 type serverImpl struct { 33 type serverImpl struct {
34 certconfig.ImportCAConfigsRPC 34 certconfig.ImportCAConfigsRPC
35 delegation.ImportDelegationConfigsRPC 35 delegation.ImportDelegationConfigsRPC
36 delegation.InspectDelegationTokenRPC
Vadim Sh. 2017/08/04 02:25:13 just sorted
37 machinetoken.InspectMachineTokenRPC
36 serviceaccounts.ImportServiceAccountsConfigsRPC 38 serviceaccounts.ImportServiceAccountsConfigsRPC
37 machinetoken.InspectMachineTokenRPC
38 delegation.InspectDelegationTokenRPC
39 serviceaccounts.InspectOAuthTokenGrantRPC 39 serviceaccounts.InspectOAuthTokenGrantRPC
40 } 40 }
41 41
42 // NewServer returns prod AdminServer implementation. 42 // NewServer returns prod AdminServer implementation.
43 // 43 //
44 // It assumes authorization has happened already. 44 // It assumes authorization has happened already.
45 func NewServer() admin.AdminServer { 45 func NewServer() admin.AdminServer {
46 signer := gaesigner.Signer{} 46 signer := gaesigner.Signer{}
47 return &serverImpl{ 47 return &serverImpl{
48 ImportDelegationConfigsRPC: delegation.ImportDelegationConfigsRP C{ 48 ImportDelegationConfigsRPC: delegation.ImportDelegationConfigsRP C{
49 RulesCache: delegation.GlobalRulesCache, 49 RulesCache: delegation.GlobalRulesCache,
50 }, 50 },
51 InspectDelegationTokenRPC: delegation.InspectDelegationTokenRPC{
52 Signer: signer,
53 },
51 InspectMachineTokenRPC: machinetoken.InspectMachineTokenRPC{ 54 InspectMachineTokenRPC: machinetoken.InspectMachineTokenRPC{
52 Signer: signer, 55 Signer: signer,
53 }, 56 },
54 » » InspectDelegationTokenRPC: delegation.InspectDelegationTokenRPC{ 57 » » ImportServiceAccountsConfigsRPC: serviceaccounts.ImportServiceAc countsConfigsRPC{
55 » » » Signer: signer, 58 » » » RulesCache: serviceaccounts.GlobalRulesCache,
56 }, 59 },
57 } 60 }
58 } 61 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698