[#306] control: Rename WithAllowedKeys function to WithAuthorizedKeys

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
remotes/KirillovDenis/release/v0.21.1
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...)
}