From 3870f59484c4d74a78bad0b88029676d0988916c Mon Sep 17 00:00:00 2001 From: Pavel Korotkov Date: Tue, 21 Jul 2020 12:44:25 +0300 Subject: [PATCH] Rename GetNeoFSKey(Public/Private)Key to GetNeoFS(Public/Private)Key --- auth/center.go | 4 ++-- cmd/gate/app.go | 2 +- neofs/layer/gateway-neofs.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/auth/center.go b/auth/center.go index 1a163a09..df7f2fb0 100644 --- a/auth/center.go +++ b/auth/center.go @@ -73,11 +73,11 @@ func (center *Center) SetNeoFSKeys(key *ecdsa.PrivateKey) error { return nil } -func (center *Center) GetNeoFSKeyPrivateKey() *ecdsa.PrivateKey { +func (center *Center) GetNeoFSPrivateKey() *ecdsa.PrivateKey { return center.neofsKeys.PrivateKey } -func (center *Center) GetNeoFSKeyPublicKey() *ecdsa.PublicKey { +func (center *Center) GetNeoFSPublicKey() *ecdsa.PublicKey { return center.neofsKeys.PublicKey } diff --git a/cmd/gate/app.go b/cmd/gate/app.go index f3bf6222..08bff022 100644 --- a/cmd/gate/app.go +++ b/cmd/gate/app.go @@ -83,7 +83,7 @@ func newApp(l *zap.Logger, v *viper.Viper) *App { Peers: fetchPeers(l, v), Logger: l, - PrivateKey: center.GetNeoFSKeyPrivateKey(), + PrivateKey: center.GetNeoFSPrivateKey(), GRPCLogger: gRPCLogger(l), GRPCVerbose: v.GetBool(cfgGRPCVerbose), diff --git a/neofs/layer/gateway-neofs.go b/neofs/layer/gateway-neofs.go index 71824ddf..6bf45a8c 100644 --- a/neofs/layer/gateway-neofs.go +++ b/neofs/layer/gateway-neofs.go @@ -48,7 +48,7 @@ func NewLayer(log *zap.Logger, cli pool.Client, center *s3auth.Center) (minio.Ob defer cancel() token, err := generateToken(ctx, tokenParams{ cli: cli, - key: center.GetNeoFSKeyPrivateKey(), + key: center.GetNeoFSPrivateKey(), until: math.MaxInt64, }) if err != nil { @@ -56,7 +56,7 @@ func NewLayer(log *zap.Logger, cli pool.Client, center *s3auth.Center) (minio.Ob } return &neofsObject{ cli: cli, - key: center.GetNeoFSKeyPrivateKey(), + key: center.GetNeoFSPrivateKey(), log: log, owner: center.GetOwnerID(), token: token,