frostfs-api-go/pkg/token/session.go
Leonard Lyubich 37b415347d [#283] pkg/token: Replace SessionToken into a session package
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>
2021-05-26 12:24:58 +03:00

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