frostfs-sdk-go/bearer/test/generate.go
Leonard Lyubich 1ed426b8a6 [#199] owner: Rename to user, refactor and doc
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-04-19 18:44:02 +03:00

20 lines
428 B
Go

package bearertest
import (
"github.com/nspcc-dev/neofs-sdk-go/bearer"
eacltest "github.com/nspcc-dev/neofs-sdk-go/eacl/test"
usertest "github.com/nspcc-dev/neofs-sdk-go/user/test"
)
// Token returns random bearer.Token.
//
// Resulting token is unsigned.
func Token() (t bearer.Token) {
t.SetExpiration(3)
t.SetNotBefore(2)
t.SetIssuedAt(1)
t.SetOwnerID(*usertest.ID())
t.SetEACLTable(*eacltest.Table())
return t
}