Documentation ¶
Index ¶
- Constants
- Variables
- type DummySubTreeStream
- type GetNodesParams
- type Meta
- type NodeResponse
- type ServiceClient
- type ServiceClientMemory
- func (c *ServiceClientMemory) AddNode(ctx context.Context, bktInfo *data.BucketInfo, treeID string, parent uint64, ...) (uint64, error)
- func (c *ServiceClientMemory) AddNodeBase(_ context.Context, bktInfo *data.BucketInfo, treeID string, parent uint64, ...) (uint64, error)
- func (c *ServiceClientMemory) AddNodeByPath(_ context.Context, bktInfo *data.BucketInfo, treeID string, path []string, ...) (uint64, error)
- func (c *ServiceClientMemory) GetNodes(_ context.Context, p *GetNodesParams) ([]NodeResponse, error)
- func (c *ServiceClientMemory) GetSubTree(_ context.Context, bktInfo *data.BucketInfo, treeID string, rootID uint64, ...) ([]NodeResponse, error)
- func (c *ServiceClientMemory) GetSubTreeStream(_ context.Context, bktInfo *data.BucketInfo, treeID string, rootID uint64, ...) (SubTreeStream, error)
- func (c *ServiceClientMemory) MoveNode(_ context.Context, bktInfo *data.BucketInfo, treeID string, ...) error
- func (c *ServiceClientMemory) RemoveNode(_ context.Context, bktInfo *data.BucketInfo, treeID string, nodeID uint64) error
- type SubTreeStream
- type SubTreeStreamMemoryImpl
- type Tree
- func (c *Tree) AddPart(ctx context.Context, bktInfo *data.BucketInfo, multipartNodeID uint64, ...) (oldObjIDToDelete oid.ID, err error)
- func (c *Tree) AddVersion(ctx context.Context, bktInfo *data.BucketInfo, version *data.NodeVersion) (uint64, error)
- func (c *Tree) CreateMultipartUpload(ctx context.Context, bktInfo *data.BucketInfo, info *data.MultipartInfo) error
- func (c *Tree) DeleteBucketCORS(ctx context.Context, bktInfo *data.BucketInfo) (oid.ID, error)
- func (c *Tree) DeleteBucketTagging(ctx context.Context, bktInfo *data.BucketInfo) error
- func (c *Tree) DeleteMultipartUpload(ctx context.Context, bktInfo *data.BucketInfo, ...) error
- func (c *Tree) DeleteObjectTagging(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion) error
- func (c *Tree) GetBucketCORS(ctx context.Context, bktInfo *data.BucketInfo) (oid.ID, error)
- func (c *Tree) GetBucketTagging(ctx context.Context, bktInfo *data.BucketInfo) (map[string]string, error)
- func (c *Tree) GetLatestVersion(ctx context.Context, bktInfo *data.BucketInfo, objectName string) (*data.NodeVersion, error)
- func (c *Tree) GetLock(ctx context.Context, bktInfo *data.BucketInfo, nodeID uint64) (*data.LockInfo, error)
- func (c *Tree) GetMultipartUpload(ctx context.Context, bktInfo *data.BucketInfo, objectName, uploadID string) (*data.MultipartInfo, error)
- func (c *Tree) GetMultipartUploadsByPrefix(ctx context.Context, bktInfo *data.BucketInfo, prefix string) ([]*data.MultipartInfo, error)
- func (c *Tree) GetNotificationConfigurationNode(ctx context.Context, bktInfo *data.BucketInfo) (oid.ID, error)
- func (c *Tree) GetObjectTagging(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion) (map[string]string, error)
- func (c *Tree) GetObjectTaggingAndLock(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion) (map[string]string, *data.LockInfo, error)
- func (c *Tree) GetParts(ctx context.Context, bktInfo *data.BucketInfo, multipartNodeID uint64) ([]*data.PartInfo, error)
- func (c *Tree) GetSettingsNode(ctx context.Context, bktInfo *data.BucketInfo) (*data.BucketSettings, error)
- func (c *Tree) GetUnversioned(ctx context.Context, bktInfo *data.BucketInfo, filepath string) (*data.NodeVersion, error)
- func (c *Tree) GetVersions(ctx context.Context, bktInfo *data.BucketInfo, filepath string) ([]*data.NodeVersion, error)
- func (c *Tree) InitVersionsByPrefixStream(ctx context.Context, bktInfo *data.BucketInfo, prefix string, latestOnly bool) (data.VersionsStream, error)
- func (c *Tree) PutBucketCORS(ctx context.Context, bktInfo *data.BucketInfo, objID oid.ID) (oid.ID, error)
- func (c *Tree) PutBucketTagging(ctx context.Context, bktInfo *data.BucketInfo, tagSet map[string]string) error
- func (c *Tree) PutLock(ctx context.Context, bktInfo *data.BucketInfo, nodeID uint64, ...) error
- func (c *Tree) PutNotificationConfigurationNode(ctx context.Context, bktInfo *data.BucketInfo, objID oid.ID) (oid.ID, error)
- func (c *Tree) PutObjectTagging(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion, ...) error
- func (c *Tree) PutSettingsNode(ctx context.Context, bktInfo *data.BucketInfo, settings *data.BucketSettings) error
- func (c *Tree) RemoveVersion(ctx context.Context, bktInfo *data.BucketInfo, id uint64) error
- type VersionsByPrefixStreamImpl
Constants ¶
View Source
const (
FileNameKey = "FileName"
)
Variables ¶
View Source
var ( // ErrNodeNotFound is returned from ServiceClient in case of not found error. ErrNodeNotFound = layer.ErrNodeNotFound // ErrNodeAccessDenied is returned from ServiceClient service in case of access denied error. ErrNodeAccessDenied = layer.ErrNodeAccessDenied // ErrGatewayTimeout is returned from ServiceClient service in case of timeout error. ErrGatewayTimeout = layer.ErrGatewayTimeout )
Functions ¶
This section is empty.
Types ¶
type DummySubTreeStream ¶ added in v0.29.0
type DummySubTreeStream struct {
// contains filtered or unexported fields
}
func (*DummySubTreeStream) Next ¶ added in v0.29.0
func (s *DummySubTreeStream) Next() (NodeResponse, error)
type GetNodesParams ¶
type NodeResponse ¶
type ServiceClient ¶
type ServiceClient interface { GetNodes(ctx context.Context, p *GetNodesParams) ([]NodeResponse, error) GetSubTree(ctx context.Context, bktInfo *data.BucketInfo, treeID string, rootID uint64, depth uint32) ([]NodeResponse, error) GetSubTreeStream(ctx context.Context, bktInfo *data.BucketInfo, treeID string, rootID uint64, depth uint32) (SubTreeStream, error) AddNode(ctx context.Context, bktInfo *data.BucketInfo, treeID string, parent uint64, meta map[string]string) (uint64, error) AddNodeByPath(ctx context.Context, bktInfo *data.BucketInfo, treeID string, path []string, meta map[string]string) (uint64, error) MoveNode(ctx context.Context, bktInfo *data.BucketInfo, treeID string, nodeID, parentID uint64, meta map[string]string) error RemoveNode(ctx context.Context, bktInfo *data.BucketInfo, treeID string, nodeID uint64) error }
ServiceClient is a client to interact with tree service. Each method must return ErrNodeNotFound or ErrNodeAccessDenied if relevant.
type ServiceClientMemory ¶
type ServiceClientMemory struct {
// contains filtered or unexported fields
}
func NewTreeServiceClientMemory ¶
func NewTreeServiceClientMemory() (*ServiceClientMemory, error)
func (*ServiceClientMemory) AddNodeBase ¶ added in v0.29.0
func (*ServiceClientMemory) AddNodeByPath ¶
func (*ServiceClientMemory) GetNodes ¶
func (c *ServiceClientMemory) GetNodes(_ context.Context, p *GetNodesParams) ([]NodeResponse, error)
func (*ServiceClientMemory) GetSubTree ¶
func (c *ServiceClientMemory) GetSubTree(_ context.Context, bktInfo *data.BucketInfo, treeID string, rootID uint64, depth uint32) ([]NodeResponse, error)
func (*ServiceClientMemory) GetSubTreeStream ¶ added in v0.29.0
func (c *ServiceClientMemory) GetSubTreeStream(_ context.Context, bktInfo *data.BucketInfo, treeID string, rootID uint64, depth uint32) (SubTreeStream, error)
func (*ServiceClientMemory) MoveNode ¶
func (c *ServiceClientMemory) MoveNode(_ context.Context, bktInfo *data.BucketInfo, treeID string, nodeID, parentID uint64, meta map[string]string) error
func (*ServiceClientMemory) RemoveNode ¶
func (c *ServiceClientMemory) RemoveNode(_ context.Context, bktInfo *data.BucketInfo, treeID string, nodeID uint64) error
type SubTreeStream ¶ added in v0.29.0
type SubTreeStream interface {
Next() (NodeResponse, error)
}
type SubTreeStreamMemoryImpl ¶ added in v0.29.0
type SubTreeStreamMemoryImpl struct {
// contains filtered or unexported fields
}
func (*SubTreeStreamMemoryImpl) Next ¶ added in v0.29.0
func (s *SubTreeStreamMemoryImpl) Next() (NodeResponse, error)
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
func NewTree ¶
func NewTree(service ServiceClient, log *zap.Logger) *Tree
NewTree creates instance of Tree using provided address and create grpc connection.
func (*Tree) AddVersion ¶
func (c *Tree) AddVersion(ctx context.Context, bktInfo *data.BucketInfo, version *data.NodeVersion) (uint64, error)
func (*Tree) CreateMultipartUpload ¶
func (c *Tree) CreateMultipartUpload(ctx context.Context, bktInfo *data.BucketInfo, info *data.MultipartInfo) error
func (*Tree) DeleteBucketCORS ¶
func (*Tree) DeleteBucketTagging ¶
func (*Tree) DeleteMultipartUpload ¶
func (c *Tree) DeleteMultipartUpload(ctx context.Context, bktInfo *data.BucketInfo, multipartInfo *data.MultipartInfo) error
func (*Tree) DeleteObjectTagging ¶
func (c *Tree) DeleteObjectTagging(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion) error
func (*Tree) GetBucketCORS ¶
func (*Tree) GetBucketTagging ¶
func (*Tree) GetLatestVersion ¶
func (c *Tree) GetLatestVersion(ctx context.Context, bktInfo *data.BucketInfo, objectName string) (*data.NodeVersion, error)
func (*Tree) GetMultipartUpload ¶
func (c *Tree) GetMultipartUpload(ctx context.Context, bktInfo *data.BucketInfo, objectName, uploadID string) (*data.MultipartInfo, error)
func (*Tree) GetMultipartUploadsByPrefix ¶
func (c *Tree) GetMultipartUploadsByPrefix(ctx context.Context, bktInfo *data.BucketInfo, prefix string) ([]*data.MultipartInfo, error)
func (*Tree) GetNotificationConfigurationNode ¶
func (*Tree) GetObjectTagging ¶
func (c *Tree) GetObjectTagging(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion) (map[string]string, error)
func (*Tree) GetObjectTaggingAndLock ¶
func (*Tree) GetSettingsNode ¶
func (c *Tree) GetSettingsNode(ctx context.Context, bktInfo *data.BucketInfo) (*data.BucketSettings, error)
func (*Tree) GetUnversioned ¶
func (c *Tree) GetUnversioned(ctx context.Context, bktInfo *data.BucketInfo, filepath string) (*data.NodeVersion, error)
func (*Tree) GetVersions ¶
func (c *Tree) GetVersions(ctx context.Context, bktInfo *data.BucketInfo, filepath string) ([]*data.NodeVersion, error)
func (*Tree) InitVersionsByPrefixStream ¶ added in v0.29.0
func (c *Tree) InitVersionsByPrefixStream(ctx context.Context, bktInfo *data.BucketInfo, prefix string, latestOnly bool) (data.VersionsStream, error)
func (*Tree) PutBucketCORS ¶
func (*Tree) PutBucketTagging ¶
func (*Tree) PutNotificationConfigurationNode ¶
func (*Tree) PutObjectTagging ¶
func (c *Tree) PutObjectTagging(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion, tagSet map[string]string) error
func (*Tree) PutSettingsNode ¶
func (c *Tree) PutSettingsNode(ctx context.Context, bktInfo *data.BucketInfo, settings *data.BucketSettings) error
func (*Tree) RemoveVersion ¶
type VersionsByPrefixStreamImpl ¶ added in v0.29.0
type VersionsByPrefixStreamImpl struct {
// contains filtered or unexported fields
}
func (*VersionsByPrefixStreamImpl) Next ¶ added in v0.29.0
func (s *VersionsByPrefixStreamImpl) Next(context.Context) (*data.NodeVersion, error)
Click to show internal directories.
Click to hide internal directories.