Documentation ¶
Index ¶
- Constants
- Variables
- func GetFilename(node NodeResponse) string
- type GetNodesParams
- type Meta
- type MultiID
- type NodeResponse
- type ServiceClient
- type Tree
- func (c *Tree) GetLatestVersion(ctx context.Context, cnrID *cid.ID, objectName string) (*api.NodeVersion, error)
- func (c *Tree) GetSubTreeByPrefix(ctx context.Context, bktInfo *data.BucketInfo, prefix string, latestOnly bool) ([]NodeResponse, string, error)
- func (c *Tree) GetVersions(ctx context.Context, cnrID *cid.ID, objectName string) ([]NodeResponse, error)
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 )
Functions ¶
func GetFilename ¶ added in v0.31.0
func GetFilename(node NodeResponse) string
Types ¶
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, sort bool) ([]NodeResponse, error) }
ServiceClient is a client to interact with tree service. Each method must return ErrNodeNotFound or ErrNodeAccessDenied if relevant.
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
func NewTree ¶
func NewTree(service ServiceClient) *Tree
NewTree creates instance of Tree using provided address and create grpc connection.
func (*Tree) GetLatestVersion ¶
func (*Tree) GetSubTreeByPrefix ¶ added in v0.31.0
func (c *Tree) GetSubTreeByPrefix(ctx context.Context, bktInfo *data.BucketInfo, prefix string, latestOnly bool) ([]NodeResponse, string, error)
func (*Tree) GetVersions ¶ added in v0.31.0
Click to show internal directories.
Click to hide internal directories.