forked from TrueCloudLab/frostfs-api-go
37b415347d
There is a need to add session token to `eacl.Table` structure. To do this, we need to replace `token.SessionToken` type to another package since `eacl` package imports `token` one (potential cross-import). Create `pkg/session` package and replace session token implementation to it. Related API in `container` package is deprecated from now. Additionally implement test generator of random session tokens. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
22 lines
562 B
Go
22 lines
562 B
Go
package token
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neofs-api-go/pkg/session"
|
|
)
|
|
|
|
// SessionToken represents NeoFS API v2-compatible
|
|
// session token.
|
|
//
|
|
// Deprecated: use session.Token instead
|
|
type SessionToken = session.Token
|
|
|
|
// NewSessionTokenFromV2 wraps session.SessionToken message structure
|
|
// into Token.
|
|
//
|
|
// Deprecated: use session.NewTokenFromV2 instead.
|
|
var NewSessionTokenFromV2 = session.NewTokenFromV2
|
|
|
|
// NewSessionToken creates and returns blank session token.
|
|
//
|
|
// Deprecated: use session.NewToken instead.
|
|
var NewSessionToken = session.NewToken
|