headers

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// TypeLink is the type of object reference header.
	TypeLink

	// TypeUser is the of user key-value string header.
	TypeUser

	// TypeTransform is the type of transformation mark header.
	TypeTransform

	// TypeTombstone is the type of tombstone mark header.
	TypeTombstone

	// TypeSessionToken is the type of session token header.
	TypeSessionToken

	// TypeHomomorphicHash is the type of homomorphic hash header.
	TypeHomomorphicHash

	// TypePayloadChecksum is the type of payload checksum header.
	TypePayloadChecksum

	// TypeIntegrity is the type of integrity header.
	TypeIntegrity

	// TypeStorageGroup is the type of storage group header.
	TypeStorageGroup

	// TypePublicKey is the type of public key header.
	TypePublicKey
)

Variables

This section is empty.

Functions

func SupportedType

func SupportedType(t Type) bool

SupportedType returns true if Type is the known type of extended header. Each supported type has named constant.

Types

type Header = object.ExtendedHeader

Header represents object extended header.

It is a type alias of github.com/nspcc-dev/neofs-node/pkg/core/object.ExtendedHeader.

func NewUserHeader

func NewUserHeader(key, val string) *Header

NewUserHeader creates, initialized and returns the user extended header.

type Type

Type represents extended header type.

It is a type alias of github.com/nspcc-dev/neofs-node/pkg/core/object.ExtendedHeaderType.

type UserHeader

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

UserHeader is a value of object extended header that carries user string key-value pairs.

All user headers must be type of TypeUser. All user header must have UserHeader pointer value.

func (UserHeader) Key

func (u UserHeader) Key() string

Key returns the user header key.

func (*UserHeader) SetKey

func (u *UserHeader) SetKey(key string)

SetKey sets the user header key.

func (*UserHeader) SetValue

func (u *UserHeader) SetValue(val string)

SetValue sets the user header value.

func (UserHeader) Value

func (u UserHeader) Value() string

Value returns the user header value.

Jump to

Keyboard shortcuts

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