frostfs-sdk-go/bearer/test/generate.go
Alex Vanin 27cd721422 [#170] bearer: Add docs, refactor
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-04-13 11:24:15 +03:00

20 lines
431 B
Go

package bearertest
import (
"github.com/nspcc-dev/neofs-sdk-go/bearer"
eacltest "github.com/nspcc-dev/neofs-sdk-go/eacl/test"
ownertest "github.com/nspcc-dev/neofs-sdk-go/owner/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(*ownertest.ID())
t.SetEACLTable(*eacltest.Table())
return t
}