Documentation ¶
Index ¶
- type CID
- type Client
- type Container
- type OwnerID
- type Table
- type Wrapper
- func (w *Wrapper) Delete(cid CID) error
- func (w *Wrapper) Get(cid CID) (*Container, error)
- func (w *Wrapper) GetEACL(cid CID) (Table, error)
- func (w *Wrapper) List(ownerID *OwnerID) ([]CID, error)
- func (w *Wrapper) Put(cnr *Container) (*CID, error)
- func (w *Wrapper) PutEACL(cid CID, table Table, sig []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CID ¶
CID represents the container identifier.
CID is a type alias of github.com/nspcc-dev/neofs-node/pkg/core/container/storage.CID.
type Client ¶
Client represents the Container contract client.
It is a type alias of github.com/nspcc-dev/neofs-node/pkg/morph/client/container.Client.
type Container ¶
Container represents the NeoFS Container structure.
It is a type alias of github.com/nspcc-dev/neofs-node/pkg/core/container/storage.Container.
type OwnerID ¶
OwnerID represents the container owner identifier.
It is a type alias of github.com/nspcc-dev/neofs-node/pkg/core/container/storage.OwnerID.
type Table ¶
Table represents extended ACL rule table.
It is a type alias of github.com/nspcc-dev/neofs-node/pkg/core/container/acl/extended/storage.Table.
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
Wrapper is a wrapper over container contract client which implements container storage and eACL storage methods.
Working wrapper must be created via constructor New. Using the Wrapper that has been created with new(Wrapper) expression (or just declaring a Wrapper variable) is unsafe and can lead to panic.
func New ¶
New creates, initializes and returns the Wrapper instance.
If Client is nil, container.ErrNilClient is returned.
func (*Wrapper) Delete ¶
Delete removes the container from NeoFS system through Container contract call.
Returns any error encountered that caused the removal to interrupt.
func (*Wrapper) Get ¶
Get reads the container from NeoFS system by identifier through Container contract call.
If an empty slice is returned for the requested identifier, storage.ErrNotFound error is returned.
func (*Wrapper) GetEACL ¶
GetEACL reads the extended ACL table from NeoFS system through Container contract call.
func (*Wrapper) List ¶
List returns a list of container identifiers belonging to the specified owner of NeoFS system. The list is composed through Container contract call.
Returns the identifiers of all NeoFS containers if pointer to owner identifier is nil.