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/delete.go
Normal file
42
pkg/morph/client/container/delete.go
Normal file
|
@ -0,0 +1,42 @@
|
|||
package container
|
||||
|
||||
import "github.com/pkg/errors"
|
||||
|
||||
// DeleteArgs groups the arguments
|
||||
// of delete container invocation call.
|
||||
type DeleteArgs struct {
|
||||
cid []byte // container identifier
|
||||
|
||||
ownerID []byte // container owner identifier
|
||||
|
||||
sig []byte // container identifier signature
|
||||
}
|
||||
|
||||
// SetOwnerID sets the container owner identifier
|
||||
// in a binary format.
|
||||
func (p *DeleteArgs) SetOwnerID(v []byte) {
|
||||
p.ownerID = v
|
||||
}
|
||||
|
||||
// SetCID sets the container identifier
|
||||
// in a binary format.
|
||||
func (p *DeleteArgs) SetCID(v []byte) {
|
||||
p.cid = v
|
||||
}
|
||||
|
||||
// SetSignature sets the container identifier
|
||||
// owner's signature.
|
||||
func (p *DeleteArgs) SetSignature(v []byte) {
|
||||
p.sig = v
|
||||
}
|
||||
|
||||
// Delete invokes the call of delete container
|
||||
// method of NeoFS Container contract.
|
||||
func (c *Client) Delete(args DeleteArgs) error {
|
||||
return errors.Wrapf(c.client.Invoke(
|
||||
c.deleteMethod,
|
||||
args.cid,
|
||||
args.ownerID,
|
||||
args.sig,
|
||||
), "could not invoke method (%s)", c.deleteMethod)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue