Documentation ¶
Overview ¶
Package relations provides feature to process inner object structure.
Relations is an interface of entity that can receive object header or the information about the object relations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoLeftSibling is an error that must be returned if object doesn't have left sibling in objects chain. ErrNoLeftSibling = errors.New("no left siblings") // ErrNoSplitInfo is an error that must be returned if requested object isn't virtual. ErrNoSplitInfo = errors.New("no split info") )
Functions ¶
Types ¶
type Relations ¶
type Relations interface { // GetSplitInfo tries to get split info by root object id. // If object isn't virtual it returns ErrNoSplitInfo. GetSplitInfo(ctx context.Context, cnrID cid.ID, rootID oid.ID, tokens Tokens) (*object.SplitInfo, error) // ListChildrenByLinker returns list of children for link object. // Result doesn't include link object itself. ListChildrenByLinker(ctx context.Context, cnrID cid.ID, linkerID oid.ID, tokens Tokens) ([]oid.ID, error) // GetLeftSibling return previous object id in object chain. // If no previous object it returns ErrNoLeftSibling. GetLeftSibling(ctx context.Context, cnrID cid.ID, objID oid.ID, tokens Tokens) (oid.ID, error) // FindSiblingBySplitID returns all objects that relates to the provided split id. FindSiblingBySplitID(ctx context.Context, cnrID cid.ID, splitID *object.SplitID, tokens Tokens) ([]oid.ID, error) // FindSiblingByParentID returns all object that relates to the provided parent id. FindSiblingByParentID(ctx context.Context, cnrID cid.ID, parentID oid.ID, tokens Tokens) ([]oid.ID, error) }
Click to show internal directories.
Click to hide internal directories.