object

package
v0.14.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: GPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyRemoved = errors.New("object already removed")

ErrAlreadyRemoved returned when object has tombstone in graveyard.

View Source
var ErrNotFound = errors.New("object not found")

ErrNotFound is a basic "not found" error returned by object read functions.

View Source
var ErrRangeOutOfBounds = errors.New("payload range is out of bounds")

ErrRangeOutOfBounds is a basic error of violation of the boundaries of the payload of an object.

Functions

This section is empty.

Types

type DeleteHandler added in v0.12.0

type DeleteHandler interface {
	DeleteObjects(*object.Address, ...*object.Address)
}

DeleteHandler is an interface of delete queue processor.

type FormatValidator added in v0.12.0

type FormatValidator struct {
	// contains filtered or unexported fields
}

FormatValidator represents object format validator.

func NewFormatValidator added in v0.12.0

func NewFormatValidator(opts ...FormatValidatorOption) *FormatValidator

NewFormatValidator creates, initializes and returns FormatValidator instance.

func (*FormatValidator) Validate added in v0.12.0

func (v *FormatValidator) Validate(obj *Object) error

Validate validates object format.

Does not validate payload checksum and content.

Returns nil error if object has valid structure.

func (*FormatValidator) ValidateContent added in v0.12.0

func (v *FormatValidator) ValidateContent(o *Object) error

ValidateContent validates payload content according to object type.

type FormatValidatorOption added in v0.12.0

type FormatValidatorOption func(*cfg)

FormatValidatorOption represents FormatValidator constructor option.

func WithDeleteHandler added in v0.12.0

func WithDeleteHandler(v DeleteHandler) FormatValidatorOption

WithDeleteHandler returns option to set delete queue processor.

type Object

type Object struct {
	*object.Object
}

Object represents the NeoFS object.

Object inherits object type from NeoFS SDK. It is used to implement some useful methods and functions for convenient processing of an object by a node.

func New added in v0.12.0

func New() *Object

New constructs blank Object instance.

func NewFromSDK added in v0.12.0

func NewFromSDK(obj *object.Object) *Object

NewFromSDK constructs Object instance from NeoFS SDK Object.

func NewFromV2 added in v0.12.0

func NewFromV2(obj *objectV2.Object) *Object

NewFromV2 constructs Object instance from v2 Object message.

func (*Object) Address added in v0.12.0

func (o *Object) Address() *object.Address

Address returns address of the object.

func (*Object) GetParent added in v0.12.0

func (o *Object) GetParent() *Object

GetParent returns parent object.

func (*Object) SDK added in v0.12.0

func (o *Object) SDK() *object.Object

SDK returns NeoFS SDK object instance.

type RawObject added in v0.12.0

type RawObject struct {
	*object.RawObject
}

RawObject represents the raw NeoFS object.

RawObject inherits RawObject type from NeoFS SDK. It is used to implement some useful methods and functions for convenient processing of a raw object by a node.

func NewRaw added in v0.12.0

func NewRaw() *RawObject

NewRaw constructs blank RawObject instance.

func NewRawFrom added in v0.12.0

func NewRawFrom(obj *object.RawObject) *RawObject

NewRawFrom constructs RawObject instance from NeoFS SDK RawObject.

func NewRawFromObject added in v0.12.0

func NewRawFromObject(obj *Object) *RawObject

NewRawFromObject wraps Object instance to RawObject.

func NewRawFromV2 added in v0.12.0

func NewRawFromV2(obj *objectV2.Object) *RawObject

NewRawFromV2 constructs RawObject instance from v2 Object message.

func (*RawObject) CutPayload added in v0.12.0

func (o *RawObject) CutPayload() *RawObject

CutPayload returns RawObject w/ empty payload.

Changes of non-payload fields affect source object.

func (*RawObject) Object added in v0.12.0

func (o *RawObject) Object() *Object

Object converts RawObject to read-only Object instance.

func (*RawObject) SDK added in v0.12.0

func (o *RawObject) SDK() *object.RawObject

SDK converts RawObject to NeoFS SDK RawObject instance.

Jump to

Keyboard shortcuts

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