object

package
v0.12.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteHandler added in v0.12.0

type DeleteHandler interface {
	DeleteObjects(...*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(t object.Type, payload []byte) 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 FromBytes

func FromBytes(data []byte) (*Object, error)

FromBytes restores Object from binary format.

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.

type TombstoneContent added in v0.12.0

type TombstoneContent TombstoneContentV2

func NewTombstoneContent added in v0.12.0

func NewTombstoneContent() *TombstoneContent

func NewTombstoneContentFromV2 added in v0.12.0

func NewTombstoneContentFromV2(cV2 *TombstoneContentV2) *TombstoneContent

func TombstoneContentFromBytes added in v0.12.0

func TombstoneContentFromBytes(data []byte) (*TombstoneContent, error)

func (*TombstoneContent) GetAddressList added in v0.12.0

func (c *TombstoneContent) GetAddressList() []*object.Address

func (*TombstoneContent) MarshalBinary added in v0.12.0

func (c *TombstoneContent) MarshalBinary() ([]byte, error)

func (*TombstoneContent) SetAddressList added in v0.12.0

func (c *TombstoneContent) SetAddressList(v ...*object.Address)

func (*TombstoneContent) ToV2 added in v0.12.0

type TombstoneContentV2 added in v0.12.0

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

func (*TombstoneContentV2) GetAddressList added in v0.12.0

func (c *TombstoneContentV2) GetAddressList() []*refs.Address

func (*TombstoneContentV2) SetAddressList added in v0.12.0

func (c *TombstoneContentV2) SetAddressList(v []*refs.Address)

func (*TombstoneContentV2) StableMarshal added in v0.12.0

func (c *TombstoneContentV2) StableMarshal(buf []byte) ([]byte, error)

func (*TombstoneContentV2) StableSize added in v0.12.0

func (c *TombstoneContentV2) StableSize() (sz int)

func (*TombstoneContentV2) StableUnmarshal added in v0.12.0

func (c *TombstoneContentV2) StableUnmarshal(data []byte) error

Jump to

Keyboard shortcuts

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