internal

package
v0.38.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2023 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Overview

Package internal provides functionality for NeoFS CLI application communication with NeoFS network.

The base client for accessing remote nodes via NeoFS API is a NeoFS SDK Go API client. However, although it encapsulates a useful piece of business logic (e.g. the signature mechanism), the NeoFS CLI application does not fully use the client's flexible interface.

In this regard, this package provides functions over base API client necessary for the application. This allows you to concentrate the entire spectrum of the client's use in one place (this will be convenient both when updating the base client and for evaluating the UX of SDK library). So it is expected that all application packages will be limited to this package for the development of functionality requiring NeoFS API communication.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentEpoch added in v0.30.0

func GetCurrentEpoch(ctx context.Context, endpoint string) (uint64, error)

GetCurrentEpoch returns current epoch.

func GetSDKClient added in v0.28.0

func GetSDKClient(ctx context.Context, addr network.Address) (*client.Client, error)

GetSDKClient returns default neofs-sdk-go client.

func GetSDKClientByFlag added in v0.28.2

func GetSDKClientByFlag(ctx context.Context, cmd *cobra.Command, endpointFlag string) *client.Client

GetSDKClientByFlag returns default neofs-sdk-go client using the specified flag for the address. On error, outputs to stderr of cmd and exits with non-zero code.

Types

type BalanceOfPrm

type BalanceOfPrm struct {
	client.PrmBalanceGet
	// contains filtered or unexported fields
}

BalanceOfPrm groups parameters of BalanceOf operation.

func (*BalanceOfPrm) SetClient

func (x *BalanceOfPrm) SetClient(cli *client.Client)

SetClient sets the base client for NeoFS API communication.

type BalanceOfRes

type BalanceOfRes struct {
	// contains filtered or unexported fields
}

BalanceOfRes groups the resulting values of BalanceOf operation.

func BalanceOf

func BalanceOf(ctx context.Context, prm BalanceOfPrm) (res BalanceOfRes, err error)

BalanceOf requests the current balance of a NeoFS user.

Returns any error which prevented the operation from completing correctly in error return.

func (BalanceOfRes) Balance

func (x BalanceOfRes) Balance() accounting.Decimal

Balance returns the current balance.

type CreateSessionPrm

type CreateSessionPrm struct {
	client.PrmSessionCreate
	// contains filtered or unexported fields
}

CreateSessionPrm groups parameters of CreateSession operation.

func (*CreateSessionPrm) SetClient

func (x *CreateSessionPrm) SetClient(cli *client.Client)

SetClient sets the base client for NeoFS API communication.

func (*CreateSessionPrm) SetPrivateKey added in v0.38.0

func (x *CreateSessionPrm) SetPrivateKey(key ecdsa.PrivateKey)

SetPrivateKey sets ecdsa.PrivateKey to be used for the operation.

type CreateSessionRes

type CreateSessionRes struct {
	// contains filtered or unexported fields
}

CreateSessionRes groups the resulting values of CreateSession operation.

func CreateSession

func CreateSession(ctx context.Context, prm CreateSessionPrm) (res CreateSessionRes, err error)

CreateSession opens a new unlimited session with the remote node.

Returns any error which prevented the operation from completing correctly in error return.

func (CreateSessionRes) ID

func (x CreateSessionRes) ID() []byte

ID returns session identifier.

func (CreateSessionRes) SessionKey

func (x CreateSessionRes) SessionKey() []byte

SessionKey returns public session key in a binary format.

type DeleteContainerPrm

type DeleteContainerPrm struct {
	client.PrmContainerDelete
	// contains filtered or unexported fields
}

DeleteContainerPrm groups parameters of DeleteContainerPrm operation.

func (*DeleteContainerPrm) SetClient

func (x *DeleteContainerPrm) SetClient(cli *client.Client)

SetClient sets the base client for NeoFS API communication.

func (*DeleteContainerPrm) SetContainer added in v0.38.0

func (d *DeleteContainerPrm) SetContainer(cid cid.ID)

SetContainer sets an ID of a container to be removed.

func (*DeleteContainerPrm) SetPrivateKey added in v0.38.0

func (p *DeleteContainerPrm) SetPrivateKey(key ecdsa.PrivateKey)

SetPrivateKey sets ecdsa.PrivateKey to be used for the operation.

type DeleteContainerRes

type DeleteContainerRes struct{}

DeleteContainerRes groups the resulting values of DeleteContainer operation.

func DeleteContainer

func DeleteContainer(ctx context.Context, prm DeleteContainerPrm) (res DeleteContainerRes, err error)

DeleteContainer sends a request to remove a container from NeoFS by ID.

Operation is asynchronous and not guaranteed even in the absence of errors. The required time is also not predictable.

Success can be verified by reading by identifier.

Returns any error which prevented the operation from completing correctly in error return.

type DeleteObjectPrm

type DeleteObjectPrm struct {
	// contains filtered or unexported fields
}

DeleteObjectPrm groups parameters of DeleteObject operation.

func (*DeleteObjectPrm) SetAddress

func (x *DeleteObjectPrm) SetAddress(addr oid.Address)

func (*DeleteObjectPrm) SetSessionToken added in v0.28.2

func (x *DeleteObjectPrm) SetSessionToken(tok *session.Object)

SetSessionToken sets the token of the session within which the request should be sent.

func (*DeleteObjectPrm) SetTTL

func (x *DeleteObjectPrm) SetTTL(ttl uint32)

SetTTL sets request TTL value.

func (*DeleteObjectPrm) SetXHeaders

func (x *DeleteObjectPrm) SetXHeaders(hs []string)

SetXHeaders sets request X-Headers.

type DeleteObjectRes

type DeleteObjectRes struct {
	// contains filtered or unexported fields
}

DeleteObjectRes groups the resulting values of DeleteObject operation.

func DeleteObject

func DeleteObject(ctx context.Context, prm DeleteObjectPrm) (*DeleteObjectRes, error)

DeleteObject marks an object to be removed from NeoFS through tombstone placement.

Returns any error which prevented the operation from completing correctly in error return.

func (DeleteObjectRes) Tombstone added in v0.28.2

func (x DeleteObjectRes) Tombstone() oid.ID

Tombstone returns the ID of the created object with tombstone.

type EACLPrm

type EACLPrm struct {
	client.PrmContainerEACL
	// contains filtered or unexported fields
}

EACLPrm groups parameters of EACL operation.

func (*EACLPrm) SetClient

func (x *EACLPrm) SetClient(cli *client.Client)

SetClient sets the base client for NeoFS API communication.

func (*EACLPrm) SetContainer added in v0.38.0

func (E *EACLPrm) SetContainer(cid cid.ID)

SetContainer sets container ID to be requested for its eACL.

type EACLRes

type EACLRes struct {
	// contains filtered or unexported fields
}

EACLRes groups the resulting values of EACL operation.

func EACL

func EACL(ctx context.Context, prm EACLPrm) (res EACLRes, err error)

EACL reads eACL table from NeoFS by container ID.

Returns any error which prevented the operation from completing correctly in error return.

func (EACLRes) EACL

func (x EACLRes) EACL() eacl.Table

EACL returns requested eACL table.

type GetContainerPrm

type GetContainerPrm struct {
	// contains filtered or unexported fields
}

GetContainerPrm groups parameters of GetContainer operation.

func (*GetContainerPrm) SetClient

func (x *GetContainerPrm) SetClient(cli *client.Client)

SetClient sets the base client for NeoFS API communication.

func (*GetContainerPrm) SetContainer added in v0.28.0

func (x *GetContainerPrm) SetContainer(id cid.ID)

SetContainer sets identifier of the container to be read.

type GetContainerRes

type GetContainerRes struct {
	// contains filtered or unexported fields
}

GetContainerRes groups the resulting values of GetContainer operation.

func GetContainer

func GetContainer(ctx context.Context, prm GetContainerPrm) (res GetContainerRes, err error)

GetContainer reads a container from NeoFS by ID.

Returns any error which prevented the operation from completing correctly in error return.

func (GetContainerRes) Container

func (x GetContainerRes) Container() containerSDK.Container

Container returns structured of the requested container.

type GetObjectPrm

type GetObjectPrm struct {
	// contains filtered or unexported fields
}

GetObjectPrm groups parameters of GetObject operation.

func (*GetObjectPrm) SetAddress

func (x *GetObjectPrm) SetAddress(addr oid.Address)

func (*GetObjectPrm) SetHeaderCallback added in v0.28.0

func (p *GetObjectPrm) SetHeaderCallback(f func(*object.Object))

SetHeaderCallback sets callback which is called on the object after the header is received but before the payload is written.

func (*GetObjectPrm) SetPayloadWriter

func (x *GetObjectPrm) SetPayloadWriter(wrt io.Writer)

SetPayloadWriter sets the writer of the object payload.

func (*GetObjectPrm) SetRawFlag

func (x *GetObjectPrm) SetRawFlag(raw bool)

SetRawFlag sets flag of raw request.

func (*GetObjectPrm) SetSessionToken added in v0.28.2

func (x *GetObjectPrm) SetSessionToken(tok *session.Object)

SetSessionToken sets the token of the session within which the request should be sent.

func (*GetObjectPrm) SetTTL

func (x *GetObjectPrm) SetTTL(ttl uint32)

SetTTL sets request TTL value.

func (*GetObjectPrm) SetXHeaders

func (x *GetObjectPrm) SetXHeaders(hs []string)

SetXHeaders sets request X-Headers.

type GetObjectRes

type GetObjectRes struct {
	// contains filtered or unexported fields
}

GetObjectRes groups the resulting values of GetObject operation.

func GetObject

func GetObject(ctx context.Context, prm GetObjectPrm) (*GetObjectRes, error)

GetObject reads an object by address.

Interrupts on any writer error. If successful, payload is written to the writer.

Returns any error which prevented the operation from completing correctly in error return. For raw reading, returns *object.SplitInfoError error if object is virtual.

func (GetObjectRes) Header

func (x GetObjectRes) Header() *object.Object

Header returns the header of the request object.

type HashPayloadRangesPrm

type HashPayloadRangesPrm struct {
	// contains filtered or unexported fields
}

HashPayloadRangesPrm groups parameters of HashPayloadRanges operation.

func (*HashPayloadRangesPrm) SetAddress

func (x *HashPayloadRangesPrm) SetAddress(addr oid.Address)

func (*HashPayloadRangesPrm) SetRanges

func (x *HashPayloadRangesPrm) SetRanges(rngs []*object.Range)

SetRanges sets a list of payload ranges to hash.

func (*HashPayloadRangesPrm) SetSalt

func (x *HashPayloadRangesPrm) SetSalt(salt []byte)

SetSalt sets data for each range to be XOR'ed with.

func (*HashPayloadRangesPrm) SetSessionToken added in v0.28.2

func (x *HashPayloadRangesPrm) SetSessionToken(tok *session.Object)

SetSessionToken sets the token of the session within which the request should be sent.

func (*HashPayloadRangesPrm) SetTTL

func (x *HashPayloadRangesPrm) SetTTL(ttl uint32)

SetTTL sets request TTL value.

func (*HashPayloadRangesPrm) SetXHeaders

func (x *HashPayloadRangesPrm) SetXHeaders(hs []string)

SetXHeaders sets request X-Headers.

func (*HashPayloadRangesPrm) TZ

func (x *HashPayloadRangesPrm) TZ()

TZ sets flag to request Tillich-Zemor hashes.

type HashPayloadRangesRes

type HashPayloadRangesRes struct {
	// contains filtered or unexported fields
}

HashPayloadRangesRes groups the resulting values of HashPayloadRanges operation.

func HashPayloadRanges

func HashPayloadRanges(ctx context.Context, prm HashPayloadRangesPrm) (*HashPayloadRangesRes, error)

HashPayloadRanges requests hashes (by default SHA256) of the object payload ranges.

Returns any error which prevented the operation from completing correctly in error return. Returns an error if number of received hashes differs with the number of requested ranges.

func (HashPayloadRangesRes) HashList

func (x HashPayloadRangesRes) HashList() [][]byte

HashList returns a list of hashes of the payload ranges keeping order.

type HeadObjectPrm

type HeadObjectPrm struct {
	// contains filtered or unexported fields
}

HeadObjectPrm groups parameters of HeadObject operation.

func (*HeadObjectPrm) SetAddress

func (x *HeadObjectPrm) SetAddress(addr oid.Address)

func (*HeadObjectPrm) SetMainOnlyFlag

func (x *HeadObjectPrm) SetMainOnlyFlag(v bool)

SetMainOnlyFlag sets flag to get only main fields of an object header in terms of NeoFS API.

func (*HeadObjectPrm) SetRawFlag

func (x *HeadObjectPrm) SetRawFlag(raw bool)

SetRawFlag sets flag of raw request.

func (*HeadObjectPrm) SetSessionToken added in v0.28.2

func (x *HeadObjectPrm) SetSessionToken(tok *session.Object)

SetSessionToken sets the token of the session within which the request should be sent.

func (*HeadObjectPrm) SetTTL

func (x *HeadObjectPrm) SetTTL(ttl uint32)

SetTTL sets request TTL value.

func (*HeadObjectPrm) SetXHeaders

func (x *HeadObjectPrm) SetXHeaders(hs []string)

SetXHeaders sets request X-Headers.

type HeadObjectRes

type HeadObjectRes struct {
	// contains filtered or unexported fields
}

HeadObjectRes groups the resulting values of HeadObject operation.

func HeadObject

func HeadObject(ctx context.Context, prm HeadObjectPrm) (*HeadObjectRes, error)

HeadObject reads an object header by address.

Returns any error which prevented the operation from completing correctly in error return. For raw reading, returns *object.SplitInfoError error if object is virtual.

func (HeadObjectRes) Header

func (x HeadObjectRes) Header() *object.Object

Header returns the requested object header.

type ListContainersPrm

type ListContainersPrm struct {
	client.PrmContainerList
	// contains filtered or unexported fields
}

ListContainersPrm groups parameters of ListContainers operation.

func (*ListContainersPrm) SetAccount added in v0.38.0

func (l *ListContainersPrm) SetAccount(owner user.ID)

SetAccount sets containers' owner.

func (*ListContainersPrm) SetClient

func (x *ListContainersPrm) SetClient(cli *client.Client)

SetClient sets the base client for NeoFS API communication.

type ListContainersRes

type ListContainersRes struct {
	// contains filtered or unexported fields
}

ListContainersRes groups the resulting values of ListContainers operation.

func ListContainers

func ListContainers(ctx context.Context, prm ListContainersPrm) (res ListContainersRes, err error)

ListContainers requests a list of NeoFS user's containers.

Returns any error which prevented the operation from completing correctly in error return.

func (ListContainersRes) IDList

func (x ListContainersRes) IDList() []cid.ID

IDList returns list of identifiers of user's containers.

type NetMapSnapshotPrm added in v0.33.0

type NetMapSnapshotPrm struct {
	// contains filtered or unexported fields
}

NetMapSnapshotPrm groups parameters of NetMapSnapshot operation.

func (*NetMapSnapshotPrm) SetClient added in v0.33.0

func (x *NetMapSnapshotPrm) SetClient(cli *client.Client)

SetClient sets the base client for NeoFS API communication.

type NetMapSnapshotRes added in v0.33.0

type NetMapSnapshotRes struct {
	// contains filtered or unexported fields
}

NetMapSnapshotRes groups the resulting values of NetMapSnapshot operation.

func NetMapSnapshot added in v0.33.0

func NetMapSnapshot(ctx context.Context, prm NetMapSnapshotPrm) (res NetMapSnapshotRes, err error)

NetMapSnapshot requests current network view of the remote server.

Returns any error which prevented the operation from completing correctly in error return.

func (NetMapSnapshotRes) NetMap added in v0.33.0

func (x NetMapSnapshotRes) NetMap() netmap.NetMap

NetMap returns current local snapshot of the NeoFS network map.

type NetworkInfoPrm

type NetworkInfoPrm struct {
	client.PrmNetworkInfo
	// contains filtered or unexported fields
}

NetworkInfoPrm groups parameters of NetworkInfo operation.

func (*NetworkInfoPrm) SetClient

func (x *NetworkInfoPrm) SetClient(cli *client.Client)

SetClient sets the base client for NeoFS API communication.

type NetworkInfoRes

type NetworkInfoRes struct {
	// contains filtered or unexported fields
}

NetworkInfoRes groups the resulting values of NetworkInfo operation.

func NetworkInfo

func NetworkInfo(ctx context.Context, prm NetworkInfoPrm) (res NetworkInfoRes, err error)

NetworkInfo reads information about the NeoFS network.

Returns any error which prevented the operation from completing correctly in error return.

func (NetworkInfoRes) NetworkInfo

func (x NetworkInfoRes) NetworkInfo() netmap.NetworkInfo

NetworkInfo returns structured information about the NeoFS network.

type NodeInfoPrm

type NodeInfoPrm struct {
	client.PrmEndpointInfo
	// contains filtered or unexported fields
}

NodeInfoPrm groups parameters of NodeInfo operation.

func (*NodeInfoPrm) SetClient

func (x *NodeInfoPrm) SetClient(cli *client.Client)

SetClient sets the base client for NeoFS API communication.

type NodeInfoRes

type NodeInfoRes struct {
	// contains filtered or unexported fields
}

NodeInfoRes groups the resulting values of NodeInfo operation.

func NodeInfo

func NodeInfo(ctx context.Context, prm NodeInfoPrm) (res NodeInfoRes, err error)

NodeInfo requests information about the remote server from NeoFS netmap.

Returns any error which prevented the operation from completing correctly in error return.

func (NodeInfoRes) LatestVersion

func (x NodeInfoRes) LatestVersion() version.Version

LatestVersion returns the latest NeoFS API version in use.

func (NodeInfoRes) NodeInfo

func (x NodeInfoRes) NodeInfo() netmap.NodeInfo

NodeInfo returns information about the node from netmap.

type PayloadRangePrm

type PayloadRangePrm struct {
	// contains filtered or unexported fields
}

PayloadRangePrm groups parameters of PayloadRange operation.

func (*PayloadRangePrm) SetAddress

func (x *PayloadRangePrm) SetAddress(addr oid.Address)

func (*PayloadRangePrm) SetPayloadWriter

func (x *PayloadRangePrm) SetPayloadWriter(wrt io.Writer)

SetPayloadWriter sets the writer of the object payload.

func (*PayloadRangePrm) SetRange

func (x *PayloadRangePrm) SetRange(rng *object.Range)

SetRange sets payload range to read.

func (*PayloadRangePrm) SetRawFlag

func (x *PayloadRangePrm) SetRawFlag(raw bool)

SetRawFlag sets flag of raw request.

func (*PayloadRangePrm) SetSessionToken added in v0.28.2

func (x *PayloadRangePrm) SetSessionToken(tok *session.Object)

SetSessionToken sets the token of the session within which the request should be sent.

func (*PayloadRangePrm) SetTTL

func (x *PayloadRangePrm) SetTTL(ttl uint32)

SetTTL sets request TTL value.

func (*PayloadRangePrm) SetXHeaders

func (x *PayloadRangePrm) SetXHeaders(hs []string)

SetXHeaders sets request X-Headers.

type PayloadRangeRes

type PayloadRangeRes struct{}

PayloadRangeRes groups the resulting values of PayloadRange operation.

func PayloadRange

func PayloadRange(ctx context.Context, prm PayloadRangePrm) (*PayloadRangeRes, error)

PayloadRange reads object payload range from NeoFS and writes it to the specified writer.

Interrupts on any writer error.

Returns any error which prevented the operation from completing correctly in error return. For raw reading, returns *object.SplitInfoError error if object is virtual.

type PutContainerPrm

type PutContainerPrm struct {
	client.PrmContainerPut
	// contains filtered or unexported fields
}

PutContainerPrm groups parameters of PutContainer operation.

func (*PutContainerPrm) SetClient

func (x *PutContainerPrm) SetClient(cli *client.Client)

SetClient sets the base client for NeoFS API communication.

func (*PutContainerPrm) SetContainer

func (p *PutContainerPrm) SetContainer(cnr containerSDK.Container)

SetContainer sets container.

func (*PutContainerPrm) SetPrivateKey added in v0.38.0

func (p *PutContainerPrm) SetPrivateKey(key ecdsa.PrivateKey)

SetPrivateKey sets ecdsa.PrivateKey to be used for the operation.

type PutContainerRes

type PutContainerRes struct {
	// contains filtered or unexported fields
}

PutContainerRes groups the resulting values of PutContainer operation.

func PutContainer

func PutContainer(ctx context.Context, prm PutContainerPrm) (res PutContainerRes, err error)

PutContainer sends a request to save the container in NeoFS.

Operation is asynchronous and not guaranteed even in the absence of errors. The required time is also not predictable.

Success can be verified by reading by identifier.

Returns any error which prevented the operation from completing correctly in error return.

func (PutContainerRes) ID

func (x PutContainerRes) ID() cid.ID

ID returns identifier of the created container.

type PutObjectPrm

type PutObjectPrm struct {
	// contains filtered or unexported fields
}

PutObjectPrm groups parameters of PutObject operation.

func (*PutObjectPrm) SetHeader

func (x *PutObjectPrm) SetHeader(hdr *object.Object)

SetHeader sets object header.

func (*PutObjectPrm) SetHeaderCallback added in v0.29.0

func (x *PutObjectPrm) SetHeaderCallback(f func(*object.Object))

SetHeaderCallback sets callback which is called on the object after the header is received but before the payload is written.

func (*PutObjectPrm) SetPayloadReader

func (x *PutObjectPrm) SetPayloadReader(rdr io.Reader)

SetPayloadReader sets reader of the object payload.

func (*PutObjectPrm) SetSessionToken added in v0.28.2

func (x *PutObjectPrm) SetSessionToken(tok *session.Object)

SetSessionToken sets the token of the session within which the request should be sent.

func (*PutObjectPrm) SetTTL

func (x *PutObjectPrm) SetTTL(ttl uint32)

SetTTL sets request TTL value.

func (*PutObjectPrm) SetXHeaders

func (x *PutObjectPrm) SetXHeaders(hs []string)

SetXHeaders sets request X-Headers.

type PutObjectRes

type PutObjectRes struct {
	// contains filtered or unexported fields
}

PutObjectRes groups the resulting values of PutObject operation.

func PutObject

func PutObject(ctx context.Context, prm PutObjectPrm) (*PutObjectRes, error)

PutObject saves the object in NeoFS network.

Returns any error which prevented the operation from completing correctly in error return.

func (PutObjectRes) ID

func (x PutObjectRes) ID() oid.ID

ID returns identifier of the created object.

type SearchObjectsPrm

type SearchObjectsPrm struct {
	// contains filtered or unexported fields
}

SearchObjectsPrm groups parameters of SearchObjects operation.

func (*SearchObjectsPrm) SetContainerID

func (x *SearchObjectsPrm) SetContainerID(id cid.ID)

SetContainerID sets the container identifier.

func (*SearchObjectsPrm) SetFilters

func (x *SearchObjectsPrm) SetFilters(filters object.SearchFilters)

SetFilters sets search filters.

func (*SearchObjectsPrm) SetSessionToken added in v0.28.2

func (x *SearchObjectsPrm) SetSessionToken(tok *session.Object)

SetSessionToken sets the token of the session within which the request should be sent.

func (*SearchObjectsPrm) SetTTL

func (x *SearchObjectsPrm) SetTTL(ttl uint32)

SetTTL sets request TTL value.

func (*SearchObjectsPrm) SetXHeaders

func (x *SearchObjectsPrm) SetXHeaders(hs []string)

SetXHeaders sets request X-Headers.

type SearchObjectsRes

type SearchObjectsRes struct {
	// contains filtered or unexported fields
}

SearchObjectsRes groups the resulting values of SearchObjects operation.

func SearchObjects

func SearchObjects(ctx context.Context, prm SearchObjectsPrm) (*SearchObjectsRes, error)

SearchObjects selects objects from the container which match the filters.

Returns any error which prevented the operation from completing correctly in error return.

func (SearchObjectsRes) IDList

func (x SearchObjectsRes) IDList() []oid.ID

IDList returns identifiers of the matched objects.

type SetEACLPrm

type SetEACLPrm struct {
	client.PrmContainerSetEACL
	// contains filtered or unexported fields
}

SetEACLPrm groups parameters of SetEACL operation.

func (*SetEACLPrm) SetClient

func (x *SetEACLPrm) SetClient(cli *client.Client)

SetClient sets the base client for NeoFS API communication.

func (*SetEACLPrm) SetPrivateKey added in v0.38.0

func (p *SetEACLPrm) SetPrivateKey(key ecdsa.PrivateKey)

SetPrivateKey sets ecdsa.PrivateKey to be used for the operation.

func (*SetEACLPrm) SetTable added in v0.38.0

func (s *SetEACLPrm) SetTable(table eacl.Table)

SetTable sets extended Access Control List table to be applied.

type SetEACLRes

type SetEACLRes struct{}

SetEACLRes groups the resulting values of SetEACL operation.

func SetEACL

func SetEACL(ctx context.Context, prm SetEACLPrm) (res SetEACLRes, err error)

SetEACL requests to save an eACL table in NeoFS.

Operation is asynchronous and no guaranteed even in the absence of errors. The required time is also not predictable.

Success can be verified by reading by container identifier.

Returns any error which prevented the operation from completing correctly in error return.

type SyncContainerPrm added in v0.30.0

type SyncContainerPrm struct {
	// contains filtered or unexported fields
}

SyncContainerPrm groups parameters of SyncContainerSettings operation.

func (*SyncContainerPrm) SetClient added in v0.30.0

func (x *SyncContainerPrm) SetClient(cli *client.Client)

SetClient sets the base client for NeoFS API communication.

func (*SyncContainerPrm) SetContainer added in v0.30.0

func (s *SyncContainerPrm) SetContainer(c *containerSDK.Container)

SetContainer sets a container that is required to be synced.

type SyncContainerRes added in v0.30.0

type SyncContainerRes struct{}

SyncContainerRes groups resulting values of SyncContainerSettings operation.

func SyncContainerSettings added in v0.30.0

func SyncContainerSettings(ctx context.Context, prm SyncContainerPrm) (*SyncContainerRes, error)

SyncContainerSettings reads global network config from NeoFS and syncs container settings with it.

Interrupts on any writer error.

Panics if a container passed as a parameter is nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL