forked from TrueCloudLab/frostfs-node
Add Inner Ring code
This commit is contained in:
parent
dadfd90dcd
commit
b7b5079934
400 changed files with 11420 additions and 8690 deletions
42
pkg/morph/client/container/eacl_set.go
Normal file
42
pkg/morph/client/container/eacl_set.go
Normal file
|
@ -0,0 +1,42 @@
|
|||
package container
|
||||
|
||||
import "github.com/pkg/errors"
|
||||
|
||||
// SetEACLArgs groups the arguments
|
||||
// of set eACL invocation call.
|
||||
type SetEACLArgs struct {
|
||||
cid []byte // container identifier in a binary format
|
||||
|
||||
eacl []byte // extended ACL table
|
||||
|
||||
sig []byte // eACL table signature
|
||||
}
|
||||
|
||||
// SetCID sets the container identifier
|
||||
// in a binary format.
|
||||
func (p *SetEACLArgs) SetCID(v []byte) {
|
||||
p.cid = v
|
||||
}
|
||||
|
||||
// SetEACL sets the extended ACL table
|
||||
// in a binary format.
|
||||
func (p *SetEACLArgs) SetEACL(v []byte) {
|
||||
p.eacl = v
|
||||
}
|
||||
|
||||
// SetSignature sets the eACL table structure
|
||||
// owner's signature.
|
||||
func (p *SetEACLArgs) SetSignature(v []byte) {
|
||||
p.sig = v
|
||||
}
|
||||
|
||||
// SetEACL invokes the call of set eACL method
|
||||
// of NeoFS Container contract.
|
||||
func (c *Client) SetEACL(args SetEACLArgs) error {
|
||||
return errors.Wrapf(c.client.Invoke(
|
||||
c.setEACLMethod,
|
||||
args.cid,
|
||||
args.eacl,
|
||||
args.sig,
|
||||
), "could not invoke method (%s)", c.setEACLMethod)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue