[#306] control: Rename WithAllowedKeys function to WithAuthorizedKeys

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-01-14 10:47:18 +03:00 committed by Alex Vanin
parent abd9952e46
commit 0a0ee89665
2 changed files with 3 additions and 3 deletions

View file

@ -40,7 +40,7 @@ func initControlService(c *cfg) {
ctlSvc := controlSvc.New(
controlSvc.WithKey(c.key),
controlSvc.WithAllowedKeys(keys),
controlSvc.WithAuthorizedKeys(keys),
controlSvc.WithHealthChecker(c),
)

View file

@ -58,9 +58,9 @@ func WithKey(key *ecdsa.PrivateKey) Option {
}
}
// WithAllowedKeys returns option to add list of public
// WithAuthorizedKeys returns option to add list of public
// keys that have rights to use Control service.
func WithAllowedKeys(keys [][]byte) Option {
func WithAuthorizedKeys(keys [][]byte) Option {
return func(c *cfg) {
c.allowedKeys = append(c.allowedKeys, keys...)
}