neofs

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: AGPL-3.0 Imports: 45 Imported by: 0

Documentation

Overview

REMOVE THIS AFTER SIGNATURE WILL BE AVAILABLE IN TREE CLIENT FROM NEOFS NODE

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthmateNeoFS

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

AuthmateNeoFS is a mediator which implements authmate.NeoFS through pool.Pool.

func NewAuthmateNeoFS added in v0.20.0

func NewAuthmateNeoFS(neoFS layer.NeoFS) *AuthmateNeoFS

NewAuthmateNeoFS creates new AuthmateNeoFS using provided pool.Pool.

func (*AuthmateNeoFS) ContainerExists added in v0.20.0

func (x *AuthmateNeoFS) ContainerExists(ctx context.Context, idCnr cid.ID) error

ContainerExists implements authmate.NeoFS interface method.

func (*AuthmateNeoFS) CreateContainer

func (x *AuthmateNeoFS) CreateContainer(ctx context.Context, prm authmate.PrmContainerCreate) (cid.ID, error)

CreateContainer implements authmate.NeoFS interface method.

func (*AuthmateNeoFS) CreateObject

func (x *AuthmateNeoFS) CreateObject(ctx context.Context, prm tokens.PrmObjectCreate) (oid.ID, error)

CreateObject implements authmate.NeoFS interface method.

func (*AuthmateNeoFS) ReadObjectPayload

func (x *AuthmateNeoFS) ReadObjectPayload(ctx context.Context, addr oid.Address) ([]byte, error)

ReadObjectPayload implements authmate.NeoFS interface method.

func (*AuthmateNeoFS) TimeToEpoch added in v0.20.0

func (x *AuthmateNeoFS) TimeToEpoch(ctx context.Context, futureTime time.Time) (uint64, uint64, error)

TimeToEpoch implements authmate.NeoFS interface method.

type Config added in v0.29.0

type Config struct {
	MaxObjectSize        int64
	IsSlicerEnabled      bool
	IsHomomorphicEnabled bool
}

Config allows to configure some NeoFS parameters.

type EpochGetter added in v0.29.0

type EpochGetter interface {
	CurrentEpoch() uint64
}

EpochGetter represents provider to get actual NeoFS epoch.

type NeoFS

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

NeoFS represents virtual connection to the NeoFS network. It is used to provide an interface to dependent packages which work with NeoFS.

func NewNeoFS added in v0.20.0

func NewNeoFS(p *pool.Pool, signer user.Signer, anonSigner user.Signer, cfg Config, epochGetter EpochGetter) *NeoFS

NewNeoFS creates new NeoFS using provided pool.Pool.

func (*NeoFS) Container

func (x *NeoFS) Container(ctx context.Context, idCnr cid.ID) (*container.Container, error)

Container implements neofs.NeoFS interface method.

func (*NeoFS) ContainerEACL

func (x *NeoFS) ContainerEACL(ctx context.Context, id cid.ID) (*eacl.Table, error)

ContainerEACL implements neofs.NeoFS interface method.

func (*NeoFS) CreateContainer

func (x *NeoFS) CreateContainer(ctx context.Context, prm layer.PrmContainerCreate) (cid.ID, error)

CreateContainer implements neofs.NeoFS interface method.

If prm.BasicACL is zero, 'eacl-public-read-write' is used.

func (*NeoFS) CreateObject

func (x *NeoFS) CreateObject(ctx context.Context, prm layer.PrmObjectCreate) (oid.ID, error)

CreateObject implements neofs.NeoFS interface method.

func (*NeoFS) DeleteContainer

func (x *NeoFS) DeleteContainer(ctx context.Context, id cid.ID, token *session.Container) error

DeleteContainer implements neofs.NeoFS interface method.

func (*NeoFS) DeleteObject

func (x *NeoFS) DeleteObject(ctx context.Context, prm layer.PrmObjectDelete) error

DeleteObject implements neofs.NeoFS interface method.

func (*NeoFS) FinalizeObjectWithPayloadChecksums added in v0.30.0

func (x *NeoFS) FinalizeObjectWithPayloadChecksums(ctx context.Context, header object.Object, metaChecksum hash.Hash, homomorphicChecksum hash.Hash, payloadLength uint64) (*object.Object, error)

FinalizeObjectWithPayloadChecksums implements neofs.NeoFS interface method.

func (*NeoFS) IsHomomorphicHashingEnabled added in v0.30.0

func (x *NeoFS) IsHomomorphicHashingEnabled() bool

IsHomomorphicHashingEnabled shows if homomorphic hashing is enabled in config.

func (*NeoFS) MaxObjectSize added in v0.30.0

func (x *NeoFS) MaxObjectSize() int64

MaxObjectSize returns configured payload size limit for object slicing when enabled.

func (*NeoFS) ReadObject

func (x *NeoFS) ReadObject(ctx context.Context, prm layer.PrmObjectRead) (*layer.ObjectPart, error)

ReadObject implements neofs.NeoFS interface method.

func (*NeoFS) SetContainerEACL

func (x *NeoFS) SetContainerEACL(ctx context.Context, table eacl.Table, sessionToken *session.Container) error

SetContainerEACL implements neofs.NeoFS interface method.

func (*NeoFS) TimeToEpoch added in v0.20.0

func (x *NeoFS) TimeToEpoch(ctx context.Context, now, futureTime time.Time) (uint64, uint64, error)

TimeToEpoch implements neofs.NeoFS interface method.

func (*NeoFS) UserContainers

func (x *NeoFS) UserContainers(ctx context.Context, id user.ID) ([]cid.ID, error)

UserContainers implements neofs.NeoFS interface method.

type NetworkInfoGetter added in v0.29.0

type NetworkInfoGetter interface {
	NetworkInfo(ctx context.Context, prm client.PrmNetworkInfo) (netmap.NetworkInfo, error)
}

NetworkInfoGetter represents provider to get actual netmap.NetworkInfo.

type NodeResponse added in v0.22.0

type NodeResponse interface {
	GetMeta() []*tree.KeyValue
	GetNodeId() uint64
	GetParentId() uint64
	GetTimestamp() uint64
}

type PeriodicGetter added in v0.29.0

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

PeriodicGetter implements EpochGetter.

func NewPeriodicGetter added in v0.29.0

func NewPeriodicGetter(ctx context.Context, initialEpoch uint64, timeOut time.Duration, netGetter NetworkInfoGetter, logger *zap.Logger) *PeriodicGetter

NewPeriodicGetter is a constructor to PeriodicGetter.

func (*PeriodicGetter) CurrentEpoch added in v0.29.0

func (g *PeriodicGetter) CurrentEpoch() uint64

CurrentEpoch returns actual epoch.

CurrentEpoch implements EpochGetter.

type PoolStatistic added in v0.24.0

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

PoolStatistic is a mediator which implements authmate.NeoFS through pool.Pool.

func NewPoolStatistic added in v0.24.0

func NewPoolStatistic(poolStat *stat.PoolStat) *PoolStatistic

NewPoolStatistic creates new PoolStatistic using provided pool.Pool.

func (*PoolStatistic) Statistic added in v0.24.0

func (x *PoolStatistic) Statistic() stat.Statistic

Statistic implements interface method.

type ResolverNeoFS added in v0.20.0

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

ResolverNeoFS represents virtual connection to the NeoFS network. It implements resolver.NeoFS.

func NewResolverNeoFS added in v0.20.0

func NewResolverNeoFS(p *pool.Pool) *ResolverNeoFS

NewResolverNeoFS creates new ResolverNeoFS using provided pool.Pool.

func (*ResolverNeoFS) SystemDNS added in v0.20.0

func (x *ResolverNeoFS) SystemDNS(ctx context.Context) (string, error)

SystemDNS implements resolver.NeoFS interface method.

type TreeClient added in v0.22.0

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

func NewTreeClient added in v0.22.0

func NewTreeClient(ctx context.Context, addr string, key *keys.PrivateKey) (*TreeClient, error)

NewTreeClient creates instance of TreeClient using provided address and create grpc connection.

func (*TreeClient) AddPart added in v0.22.0

func (c *TreeClient) AddPart(ctx context.Context, bktInfo *data.BucketInfo, multipartNodeID uint64, info *data.PartInfo) (oldObjIDToDelete oid.ID, err error)

func (*TreeClient) AddVersion added in v0.22.0

func (c *TreeClient) AddVersion(ctx context.Context, bktInfo *data.BucketInfo, version *data.NodeVersion) (uint64, error)

func (*TreeClient) Close added in v0.22.0

func (c *TreeClient) Close() error

func (*TreeClient) CreateMultipartUpload added in v0.22.0

func (c *TreeClient) CreateMultipartUpload(ctx context.Context, bktInfo *data.BucketInfo, info *data.MultipartInfo) error

func (*TreeClient) DeleteBucketCORS added in v0.22.0

func (c *TreeClient) DeleteBucketCORS(ctx context.Context, bktInfo *data.BucketInfo) (oid.ID, error)

func (*TreeClient) DeleteBucketTagging added in v0.22.0

func (c *TreeClient) DeleteBucketTagging(ctx context.Context, bktInfo *data.BucketInfo) error

func (*TreeClient) DeleteMultipartUpload added in v0.22.0

func (c *TreeClient) DeleteMultipartUpload(ctx context.Context, bktInfo *data.BucketInfo, multipartNodeID uint64) error

func (*TreeClient) DeleteObjectTagging added in v0.22.0

func (c *TreeClient) DeleteObjectTagging(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion) error

func (*TreeClient) GetAllVersionsByPrefix added in v0.22.0

func (c *TreeClient) GetAllVersionsByPrefix(ctx context.Context, bktInfo *data.BucketInfo, prefix string) ([]*data.NodeVersion, error)

func (*TreeClient) GetBucketCORS added in v0.22.0

func (c *TreeClient) GetBucketCORS(ctx context.Context, bktInfo *data.BucketInfo) (oid.ID, error)

func (*TreeClient) GetBucketTagging added in v0.22.0

func (c *TreeClient) GetBucketTagging(ctx context.Context, bktInfo *data.BucketInfo) (map[string]string, error)

func (*TreeClient) GetLastPart added in v0.30.0

func (c *TreeClient) GetLastPart(ctx context.Context, bktInfo *data.BucketInfo, multipartNodeID uint64) (*data.PartInfo, error)

func (*TreeClient) GetLatestVersion added in v0.22.0

func (c *TreeClient) GetLatestVersion(ctx context.Context, bktInfo *data.BucketInfo, objectName string) (*data.NodeVersion, error)

func (*TreeClient) GetLatestVersionsByPrefix added in v0.22.0

func (c *TreeClient) GetLatestVersionsByPrefix(ctx context.Context, bktInfo *data.BucketInfo, prefix string) ([]*data.NodeVersion, error)

func (*TreeClient) GetLock added in v0.22.0

func (c *TreeClient) GetLock(ctx context.Context, bktInfo *data.BucketInfo, nodeID uint64) (*data.LockInfo, error)

func (*TreeClient) GetMultipartUpload added in v0.22.0

func (c *TreeClient) GetMultipartUpload(ctx context.Context, bktInfo *data.BucketInfo, objectName, uploadID string) (*data.MultipartInfo, error)

func (*TreeClient) GetMultipartUploadsByPrefix added in v0.22.0

func (c *TreeClient) GetMultipartUploadsByPrefix(ctx context.Context, bktInfo *data.BucketInfo, prefix string) ([]*data.MultipartInfo, error)

func (*TreeClient) GetNotificationConfigurationNode added in v0.22.0

func (c *TreeClient) GetNotificationConfigurationNode(ctx context.Context, bktInfo *data.BucketInfo) (oid.ID, error)

func (*TreeClient) GetObjectTagging added in v0.22.0

func (c *TreeClient) GetObjectTagging(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion) (map[string]string, error)

func (*TreeClient) GetObjectTaggingAndLock added in v0.22.0

func (c *TreeClient) GetObjectTaggingAndLock(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion) (map[string]string, *data.LockInfo, error)

func (*TreeClient) GetParts added in v0.22.0

func (c *TreeClient) GetParts(ctx context.Context, bktInfo *data.BucketInfo, multipartNodeID uint64) ([]*data.PartInfo, error)

func (*TreeClient) GetPartsAfter added in v0.30.0

func (c *TreeClient) GetPartsAfter(ctx context.Context, bktInfo *data.BucketInfo, multipartNodeID uint64, partID int) ([]*data.PartInfo, error)

GetPartsAfter returns parts uploaded after partID. These parts are sorted and filtered by creation time. It means, if any upload had a re-uploaded data (few part versions), the list contains only the latest version of the upload.

func (*TreeClient) GetSettingsNode added in v0.22.0

func (c *TreeClient) GetSettingsNode(ctx context.Context, bktInfo *data.BucketInfo) (*data.BucketSettings, error)

func (*TreeClient) GetUnversioned added in v0.22.0

func (c *TreeClient) GetUnversioned(ctx context.Context, bktInfo *data.BucketInfo, filepath string) (*data.NodeVersion, error)

func (*TreeClient) GetVersions added in v0.22.0

func (c *TreeClient) GetVersions(ctx context.Context, bktInfo *data.BucketInfo, filepath string) ([]*data.NodeVersion, error)

func (*TreeClient) PutBucketCORS added in v0.22.0

func (c *TreeClient) PutBucketCORS(ctx context.Context, bktInfo *data.BucketInfo, objID oid.ID) (oid.ID, error)

func (*TreeClient) PutBucketTagging added in v0.22.0

func (c *TreeClient) PutBucketTagging(ctx context.Context, bktInfo *data.BucketInfo, tagSet map[string]string) error

func (*TreeClient) PutLock added in v0.22.0

func (c *TreeClient) PutLock(ctx context.Context, bktInfo *data.BucketInfo, nodeID uint64, lock *data.LockInfo) error

func (*TreeClient) PutNotificationConfigurationNode added in v0.22.0

func (c *TreeClient) PutNotificationConfigurationNode(ctx context.Context, bktInfo *data.BucketInfo, objID oid.ID) (oid.ID, error)

func (*TreeClient) PutObjectTagging added in v0.22.0

func (c *TreeClient) PutObjectTagging(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion, tagSet map[string]string) error

func (*TreeClient) PutSettingsNode added in v0.22.0

func (c *TreeClient) PutSettingsNode(ctx context.Context, bktInfo *data.BucketInfo, settings *data.BucketSettings) error

func (*TreeClient) RemoveVersion added in v0.22.0

func (c *TreeClient) RemoveVersion(ctx context.Context, bktInfo *data.BucketInfo, id uint64) error

type TreeNode added in v0.22.0

type TreeNode struct {
	ID        uint64
	ParentID  uint64
	ObjID     oid.ID
	TimeStamp uint64
	Size      int64
	Meta      map[string]string
}

func (*TreeNode) FileName added in v0.22.0

func (n *TreeNode) FileName() (string, bool)

func (*TreeNode) Get added in v0.22.0

func (n *TreeNode) Get(key string) (string, bool)

Jump to

Keyboard shortcuts

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