forked from TrueCloudLab/frostfs-node
[#7] Fix container service according to APIv2 contracts
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
2ab855b2ec
commit
da92f2944f
4 changed files with 11 additions and 38 deletions
|
@ -7,17 +7,17 @@ import (
|
|||
// PutArgs groups the arguments
|
||||
// of put container invocation call.
|
||||
type PutArgs struct {
|
||||
ownerID []byte // container owner identifier
|
||||
|
||||
cnr []byte // container in a binary format
|
||||
|
||||
sig []byte // binary container signature
|
||||
|
||||
publicKey []byte // public key of container owner
|
||||
}
|
||||
|
||||
// SetOwnerID sets the container owner identifier
|
||||
// SetPublicKey sets the public key of container owner
|
||||
// in a binary format.
|
||||
func (p *PutArgs) SetOwnerID(v []byte) {
|
||||
p.ownerID = v
|
||||
func (p *PutArgs) SetPublicKey(v []byte) {
|
||||
p.publicKey = v
|
||||
}
|
||||
|
||||
// SetContainer sets the container structure
|
||||
|
@ -37,8 +37,8 @@ func (p *PutArgs) SetSignature(v []byte) {
|
|||
func (c *Client) Put(args PutArgs) error {
|
||||
return errors.Wrapf(c.client.Invoke(
|
||||
c.putMethod,
|
||||
args.ownerID,
|
||||
args.cnr,
|
||||
args.sig,
|
||||
args.publicKey,
|
||||
), "could not invoke method (%s)", c.putMethod)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue