relations

package
v1.0.0-rc.11 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

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

func Get

func Get(ctx context.Context, executor Executor, containerID cid.ID, rootObjectID oid.ID, tokens Tokens, signer user.Signer) ([]oid.ID, *oid.ID, error)

Get returns all related phy objects for provided root object ID in split-chain order, without linking object id. If linking object is found its id will be returned in the second result variable.

Result doesn't include root object ID itself.

Types

type Executor

type Executor interface {
	HeadExecutor
	SearchExecutor
}

Executor describes all methods required to find all siblings for object.

type HeadExecutor

type HeadExecutor interface {
	ObjectHead(ctx context.Context, containerID cid.ID, objectID oid.ID, signer user.Signer, prm client.PrmObjectHead) (*object.Object, error)
}

HeadExecutor describes methods to get object head.

type SearchExecutor

type SearchExecutor interface {
	ObjectSearchInit(ctx context.Context, containerID cid.ID, signer user.Signer, prm client.PrmObjectSearch) (*client.ObjectListReader, error)
}

SearchExecutor describes methods to search objects.

type Tokens

type Tokens struct {
	Session *session.Object
	Bearer  *bearer.Token
}

Tokens contains different tokens to perform requests in Relations implementations.

Jump to

Keyboard shortcuts

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