container

package
v0.58.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AttributeChagedEvent is notification that is produced after any
	// attribute in any container is changed in FS chain.
	AttributeChagedEvent = "AttributeChanged"

	// ContainerUpdatedEvent is notification that is produced after any
	// changes have been applied to a container and its revision has
	// incremented.
	ContainerUpdatedEvent = "ContainerUpdated"
)

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

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

ParseContainerUpdatedEvent from notification into ContainerUpdated structure.

func ParsePutReport added in v0.49.0

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

ParsePutReport from NotaryEvent into container event structure.

func RestoreCreateContainerV2Request added in v0.51.0

func RestoreCreateContainerV2Request(contractCalls []event.NotaryEvent) (event.Event, error)

RestoreCreateContainerV2Request restores CreateContainerV2Request from the notary 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 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 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 ContainerUpdated added in v0.57.0

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

ContainerUpdated is notification on container revision increment.

func (ContainerUpdated) Container added in v0.57.0

func (c ContainerUpdated) Container() cid.ID

Container returns updated container's ID.

func (ContainerUpdated) MorphEvent added in v0.57.0

func (c ContainerUpdated) MorphEvent()

func (ContainerUpdated) Revision added in v0.57.0

func (c ContainerUpdated) Revision() uint64

Revision returns new revision.

type CreateContainerV2Request added in v0.51.0

type CreateContainerV2Request struct {
	event.Event
	MainTransaction transaction.Transaction

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

	// EACLTable is set if container eACL was set in the same
	// transaction container was created. It is nil otherwise.
	EACLTable *PutContainerEACLRequest

	OriginalRequest []byte
}

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

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 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 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 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 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