container

package
v0.43.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PutNotaryEvent is method name for container put operations
	// in `Container` contract. Is used as identificator for notary
	// put container requests.
	PutNotaryEvent = "put"

	// PutNotaryEvent is an ID of notary "put named container" notification.
	PutNamedNotaryEvent = "putNamed"
)
View Source
const (
	// DeleteNotaryEvent is method name for container delete operations
	// in `Container` contract. Is used as identificator for notary
	// delete container requests.
	DeleteNotaryEvent = "delete"
)
View Source
const (
	// SetEACLNotaryEvent is method name for container EACL operations
	// in `Container` contract. Is used as identificator for notary
	// EACL changing requests.
	SetEACLNotaryEvent = "setEACL"
)

Variables

This section is empty.

Functions

func ParseDeleteNotary

func ParseDeleteNotary(ne event.NotaryEvent) (event.Event, error)

ParseDeleteNotary from NotaryEvent into container event structure.

func ParseDeleteSuccess

func ParseDeleteSuccess(e *state.ContainedNotificationEvent) (event.Event, error)

ParseDeleteSuccess decodes notification event thrown by Container contract into DeleteSuccess and returns it as event.Event.

func ParsePutNamedNotary

func ParsePutNamedNotary(ne event.NotaryEvent) (event.Event, error)

ParsePutNamedNotary parses PutNamed event structure from generic event.NotaryEvent.

func ParsePutNotary

func ParsePutNotary(ne event.NotaryEvent) (event.Event, error)

ParsePutNotary from NotaryEvent into container event structure.

func ParsePutSuccess

func ParsePutSuccess(e *state.ContainedNotificationEvent) (event.Event, error)

ParsePutSuccess decodes notification event thrown by Container contract into PutSuccess and returns it as event.Event.

func ParseSetEACLNotary

func ParseSetEACLNotary(ne event.NotaryEvent) (event.Event, error)

ParseSetEACLNotary from NotaryEvent into container event structure.

func ParseStartEstimation

func ParseStartEstimation(e *state.ContainedNotificationEvent) (event.Event, error)

ParseStartEstimation from notification into container event structure.

func ParseStopEstimation

func ParseStopEstimation(e *state.ContainedNotificationEvent) (event.Event, error)

ParseStopEstimation from notification into container event structure.

Types

type Delete

type Delete struct {
	ContainerIDValue []byte
	SignatureValue   []byte
	TokenValue       []byte
	PublicKeyValue   []byte

	// For notary notifications only.
	// Contains raw transactions of notary request.
	NotaryRequestValue *payload.P2PNotaryRequest
}

Delete structure of container.Delete notification from morph chain.

func (Delete) ContainerID

func (d Delete) ContainerID() []byte

ContainerID is a marshalled container structure, defined in API.

func (Delete) MorphEvent

func (Delete) MorphEvent()

MorphEvent implements Neo:Morph Event interface.

func (Delete) NotaryRequest

func (d Delete) NotaryRequest() *payload.P2PNotaryRequest

NotaryRequest returns raw notary request if notification was received via notary service. Otherwise, returns nil.

func (Delete) SessionToken

func (d Delete) SessionToken() []byte

SessionToken returns binary token of the session within which the eACL was set.

func (Delete) Signature

func (d Delete) Signature() []byte

Signature of marshalled container by container owner.

type DeleteSuccess

type DeleteSuccess struct {
	// Identifier of the removed container.
	ID cid.ID
}

DeleteSuccess structures notification event of successful container removal thrown by Container contract.

func (DeleteSuccess) MorphEvent

func (DeleteSuccess) MorphEvent()

MorphEvent implements Neo:Morph Event interface.

type Put

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

Put structure of container.Put notification from morph chain.

func (Put) Container

func (p Put) Container() []byte

Container is a marshalled container structure, defined in API.

func (Put) MorphEvent

func (Put) MorphEvent()

MorphEvent implements Neo:Morph Event interface.

func (Put) NotaryRequest

func (p Put) NotaryRequest() *payload.P2PNotaryRequest

NotaryRequest returns raw notary request if notification was received via notary service. Otherwise, returns nil.

func (Put) PublicKey

func (p Put) PublicKey() []byte

PublicKey of container owner.

func (Put) SessionToken

func (p Put) SessionToken() []byte

SessionToken returns binary token of the session within which the container was created.

func (Put) Signature

func (p Put) Signature() []byte

Signature of marshalled container by container owner.

type PutNamed

type PutNamed struct {
	Put
	// contains filtered or unexported fields
}

PutNamed represents notification event spawned by PutNamed method from Container contract of FrostFS Morph chain.

func (PutNamed) Name

func (x PutNamed) Name() string

Name returns "name" arg of contract call.

func (PutNamed) Zone

func (x PutNamed) Zone() string

Zone returns "zone" arg of contract call.

type PutSuccess

type PutSuccess struct {
	// Identifier of the newly created container.
	ID cid.ID
}

PutSuccess structures notification event of successful container creation thrown by Container contract.

func (PutSuccess) MorphEvent

func (PutSuccess) MorphEvent()

MorphEvent implements Neo:Morph Event interface.

type SetEACL

type SetEACL struct {
	TableValue     []byte
	SignatureValue []byte
	PublicKeyValue []byte
	TokenValue     []byte

	// For notary notifications only.
	// Contains raw transactions of notary request.
	NotaryRequestValue *payload.P2PNotaryRequest
}

SetEACL represents structure of notification about modified eACL table coming from FrostFS Container contract.

func (SetEACL) MorphEvent

func (SetEACL) MorphEvent()

MorphEvent implements Neo:Morph Event interface.

func (SetEACL) NotaryRequest

func (x SetEACL) NotaryRequest() *payload.P2PNotaryRequest

NotaryRequest returns raw notary request if notification was received via notary service. Otherwise, returns nil.

func (SetEACL) PublicKey

func (x SetEACL) PublicKey() []byte

PublicKey returns public keys of container owner in a binary format.

func (SetEACL) SessionToken

func (x SetEACL) SessionToken() []byte

SessionToken returns binary token of the session within which the eACL was set.

func (SetEACL) Signature

func (x SetEACL) Signature() []byte

Signature returns signature of the binary table.

func (SetEACL) Table

func (x SetEACL) Table() []byte

Table returns returns eACL table in a binary FrostFS API format.

type StartEstimation

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

StartEstimation structure of container.StartEstimation notification from morph chain.

func (StartEstimation) Epoch

func (s StartEstimation) Epoch() uint64

Epoch returns epoch value for which to start container size estimation.

func (StartEstimation) MorphEvent

func (StartEstimation) MorphEvent()

MorphEvent implements Neo:Morph Event interface.

type StopEstimation

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

StopEstimation structure of container.StopEstimation notification from morph chain.

func (StopEstimation) Epoch

func (s StopEstimation) Epoch() uint64

Epoch returns epoch value for which to stop container size estimation.

func (StopEstimation) MorphEvent

func (StopEstimation) MorphEvent()

MorphEvent implements Neo:Morph Event interface.

Jump to

Keyboard shortcuts

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