Documentation
¶
Index ¶
- Constants
- Variables
- func GetFilename(node NodeResponse) string
- type GetNodesParams
- type Meta
- type MultiID
- type NodeResponse
- type ServiceClient
- type Tree
- func (c *Tree) CheckSettingsNodeExists(ctx context.Context, bktInfo *data.BucketInfo) error
- func (c *Tree) GetLatestVersion(ctx context.Context, cnrID *cid.ID, objectName string) (*data.NodeVersion, error)
- func (c *Tree) GetSubTreeByPrefix(ctx context.Context, bktInfo *data.BucketInfo, prefix *string, latestOnly bool) ([]data.NodeInfo, 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 = errors.New("not found") // ErrNodeAccessDenied is returned from ServiceClient service in case of access denied error. ErrNodeAccessDenied = errors.New("access denied") )
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, log *zap.Logger) *Tree
NewTree creates instance of Tree using provided address and create grpc connection.
func (*Tree) CheckSettingsNodeExists ¶ added in v0.32.0
func (*Tree) GetLatestVersion ¶
func (*Tree) GetSubTreeByPrefix ¶ added in v0.31.0
func (*Tree) GetVersions ¶ added in v0.31.0
Click to show internal directories.
Click to hide internal directories.