forked from TrueCloudLab/frostfs-api-go
[#295] pkg: Remove usage of deprecated elements
Remove usage of deprecated of `container.ID` and `token.SessionToken` code elements. Replace using of custom message generators with the ones provided by packages. Replace string comparison with `Equal` method call. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
89be8d3f5a
commit
65080c8b69
22 changed files with 97 additions and 209 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg"
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg/session"
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg/token"
|
||||
"github.com/nspcc-dev/neofs-api-go/rpc/client"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/refs"
|
||||
|
@ -24,7 +25,7 @@ type (
|
|||
ttl uint32
|
||||
epoch uint64
|
||||
key *ecdsa.PrivateKey
|
||||
session *token.SessionToken
|
||||
session *session.Token
|
||||
bearer *token.BearerToken
|
||||
}
|
||||
|
||||
|
@ -75,7 +76,7 @@ func WithEpoch(epoch uint64) CallOption {
|
|||
}
|
||||
}
|
||||
|
||||
func WithSession(token *token.SessionToken) CallOption {
|
||||
func WithSession(token *session.Token) CallOption {
|
||||
return func(opts *callOptions) {
|
||||
opts.session = token
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue