container

package
v0.0.0-...-0352b5b Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// SysAttributeName is a string of human-friendly container name registered as the domain in NNS contract.
	SysAttributeName = SysAttributePrefix + "NAME"

	// SysAttributeZone is a string of zone for container name.
	SysAttributeZone = SysAttributePrefix + "ZONE"

	// SysAttributeHomomorphicHashing is a container's homomorphic hashing state.
	SysAttributeHomomorphicHashing = SysAttributePrefix + "DISABLE_HOMOMORPHIC_HASHING"
)
View Source
const (
	// SysAttributeNameNeoFS is a string of human-friendly container name registered as the domain in NNS contract.
	// Deprecated: use SysAttributeName.
	SysAttributeNameNeoFS = SysAttributePrefixNeoFS + "NAME"

	// SysAttributeZoneNeoFS is a string of zone for container name.
	// Deprecated: use SysAttributeZone.
	SysAttributeZoneNeoFS = SysAttributePrefixNeoFS + "ZONE"

	// SysAttributeHomomorphicHashingNeoFS is a container's homomorphic hashing state.
	// Deprecated: use SysAttributeHomomorphicHashing.
	SysAttributeHomomorphicHashingNeoFS = SysAttributePrefixNeoFS + "DISABLE_HOMOMORPHIC_HASHING"
)
View Source
const (
	// StatusNotFound is a local status.Code value for
	// CONTAINER_NOT_FOUND container failure.
	StatusNotFound status.Code = iota

	// StatusEACLNotFound is a local status.Code value for
	// EACL_NOT_FOUND failure.
	StatusEACLNotFound
)
View Source
const SysAttributePrefix = "__SYSTEM__"

SysAttributePrefix is a prefix of key to system attribute.

View Source
const SysAttributePrefixNeoFS = "__NEOFS__"

SysAttributePrefixNeoFS is a prefix of key to system attribute. Deprecated: use SysAttributePrefix.

View Source
const SysAttributeZoneDefault = "container"

SysAttributeZoneDefault is a default value for SysAttributeZone attribute.

Variables

This section is empty.

Functions

func AttributesToGRPC

func AttributesToGRPC(xs []Attribute) (res []container.Container_Attribute)

func GlobalizeFail

func GlobalizeFail(c *status.Code)

GlobalizeFail globalizes local code of container failure.

Arg must not be nil.

func LocalizeFailStatus

func LocalizeFailStatus(c *status.Code) bool

LocalizeFailStatus checks if passed global status.Code is related to container failure and:

then localizes the code and returns true,
else leaves the code unchanged and returns false.

Arg must not be nil.

Types

type Attribute

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

func AttributesFromGRPC

func AttributesFromGRPC(xs []container.Container_Attribute) (res []Attribute, err error)

func (*Attribute) FromGRPCMessage

func (a *Attribute) FromGRPCMessage(m grpc.Message) error

func (*Attribute) GetKey

func (a *Attribute) GetKey() string

func (*Attribute) GetValue

func (a *Attribute) GetValue() string

func (*Attribute) MarshalJSON

func (a *Attribute) MarshalJSON() ([]byte, error)

func (*Attribute) SetKey

func (a *Attribute) SetKey(v string)

func (*Attribute) SetValue

func (a *Attribute) SetValue(v string)

func (*Attribute) StableMarshal

func (a *Attribute) StableMarshal(buf []byte) []byte

func (*Attribute) StableSize

func (a *Attribute) StableSize() (size int)

func (*Attribute) ToGRPCMessage

func (a *Attribute) ToGRPCMessage() grpc.Message

func (*Attribute) Unmarshal

func (a *Attribute) Unmarshal(data []byte) error

func (*Attribute) UnmarshalJSON

func (a *Attribute) UnmarshalJSON(data []byte) error

type Container

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

func (*Container) FromGRPCMessage

func (c *Container) FromGRPCMessage(m grpc.Message) error

func (*Container) GetAttributes

func (c *Container) GetAttributes() []Attribute

func (*Container) GetBasicACL

func (c *Container) GetBasicACL() uint32

func (*Container) GetNonce

func (c *Container) GetNonce() []byte

func (*Container) GetOwnerID

func (c *Container) GetOwnerID() *refs.OwnerID

func (*Container) GetPlacementPolicy

func (c *Container) GetPlacementPolicy() *netmap.PlacementPolicy

func (*Container) GetVersion

func (c *Container) GetVersion() *refs.Version

func (Container) HomomorphicHashingState

func (c Container) HomomorphicHashingState() bool

HomomorphicHashingState returns container's homomorphic hashing state:

  • true if hashing is enabled;
  • false if hashing is disabled.

All container's attributes must be unique, otherwise behavior is undefined.

See also SetHomomorphicHashingState.

func (*Container) MarshalJSON

func (c *Container) MarshalJSON() ([]byte, error)

func (*Container) SetAttributes

func (c *Container) SetAttributes(v []Attribute)

func (*Container) SetBasicACL

func (c *Container) SetBasicACL(v uint32)

func (*Container) SetHomomorphicHashingState

func (c *Container) SetHomomorphicHashingState(enable bool)

SetHomomorphicHashingState sets homomorphic hashing state for container.

All container's attributes must be unique, otherwise behavior is undefined.

See also HomomorphicHashingState.

func (*Container) SetNonce

func (c *Container) SetNonce(v []byte)

func (*Container) SetOwnerID

func (c *Container) SetOwnerID(v *refs.OwnerID)

func (*Container) SetPlacementPolicy

func (c *Container) SetPlacementPolicy(v *netmap.PlacementPolicy)

func (*Container) SetVersion

func (c *Container) SetVersion(v *refs.Version)

func (*Container) StableMarshal

func (c *Container) StableMarshal(buf []byte) []byte

func (*Container) StableSize

func (c *Container) StableSize() (size int)

func (*Container) ToGRPCMessage

func (c *Container) ToGRPCMessage() grpc.Message

func (*Container) Unmarshal

func (c *Container) Unmarshal(data []byte) error

func (*Container) UnmarshalJSON

func (c *Container) UnmarshalJSON(data []byte) error

type DeleteRequest

type DeleteRequest struct {
	session.RequestHeaders
	// contains filtered or unexported fields
}

func (*DeleteRequest) FromGRPCMessage

func (r *DeleteRequest) FromGRPCMessage(m grpc.Message) error

func (*DeleteRequest) GetBody

func (r *DeleteRequest) GetBody() *DeleteRequestBody

func (*DeleteRequest) SetBody

func (r *DeleteRequest) SetBody(v *DeleteRequestBody)

func (*DeleteRequest) ToGRPCMessage

func (r *DeleteRequest) ToGRPCMessage() grpc.Message

type DeleteRequestBody

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

func (*DeleteRequestBody) FromGRPCMessage

func (r *DeleteRequestBody) FromGRPCMessage(m grpc.Message) error

func (*DeleteRequestBody) GetContainerID

func (r *DeleteRequestBody) GetContainerID() *refs.ContainerID

func (*DeleteRequestBody) GetSignature

func (r *DeleteRequestBody) GetSignature() *refs.Signature

func (*DeleteRequestBody) SetContainerID

func (r *DeleteRequestBody) SetContainerID(v *refs.ContainerID)

func (*DeleteRequestBody) SetSignature

func (r *DeleteRequestBody) SetSignature(v *refs.Signature)

func (*DeleteRequestBody) StableMarshal

func (r *DeleteRequestBody) StableMarshal(buf []byte) []byte

func (*DeleteRequestBody) StableSize

func (r *DeleteRequestBody) StableSize() (size int)

func (*DeleteRequestBody) ToGRPCMessage

func (r *DeleteRequestBody) ToGRPCMessage() grpc.Message

func (*DeleteRequestBody) Unmarshal

func (r *DeleteRequestBody) Unmarshal(data []byte) error

type DeleteResponse

type DeleteResponse struct {
	session.ResponseHeaders
	// contains filtered or unexported fields
}

func (*DeleteResponse) FromGRPCMessage

func (r *DeleteResponse) FromGRPCMessage(m grpc.Message) error

func (*DeleteResponse) GetBody

func (r *DeleteResponse) GetBody() *DeleteResponseBody

func (*DeleteResponse) SetBody

func (r *DeleteResponse) SetBody(v *DeleteResponseBody)

func (*DeleteResponse) ToGRPCMessage

func (r *DeleteResponse) ToGRPCMessage() grpc.Message

type DeleteResponseBody

type DeleteResponseBody struct{}

func (*DeleteResponseBody) FromGRPCMessage

func (r *DeleteResponseBody) FromGRPCMessage(m grpc.Message) error

func (*DeleteResponseBody) StableMarshal

func (r *DeleteResponseBody) StableMarshal(_ []byte) []byte

func (*DeleteResponseBody) StableSize

func (r *DeleteResponseBody) StableSize() (size int)

func (*DeleteResponseBody) ToGRPCMessage

func (r *DeleteResponseBody) ToGRPCMessage() grpc.Message

func (*DeleteResponseBody) Unmarshal

func (r *DeleteResponseBody) Unmarshal([]byte) error

type GetRequest

type GetRequest struct {
	session.RequestHeaders
	// contains filtered or unexported fields
}

func (*GetRequest) FromGRPCMessage

func (r *GetRequest) FromGRPCMessage(m grpc.Message) error

func (*GetRequest) GetBody

func (r *GetRequest) GetBody() *GetRequestBody

func (*GetRequest) SetBody

func (r *GetRequest) SetBody(v *GetRequestBody)

func (*GetRequest) ToGRPCMessage

func (r *GetRequest) ToGRPCMessage() grpc.Message

type GetRequestBody

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

func (*GetRequestBody) FromGRPCMessage

func (r *GetRequestBody) FromGRPCMessage(m grpc.Message) error

func (*GetRequestBody) GetContainerID

func (r *GetRequestBody) GetContainerID() *refs.ContainerID

func (*GetRequestBody) SetContainerID

func (r *GetRequestBody) SetContainerID(v *refs.ContainerID)

func (*GetRequestBody) StableMarshal

func (r *GetRequestBody) StableMarshal(buf []byte) []byte

func (*GetRequestBody) StableSize

func (r *GetRequestBody) StableSize() (size int)

func (*GetRequestBody) ToGRPCMessage

func (r *GetRequestBody) ToGRPCMessage() grpc.Message

func (*GetRequestBody) Unmarshal

func (r *GetRequestBody) Unmarshal(data []byte) error

type GetResponse

type GetResponse struct {
	session.ResponseHeaders
	// contains filtered or unexported fields
}

func (*GetResponse) FromGRPCMessage

func (r *GetResponse) FromGRPCMessage(m grpc.Message) error

func (*GetResponse) GetBody

func (r *GetResponse) GetBody() *GetResponseBody

func (*GetResponse) SetBody

func (r *GetResponse) SetBody(v *GetResponseBody)

func (*GetResponse) ToGRPCMessage

func (r *GetResponse) ToGRPCMessage() grpc.Message

type GetResponseBody

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

func (*GetResponseBody) FromGRPCMessage

func (r *GetResponseBody) FromGRPCMessage(m grpc.Message) error

func (*GetResponseBody) GetContainer

func (r *GetResponseBody) GetContainer() *Container

func (*GetResponseBody) GetSessionToken

func (r *GetResponseBody) GetSessionToken() *session.Token

GetSessionToken returns token of the session within which requested container was created.

func (*GetResponseBody) GetSignature

func (r *GetResponseBody) GetSignature() *refs.Signature

GetSignature returns signature of the requested container.

func (*GetResponseBody) SetContainer

func (r *GetResponseBody) SetContainer(v *Container)

func (*GetResponseBody) SetSessionToken

func (r *GetResponseBody) SetSessionToken(v *session.Token)

SetSessionToken sets token of the session within which requested container was created.

func (*GetResponseBody) SetSignature

func (r *GetResponseBody) SetSignature(v *refs.Signature)

SetSignature sets signature of the requested container.

func (*GetResponseBody) StableMarshal

func (r *GetResponseBody) StableMarshal(buf []byte) []byte

func (*GetResponseBody) StableSize

func (r *GetResponseBody) StableSize() (size int)

func (*GetResponseBody) ToGRPCMessage

func (r *GetResponseBody) ToGRPCMessage() grpc.Message

func (*GetResponseBody) Unmarshal

func (r *GetResponseBody) Unmarshal(data []byte) error

type ListRequest

type ListRequest struct {
	session.RequestHeaders
	// contains filtered or unexported fields
}

func (*ListRequest) FromGRPCMessage

func (r *ListRequest) FromGRPCMessage(m grpc.Message) error

func (*ListRequest) GetBody

func (r *ListRequest) GetBody() *ListRequestBody

func (*ListRequest) SetBody

func (r *ListRequest) SetBody(v *ListRequestBody)

func (*ListRequest) ToGRPCMessage

func (r *ListRequest) ToGRPCMessage() grpc.Message

type ListRequestBody

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

func (*ListRequestBody) FromGRPCMessage

func (r *ListRequestBody) FromGRPCMessage(m grpc.Message) error

func (*ListRequestBody) GetOwnerID

func (r *ListRequestBody) GetOwnerID() *refs.OwnerID

func (*ListRequestBody) SetOwnerID

func (r *ListRequestBody) SetOwnerID(v *refs.OwnerID)

func (*ListRequestBody) StableMarshal

func (r *ListRequestBody) StableMarshal(buf []byte) []byte

func (*ListRequestBody) StableSize

func (r *ListRequestBody) StableSize() (size int)

func (*ListRequestBody) ToGRPCMessage

func (r *ListRequestBody) ToGRPCMessage() grpc.Message

func (*ListRequestBody) Unmarshal

func (r *ListRequestBody) Unmarshal(data []byte) error

type ListResponse

type ListResponse struct {
	session.ResponseHeaders
	// contains filtered or unexported fields
}

func (*ListResponse) FromGRPCMessage

func (r *ListResponse) FromGRPCMessage(m grpc.Message) error

func (*ListResponse) GetBody

func (r *ListResponse) GetBody() *ListResponseBody

func (*ListResponse) SetBody

func (r *ListResponse) SetBody(v *ListResponseBody)

func (*ListResponse) ToGRPCMessage

func (r *ListResponse) ToGRPCMessage() grpc.Message

type ListResponseBody

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

func (*ListResponseBody) FromGRPCMessage

func (r *ListResponseBody) FromGRPCMessage(m grpc.Message) error

func (*ListResponseBody) GetContainerIDs

func (r *ListResponseBody) GetContainerIDs() []refs.ContainerID

func (*ListResponseBody) SetContainerIDs

func (r *ListResponseBody) SetContainerIDs(v []refs.ContainerID)

func (*ListResponseBody) StableMarshal

func (r *ListResponseBody) StableMarshal(buf []byte) []byte

func (*ListResponseBody) StableSize

func (r *ListResponseBody) StableSize() (size int)

func (*ListResponseBody) ToGRPCMessage

func (r *ListResponseBody) ToGRPCMessage() grpc.Message

func (*ListResponseBody) Unmarshal

func (r *ListResponseBody) Unmarshal(data []byte) error

type PutRequest

type PutRequest struct {
	session.RequestHeaders
	// contains filtered or unexported fields
}

func (*PutRequest) FromGRPCMessage

func (r *PutRequest) FromGRPCMessage(m grpc.Message) error

func (*PutRequest) GetBody

func (r *PutRequest) GetBody() *PutRequestBody

func (*PutRequest) SetBody

func (r *PutRequest) SetBody(v *PutRequestBody)

func (*PutRequest) ToGRPCMessage

func (r *PutRequest) ToGRPCMessage() grpc.Message

type PutRequestBody

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

func (*PutRequestBody) FromGRPCMessage

func (r *PutRequestBody) FromGRPCMessage(m grpc.Message) error

func (*PutRequestBody) GetContainer

func (r *PutRequestBody) GetContainer() *Container

func (*PutRequestBody) GetSignature

func (r *PutRequestBody) GetSignature() *refs.Signature

func (*PutRequestBody) SetContainer

func (r *PutRequestBody) SetContainer(v *Container)

func (*PutRequestBody) SetSignature

func (r *PutRequestBody) SetSignature(v *refs.Signature)

func (*PutRequestBody) StableMarshal

func (r *PutRequestBody) StableMarshal(buf []byte) []byte

func (*PutRequestBody) StableSize

func (r *PutRequestBody) StableSize() (size int)

func (*PutRequestBody) ToGRPCMessage

func (r *PutRequestBody) ToGRPCMessage() grpc.Message

func (*PutRequestBody) Unmarshal

func (r *PutRequestBody) Unmarshal(data []byte) error

type PutResponse

type PutResponse struct {
	session.ResponseHeaders
	// contains filtered or unexported fields
}

func (*PutResponse) FromGRPCMessage

func (r *PutResponse) FromGRPCMessage(m grpc.Message) error

func (*PutResponse) GetBody

func (r *PutResponse) GetBody() *PutResponseBody

func (*PutResponse) SetBody

func (r *PutResponse) SetBody(v *PutResponseBody)

func (*PutResponse) ToGRPCMessage

func (r *PutResponse) ToGRPCMessage() grpc.Message

type PutResponseBody

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

func (*PutResponseBody) FromGRPCMessage

func (r *PutResponseBody) FromGRPCMessage(m grpc.Message) error

func (*PutResponseBody) GetContainerID

func (r *PutResponseBody) GetContainerID() *refs.ContainerID

func (*PutResponseBody) SetContainerID

func (r *PutResponseBody) SetContainerID(v *refs.ContainerID)

func (*PutResponseBody) StableMarshal

func (r *PutResponseBody) StableMarshal(buf []byte) []byte

func (*PutResponseBody) StableSize

func (r *PutResponseBody) StableSize() (size int)

func (*PutResponseBody) ToGRPCMessage

func (r *PutResponseBody) ToGRPCMessage() grpc.Message

func (*PutResponseBody) Unmarshal

func (r *PutResponseBody) Unmarshal(data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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