container

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: GPL-3.0 Imports: 17 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"

	// PutNamedNotaryEvent is an ID of notary "put named container" notification.
	PutNamedNotaryEvent = "putNamed"
)
View Source
const (
	// AttributeChagedEvent is notification that is produced after any
	// attribute in any container is changed in FS chain.
	AttributeChagedEvent = "AttributeChanged"
)
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 (
	// ObjectPutNotaryEvent is method name for object submission operations
	// in `Container` contract. Is used as identificator for notary object
	// creation requests.
	ObjectPutNotaryEvent = "submitObjectPut"
)
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 ParseAttributeChangedEvent added in v0.51.0

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

ParseAttributeChangedEvent from notification into AttributeChanged structure.

func ParseDeleteNotary added in v0.25.0

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

ParseDeleteNotary from NotaryEvent into container event structure.

func ParseDeleteSuccess added in v0.32.0

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 ParseObjectPut added in v0.46.0

func ParseObjectPut(e event.NotaryEvent) (event.Event, error)

ParseObjectPut decodes notification event thrown by Container contract into ObjectPut and returns it as event.Event.

func ParsePutNamedNotary added in v0.26.0

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

ParsePutNamedNotary parses PutNamed event structure from generic event.NotaryEvent.

func ParsePutNotary added in v0.25.0

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

ParsePutNotary from NotaryEvent into container event structure.

func ParsePutReport added in v0.49.0

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

ParsePutReport from NotaryEvent into container event structure.

func ParsePutSuccess added in v0.32.0

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 added in v0.25.0

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

ParseSetEACLNotary from NotaryEvent into container event structure.

func RestoreAddStructsRequest added in v0.51.0

func RestoreAddStructsRequest(notaryReq event.NotaryEvent) (event.Event, error)

RestoreAddStructsRequest restores AddStructsRequest from the notary one.

func RestoreCreateContainerRequest added in v0.46.0

func RestoreCreateContainerRequest(notaryReq event.NotaryEvent) (event.Event, error)

RestoreCreateContainerRequest restores CreateContainerRequest from the notary one.

func RestoreCreateContainerV2Request added in v0.51.0

func RestoreCreateContainerV2Request(notaryReq event.NotaryEvent) (event.Event, error)

RestoreCreateContainerV2Request restores CreateContainerV2Request from the notary one.

func RestoreCreated added in v0.46.0

func RestoreCreated(notifEvent *state.ContainedNotificationEvent) (event.Event, error)

RestoreCreated restores Created event from the notification one.

func RestoreEACLChanged added in v0.47.0

func RestoreEACLChanged(notifEvent *state.ContainedNotificationEvent) (event.Event, error)

RestoreEACLChanged restores EACLChanged event from the notification one.

func RestorePutContainerEACLRequest added in v0.46.0

func RestorePutContainerEACLRequest(notaryReq event.NotaryEvent) (event.Event, error)

RestorePutContainerEACLRequest restores PutContainerEACLRequest from the notary one.

func RestoreRemoveAttributeRequest added in v0.51.0

func RestoreRemoveAttributeRequest(notaryReq event.NotaryEvent) (event.Event, error)

RestoreRemoveAttributeRequest restores RemoveAttributeRequest from the notary one.

func RestoreRemoveContainerRequest added in v0.46.0

func RestoreRemoveContainerRequest(notaryReq event.NotaryEvent) (event.Event, error)

RestoreRemoveContainerRequest restores RemoveContainerRequest from the notary one.

func RestoreRemoved added in v0.46.0

func RestoreRemoved(notifEvent *state.ContainedNotificationEvent) (event.Event, error)

RestoreRemoved restores Removed event from the notification one.

func RestoreSetAttributeRequest added in v0.51.0

func RestoreSetAttributeRequest(notaryReq event.NotaryEvent) (event.Event, error)

RestoreSetAttributeRequest restores SetAttributeRequest from the notary one.

func RestoreTransfer added in v0.51.0

func RestoreTransfer(notifEvent *state.ContainedNotificationEvent) (event.Event, error)

RestoreTransfer restores Transfer event from the notification one.

Types

type AddStructsRequest added in v0.51.0

type AddStructsRequest struct {
	event.Event
	MainTransaction transaction.Transaction
}

AddStructsRequest wraps container protobuf->struct migration request to provide app-internal event.

type AttributeChanged added in v0.51.0

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

AttributeChanged is notification on container attribute changes.

func (AttributeChanged) Attribute added in v0.51.0

func (a AttributeChanged) Attribute() string

Attribute returns updated attribute's key.

func (AttributeChanged) Container added in v0.51.0

func (a AttributeChanged) Container() cid.ID

Container returns updated container's ID.

func (AttributeChanged) MorphEvent added in v0.51.0

func (a AttributeChanged) MorphEvent()

type CreateContainerRequest added in v0.46.0

type CreateContainerRequest struct {
	event.Event
	MainTransaction transaction.Transaction
	fschaincontracts.CreateContainerParams
}

CreateContainerRequest wraps container creation request to provide app-internal event.

type CreateContainerV2Request added in v0.51.0

type CreateContainerV2Request struct {
	event.Event
	MainTransaction transaction.Transaction

	Container          containerrpc.ContainerInfo
	InvocationScript   []byte
	VerificationScript []byte
	SessionToken       []byte
}

CreateContainerRequest wraps container creation request to provide app-internal event.

type Created added in v0.46.0

type Created struct {
	event.Event
	ID    cid.ID
	Owner user.ID
}

Created is a container creation event thrown by Container contract.

type Delete

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

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 added in v0.25.0

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

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

func (Delete) SessionToken added in v0.21.0

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 added in v0.32.0

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 added in v0.32.0

func (DeleteSuccess) MorphEvent()

MorphEvent implements Neo:Morph Event interface.

type EACLChanged added in v0.47.0

type EACLChanged struct {
	event.Event
	Container cid.ID
}

EACLChanged is a container eACL change event thrown by Container contract.

type ObjectPut added in v0.46.0

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

ObjectPut structure of container.SubmitObjectPut notification from FS chain.

func (ObjectPut) ContainerID added in v0.46.0

func (op ObjectPut) ContainerID() cid.ID

ContainerID returns created object's container ID.

func (ObjectPut) MorphEvent added in v0.46.0

func (ObjectPut) MorphEvent()

MorphEvent implements Neo:Morph Event interface.

func (ObjectPut) NotaryRequest added in v0.46.0

func (op ObjectPut) NotaryRequest() *payload.P2PNotaryRequest

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

func (ObjectPut) ObjectID added in v0.46.0

func (op ObjectPut) ObjectID() oid.ID

ObjectID returns created object's ID.

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 added in v0.25.0

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 added in v0.21.0

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 PutContainerEACLRequest added in v0.46.0

type PutContainerEACLRequest struct {
	event.Event
	MainTransaction transaction.Transaction
	fschaincontracts.PutContainerEACLParams
}

PutContainerEACLRequest wraps container EACL setting request to provide app-internal event.

type PutNamed added in v0.26.0

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

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

func (PutNamed) Name added in v0.26.0

func (x PutNamed) Name() string

Name returns "name" arg of contract call.

func (PutNamed) Zone added in v0.26.0

func (x PutNamed) Zone() string

Zone returns "zone" arg of contract call.

type PutSuccess added in v0.32.0

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 added in v0.32.0

func (PutSuccess) MorphEvent()

MorphEvent implements Neo:Morph Event interface.

type RemoveAttributeRequest added in v0.51.0

type RemoveAttributeRequest struct {
	event.Event
	MainTransaction transaction.Transaction

	ID                 []byte
	Attribute          string
	ValidUntil         int64
	InvocationScript   []byte
	VerificationScript []byte
	SessionToken       []byte
}

RemoveAttributeRequest wraps attribute removal request to provide app-internal event.

type RemoveContainerRequest added in v0.46.0

type RemoveContainerRequest struct {
	event.Event
	MainTransaction transaction.Transaction
	fschaincontracts.RemoveContainerParams
}

RemoveContainerRequest wraps container removal request to provide app-internal event.

type Removed added in v0.46.0

type Removed struct {
	event.Event
	ID    cid.ID
	Owner user.ID
}

Removed is a container removal event thrown by Container contract.

type Report added in v0.49.0

type Report struct {
	CID           []byte
	StorageSize   int64
	ObjectsNumber int64
	NodeKey       []byte

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

Report structure of container.PutEstimation notification from morph chain.

func (Report) MorphEvent added in v0.49.0

func (r Report) MorphEvent()

MorphEvent implements event.Event.

type SetAttributeRequest added in v0.51.0

type SetAttributeRequest struct {
	event.Event
	MainTransaction transaction.Transaction

	ID                 []byte
	Attribute          string
	Value              string
	ValidUntil         int64
	InvocationScript   []byte
	VerificationScript []byte
	SessionToken       []byte
}

SetAttributeRequest wraps attribute setting request to provide app-internal event.

type SetEACL added in v0.21.0

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

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

func (SetEACL) MorphEvent added in v0.21.0

func (SetEACL) MorphEvent()

MorphEvent implements Neo:Morph Event interface.

func (SetEACL) NotaryRequest added in v0.25.0

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

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

func (SetEACL) PublicKey added in v0.21.0

func (x SetEACL) PublicKey() []byte

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

func (SetEACL) SessionToken added in v0.21.0

func (x SetEACL) SessionToken() []byte

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

func (SetEACL) Signature added in v0.21.0

func (x SetEACL) Signature() []byte

Signature returns signature of the binary table.

func (SetEACL) Table added in v0.21.0

func (x SetEACL) Table() []byte

Table returns eACL table in a binary NeoFS API format.

type Transfer added in v0.51.0

type Transfer struct {
	event.Event
	Container cid.ID
	From      *util.Uint160
	To        *util.Uint160
}

Transfer is a NEP-11 transfer event thrown by Container contract.

Jump to

Keyboard shortcuts

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