Documentation
¶
Index ¶
- func AsContainerSource(w *Client) containercore.Source
- func Delete(c *Client, witness core.RemovalWitness) error
- func DeletionInfo(c deletionInfo, cnr cid.ID) (*containercore.DelInfo, error)
- func Get(c getContainer, cnr cid.ID) (*containercore.Container, error)
- func Put(c *Client, cnr containercore.Container) (*cid.ID, error)
- type Client
- func (c *Client) ContainersOf(idUser *user.ID) ([]cid.ID, error)
- func (c Client) ContractAddress() util.Uint160
- func (c *Client) Delete(p DeletePrm) (uint32, error)
- func (c *Client) DeletionInfo(cid []byte) (*containercore.DelInfo, error)
- func (c *Client) Get(cid []byte) (*containercore.Container, error)
- func (c *Client) GetEACL(cnr cid.ID) (*container.EACL, error)
- func (c Client) Morph() *client.Client
- func (c *Client) Put(p PutPrm) error
- type DeletePrm
- type Option
- type PutPrm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsContainerSource ¶
func AsContainerSource(w *Client) containercore.Source
AsContainerSource provides container Source interface from Wrapper instance.
func Delete ¶
func Delete(c *Client, witness core.RemovalWitness) error
Delete marshals container ID, and passes it to Wrapper's Delete method along with signature and session token.
Returns error if container ID is nil.
func DeletionInfo ¶ added in v0.37.0
func DeletionInfo(c deletionInfo, cnr cid.ID) (*containercore.DelInfo, error)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper over StaticClient which makes calls with the names and arguments of the FrostFS Container contract.
Working client must be created via constructor New. Using the Client that has been created with new(Client) expression (or just declaring a Client variable) is unsafe and can lead to panic.
func NewFromMorph ¶
func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8, opts ...Option) (*Client, error)
NewFromMorph returns the wrapper instance from the raw morph client.
Specified fee is used for all operations by default. If WithCustomFeeForNamedPut is provided, the customized fee is used for Put operations with named containers.
func (*Client) ContainersOf ¶
ContainersOf returns a list of container identifiers belonging to the specified user of FrostFS system. If idUser is nil, returns the list of all containers.
If remote RPC does not support neo-go session API, fallback to List() method.
func (Client) ContractAddress ¶
ContractAddress returns the address of the associated contract.
func (*Client) Delete ¶
Delete removes the container from FrostFS system through Container contract call.
Returns valid until block and any error encountered that caused the removal to interrupt.
If TryNotary is provided, calls notary contract.
func (*Client) DeletionInfo ¶ added in v0.37.0
func (c *Client) DeletionInfo(cid []byte) (*containercore.DelInfo, error)
func (*Client) Get ¶
func (c *Client) Get(cid []byte) (*containercore.Container, error)
Get reads the container from FrostFS system by binary identifier through Container contract call.
If an empty slice is returned for the requested identifier, storage.ErrNotFound error is returned.
func (*Client) GetEACL ¶
GetEACL reads the extended ACL table from FrostFS system through Container contract call.
Returns apistatus.EACLNotFound if eACL table is missing in the contract.
type DeletePrm ¶
type DeletePrm struct { client.InvokePrmOptional // contains filtered or unexported fields }
DeletePrm groups parameters of Delete client operation.
func (*DeletePrm) SetSignature ¶
SetSignature sets signature.
type Option ¶
type Option func(*opts)
Option allows to set an optional parameter of Wrapper.
func AsAlphabet ¶
func AsAlphabet() Option
AsAlphabet returns option to sign main TX of notary requests with client's private key.
Considered to be used by IR nodes only.
type PutPrm ¶
type PutPrm struct { client.InvokePrmOptional // contains filtered or unexported fields }
PutPrm groups parameters of Put operation.
func (*PutPrm) SetContainer ¶
SetContainer sets container data.
func (*PutPrm) SetSignature ¶
SetSignature sets signature.