forked from TrueCloudLab/frostfs-sdk-go
[#251] object/address: Refactor and document package functionality
Merge `address` package into `oid` one. Bring `session.Object` implementation into conformity with the NeoFS API protocol. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
bef4618cd6
commit
f0a5eb6dbc
15 changed files with 429 additions and 468 deletions
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test"
|
||||
neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa"
|
||||
addresstest "github.com/nspcc-dev/neofs-sdk-go/object/address/test"
|
||||
oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/session"
|
||||
)
|
||||
|
||||
|
@ -71,8 +71,11 @@ func Object() *session.Object {
|
|||
panic(err)
|
||||
}
|
||||
|
||||
addr := oidtest.Address()
|
||||
|
||||
tok.ForVerb(session.VerbObjectPut)
|
||||
tok.ApplyTo(*addresstest.Address())
|
||||
tok.BindContainer(addr.Container())
|
||||
tok.LimitByObject(addr.Object())
|
||||
tok.SetID(uuid.New())
|
||||
tok.SetAuthKey((*neofsecdsa.PublicKey)(&priv.PublicKey))
|
||||
tok.SetExp(11)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue