Help us shape the future of Go! Take the 2026 Go Developer Survey

space_world_ops

package
v0.57.21 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigID = ControllerID

ConfigID is the config identifier.

View Source
const ControllerID = "space/world/ops"

ControllerID is the controller id.

View Source
const DefaultSpaceSettingsObjectKey = "settings"

DefaultSpaceSettingsObjectKey is the default object key for space settings.

View Source
const SetSpaceIndexPathOpID = "space/world/set-index-path"

SetSpaceIndexPathOpID identifies the atomic default-object operation.

Variables

View Source
var CanvasAddEdgeOpId = "space/world/canvas-add-edge"

CanvasAddEdgeOpId is the operation id for CanvasAddEdgeOp.

View Source
var CanvasAddNodeOpId = "space/world/canvas-add-node"

CanvasAddNodeOpId is the operation id for CanvasAddNodeOp.

View Source
var CanvasInitOpId = "space/world/init-canvas"

CanvasInitOpId is the operation id for CanvasInitOp.

View Source
var CanvasRemoveEdgeOpId = "space/world/canvas-remove-edge"

CanvasRemoveEdgeOpId is the operation id for CanvasRemoveEdgeOp.

View Source
var CanvasRemoveNodeOpId = "space/world/canvas-remove-node"

CanvasRemoveNodeOpId is the operation id for CanvasRemoveNodeOp.

View Source
var CanvasSetNodeOpId = "space/world/canvas-set-node"

CanvasSetNodeOpId is the operation id for CanvasSetNodeOp.

View Source
var ErrEdgeEmptyId = errors.New("edge id cannot be empty")

ErrEdgeEmptyId is returned if the edge has an empty id.

View Source
var ErrEdgeEmptySourceNodeId = errors.New("edge source_node_id cannot be empty")

ErrEdgeEmptySourceNodeId is returned if the edge has an empty source node id.

View Source
var ErrEdgeEmptyTargetNodeId = errors.New("edge target_node_id cannot be empty")

ErrEdgeEmptyTargetNodeId is returned if the edge has an empty target node id.

View Source
var ErrEdgeNil = errors.New("edge cannot be nil")

ErrEdgeNil is returned if the edge is nil.

View Source
var ErrEdgeNodeNotFound = errors.New("edge references non-existent node")

ErrEdgeNodeNotFound is returned if an edge references a non-existent node.

View Source
var ErrInvalidSettings = errors.New("settings cannot be nil")

ErrInvalidSettings is returned if the settings are invalid.

View Source
var ErrNoEdgeIds = errors.New("at least one edge id is required")

ErrNoEdgeIds is returned if no edge ids are provided.

View Source
var ErrNodeIdRequired = errors.New("canvas node id is required")

ErrNodeIdRequired is returned when a node ID is required but empty.

View Source
var ErrNodeIdsRequired = errors.New("at least one node id is required")

ErrNodeIdsRequired is returned when at least one node ID is required.

View Source
var ErrNodeNotFound = errors.New("canvas node not found")

ErrNodeNotFound is returned when a canvas node is not found.

View Source
var ErrNodeRequired = errors.New("canvas node is required")

ErrNodeRequired is returned when a node is required but not provided.

View Source
var InitCanvasDemoOpId = "space/world/init-canvas-demo"

InitCanvasDemoOpId is the operation id for InitCanvasDemoOp.

View Source
var InitObjectLayoutOpId = "space/world/init-object-layout"

InitObjectLayoutOpId is the operation id for InitObjectLayoutOp.

View Source
var InitUnixFSOpId = "space/world/init-unixfs"

InitUnixFSOpId is the init UnixFS operation id.

View Source
var SetSpaceSettingsOpId = "space/world/set-settings"

SetSpaceSettingsOpId is the space settings init operation id.

Functions

func InitCanvas

func InitCanvas(
	ctx context.Context,
	ws world.WorldState,
	sender peer.ID,
	objKey string,
	ts time.Time,
) (rev uint64, sysErr bool, err error)

InitCanvas initializes a blank Canvas in a world. Returns any error.

func InitCanvasDemo

func InitCanvasDemo(
	ctx context.Context,
	ws world.WorldState,
	sender peer.ID,
	objKey string,
	ts time.Time,
) (rev uint64, sysErr bool, err error)

InitCanvasDemo initializes a Canvas with demo content in a world. Returns any error.

func InitObjectLayout

func InitObjectLayout(
	ctx context.Context,
	ws world.WorldState,
	sender peer.ID,
	objKey string,
	ts time.Time,
) (rev uint64, sysErr bool, err error)

InitObjectLayout initializes an ObjectLayout with starter content in a world. Returns any error.

func InitUnixFS

func InitUnixFS(
	ctx context.Context,
	ws world.WorldState,
	sender peer.ID,
	objKey string,
	ts time.Time,
) (rev uint64, sysErr bool, err error)

InitUnixFS initializes an empty UnixFS filesystem in a world. Returns any error.

func InstallSpacePlugin

func InstallSpacePlugin(
	ctx context.Context,
	ws world.WorldState,
	sender peer.ID,
	pluginID, manifestKey string,
	ts time.Time,
) (bool, error)

InstallSpacePlugin installs a plugin in the Space, optionally pinning an immutable artifact. It reports whether the SpaceSettings changed.

A pinned artifact moves to the front of the plugin's ordered installation list and retains one predecessor for its platform. Older pins for that platform are removed; every other platform's pins keep their relative order. Immutable manifests and build provenance remain in the World. The caller supplies the World transaction that commits the installation.

func LookupCanvasAddEdgeOp

func LookupCanvasAddEdgeOp(ctx context.Context, operationTypeID string) (world.Operation, error)

LookupCanvasAddEdgeOp looks up a CanvasAddEdgeOp operation type.

func LookupCanvasAddNodeOp

func LookupCanvasAddNodeOp(ctx context.Context, operationTypeID string) (world.Operation, error)

LookupCanvasAddNodeOp looks up a CanvasAddNodeOp operation type.

func LookupCanvasInitOp

func LookupCanvasInitOp(ctx context.Context, operationTypeID string) (world.Operation, error)

LookupCanvasInitOp looks up a CanvasInitOp operation type.

func LookupCanvasRemoveEdgeOp

func LookupCanvasRemoveEdgeOp(ctx context.Context, operationTypeID string) (world.Operation, error)

LookupCanvasRemoveEdgeOp looks up a CanvasRemoveEdgeOp operation type.

func LookupCanvasRemoveNodeOp

func LookupCanvasRemoveNodeOp(ctx context.Context, operationTypeID string) (world.Operation, error)

LookupCanvasRemoveNodeOp looks up a CanvasRemoveNodeOp operation type.

func LookupCanvasSetNodeOp

func LookupCanvasSetNodeOp(ctx context.Context, operationTypeID string) (world.Operation, error)

LookupCanvasSetNodeOp looks up a CanvasSetNodeOp operation type.

func LookupInitCanvasDemoOp

func LookupInitCanvasDemoOp(ctx context.Context, operationTypeID string) (world.Operation, error)

LookupInitCanvasDemoOp looks up a InitCanvasDemoOp operation type.

func LookupInitObjectLayoutOp

func LookupInitObjectLayoutOp(ctx context.Context, operationTypeID string) (world.Operation, error)

LookupInitObjectLayoutOp looks up a InitObjectLayoutOp operation type.

func LookupInitUnixFSOp

func LookupInitUnixFSOp(ctx context.Context, operationTypeID string) (world.Operation, error)

LookupInitUnixFSOp looks up a InitUnixFSOp operation type.

func LookupSetSpaceSettingsOp

func LookupSetSpaceSettingsOp(ctx context.Context, operationTypeID string) (world.Operation, error)

LookupSetSpaceSettingsOp looks up Space settings operations.

func LookupWorldOp

func LookupWorldOp(ctx context.Context, opTypeID string) (world.Operation, error)

LookupWorldOp looks up built-in space world operation types.

func NewCanvasAddEdgeOpBlock

func NewCanvasAddEdgeOpBlock() block.Block

NewCanvasAddEdgeOpBlock constructs a new CanvasAddEdgeOp block.

func NewCanvasAddNodeOpBlock

func NewCanvasAddNodeOpBlock() block.Block

NewCanvasAddNodeOpBlock constructs a new CanvasAddNodeOp block.

func NewCanvasInitOpBlock

func NewCanvasInitOpBlock() block.Block

NewCanvasInitOpBlock constructs a new CanvasInitOp block.

func NewCanvasRemoveEdgeOpBlock

func NewCanvasRemoveEdgeOpBlock() block.Block

NewCanvasRemoveEdgeOpBlock constructs a new CanvasRemoveEdgeOp block.

func NewCanvasRemoveNodeOpBlock

func NewCanvasRemoveNodeOpBlock() block.Block

NewCanvasRemoveNodeOpBlock constructs a new CanvasRemoveNodeOp block.

func NewCanvasSetNodeOpBlock

func NewCanvasSetNodeOpBlock() block.Block

NewCanvasSetNodeOpBlock constructs a new CanvasSetNodeOp block.

func NewInitCanvasDemoOpBlock

func NewInitCanvasDemoOpBlock() block.Block

NewInitCanvasDemoOpBlock constructs a new InitCanvasDemoOp block.

func NewInitObjectLayoutOpBlock

func NewInitObjectLayoutOpBlock() block.Block

NewInitObjectLayoutOpBlock constructs a new InitObjectLayoutOp block.

func NewInitUnixFSOpBlock

func NewInitUnixFSOpBlock() block.Block

NewInitUnixFSOpBlock constructs a new InitUnixFSOp block.

func NewSetSpaceSettingsOpBlock

func NewSetSpaceSettingsOpBlock() block.Block

NewSetSpaceSettingsOpBlock constructs a new SetSpaceSettingsOp block.

func SetSpaceSettings

func SetSpaceSettings(
	ctx context.Context,
	ws world.WorldState,
	sender peer.ID,
	objKey string,
	settings *space_world.SpaceSettings,
	overwrite bool,
	ts time.Time,
) (rev uint64, sysErr bool, err error)

SetSpaceSettings sets the space settings in a world. Returns any error.

Types

type CanvasAddEdgeOp

type CanvasAddEdgeOp struct {

	// ObjectKey is the canvas object key.
	ObjectKey string `protobuf:"bytes,1,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
	// Edge is the edge to add.
	Edge *canvas.CanvasEdge `protobuf:"bytes,2,opt,name=edge,proto3" json:"edge,omitempty"`
	// contains filtered or unexported fields
}

CanvasAddEdgeOp is an operation to add an edge to a canvas.

func NewCanvasAddEdgeOp

func NewCanvasAddEdgeOp(objKey string, edge *s4wave_canvas.CanvasEdge) *CanvasAddEdgeOp

NewCanvasAddEdgeOp constructs a new CanvasAddEdgeOp block.

func (*CanvasAddEdgeOp) ApplyWorldObjectOp

func (o *CanvasAddEdgeOp) ApplyWorldObjectOp(
	ctx context.Context,
	le *logrus.Entry,
	objectHandle world.ObjectState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldObjectOp applies the operation to a world object handle.

func (*CanvasAddEdgeOp) ApplyWorldOp

func (o *CanvasAddEdgeOp) ApplyWorldOp(
	ctx context.Context,
	le *logrus.Entry,
	worldHandle world.WorldState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldOp applies the operation as a world operation.

func (*CanvasAddEdgeOp) CloneMessageVT

func (m *CanvasAddEdgeOp) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*CanvasAddEdgeOp) CloneVT

func (m *CanvasAddEdgeOp) CloneVT() *CanvasAddEdgeOp

func (*CanvasAddEdgeOp) EqualMessageVT

func (this *CanvasAddEdgeOp) EqualMessageVT(thatMsg any) bool

func (*CanvasAddEdgeOp) EqualVT

func (this *CanvasAddEdgeOp) EqualVT(that *CanvasAddEdgeOp) bool

func (*CanvasAddEdgeOp) GetEdge

func (x *CanvasAddEdgeOp) GetEdge() *canvas.CanvasEdge

func (*CanvasAddEdgeOp) GetObjectKey

func (x *CanvasAddEdgeOp) GetObjectKey() string

func (*CanvasAddEdgeOp) GetOperationTypeId

func (o *CanvasAddEdgeOp) GetOperationTypeId() string

GetOperationTypeId returns the operation type identifier.

func (*CanvasAddEdgeOp) MarshalBlock

func (o *CanvasAddEdgeOp) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*CanvasAddEdgeOp) MarshalJSON

func (x *CanvasAddEdgeOp) MarshalJSON() ([]byte, error)

MarshalJSON marshals the CanvasAddEdgeOp to JSON.

func (*CanvasAddEdgeOp) MarshalProtoJSON

func (x *CanvasAddEdgeOp) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the CanvasAddEdgeOp message to JSON.

func (*CanvasAddEdgeOp) MarshalProtoText

func (x *CanvasAddEdgeOp) MarshalProtoText() string

func (*CanvasAddEdgeOp) MarshalToSizedBufferVT

func (m *CanvasAddEdgeOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*CanvasAddEdgeOp) MarshalToVT

func (m *CanvasAddEdgeOp) MarshalToVT(dAtA []byte) (int, error)

func (*CanvasAddEdgeOp) MarshalVT

func (m *CanvasAddEdgeOp) MarshalVT() (dAtA []byte, err error)

func (*CanvasAddEdgeOp) ProtoMessage

func (*CanvasAddEdgeOp) ProtoMessage()

func (*CanvasAddEdgeOp) Reset

func (x *CanvasAddEdgeOp) Reset()

func (*CanvasAddEdgeOp) SizeVT

func (m *CanvasAddEdgeOp) SizeVT() (n int)

func (*CanvasAddEdgeOp) String

func (x *CanvasAddEdgeOp) String() string

func (*CanvasAddEdgeOp) UnmarshalBlock

func (o *CanvasAddEdgeOp) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*CanvasAddEdgeOp) UnmarshalJSON

func (x *CanvasAddEdgeOp) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the CanvasAddEdgeOp from JSON.

func (*CanvasAddEdgeOp) UnmarshalProtoJSON

func (x *CanvasAddEdgeOp) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the CanvasAddEdgeOp message from JSON.

func (*CanvasAddEdgeOp) UnmarshalVT

func (m *CanvasAddEdgeOp) UnmarshalVT(dAtA []byte) error

func (*CanvasAddEdgeOp) Validate

func (o *CanvasAddEdgeOp) Validate() error

Validate performs cursory checks on the op.

type CanvasAddNodeOp

type CanvasAddNodeOp struct {

	// ObjectKey is the canvas object key.
	ObjectKey string `protobuf:"bytes,1,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
	// Node is the full node to add.
	Node *canvas.CanvasNode `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty"`
	// contains filtered or unexported fields
}

CanvasAddNodeOp is an operation to add a node to a canvas.

func NewCanvasAddNodeOp

func NewCanvasAddNodeOp(objKey string, node *s4wave_canvas.CanvasNode) *CanvasAddNodeOp

NewCanvasAddNodeOp constructs a new CanvasAddNodeOp block.

func (*CanvasAddNodeOp) ApplyWorldObjectOp

func (o *CanvasAddNodeOp) ApplyWorldObjectOp(
	ctx context.Context,
	le *logrus.Entry,
	objectHandle world.ObjectState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldObjectOp applies the operation to a world object handle.

func (*CanvasAddNodeOp) ApplyWorldOp

func (o *CanvasAddNodeOp) ApplyWorldOp(
	ctx context.Context,
	le *logrus.Entry,
	worldHandle world.WorldState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldOp applies the operation as a world operation.

func (*CanvasAddNodeOp) CloneMessageVT

func (m *CanvasAddNodeOp) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*CanvasAddNodeOp) CloneVT

func (m *CanvasAddNodeOp) CloneVT() *CanvasAddNodeOp

func (*CanvasAddNodeOp) EqualMessageVT

func (this *CanvasAddNodeOp) EqualMessageVT(thatMsg any) bool

func (*CanvasAddNodeOp) EqualVT

func (this *CanvasAddNodeOp) EqualVT(that *CanvasAddNodeOp) bool

func (*CanvasAddNodeOp) GetNode

func (x *CanvasAddNodeOp) GetNode() *canvas.CanvasNode

func (*CanvasAddNodeOp) GetObjectKey

func (x *CanvasAddNodeOp) GetObjectKey() string

func (*CanvasAddNodeOp) GetOperationTypeId

func (o *CanvasAddNodeOp) GetOperationTypeId() string

GetOperationTypeId returns the operation type identifier.

func (*CanvasAddNodeOp) MarshalBlock

func (o *CanvasAddNodeOp) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*CanvasAddNodeOp) MarshalJSON

func (x *CanvasAddNodeOp) MarshalJSON() ([]byte, error)

MarshalJSON marshals the CanvasAddNodeOp to JSON.

func (*CanvasAddNodeOp) MarshalProtoJSON

func (x *CanvasAddNodeOp) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the CanvasAddNodeOp message to JSON.

func (*CanvasAddNodeOp) MarshalProtoText

func (x *CanvasAddNodeOp) MarshalProtoText() string

func (*CanvasAddNodeOp) MarshalToSizedBufferVT

func (m *CanvasAddNodeOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*CanvasAddNodeOp) MarshalToVT

func (m *CanvasAddNodeOp) MarshalToVT(dAtA []byte) (int, error)

func (*CanvasAddNodeOp) MarshalVT

func (m *CanvasAddNodeOp) MarshalVT() (dAtA []byte, err error)

func (*CanvasAddNodeOp) ProtoMessage

func (*CanvasAddNodeOp) ProtoMessage()

func (*CanvasAddNodeOp) Reset

func (x *CanvasAddNodeOp) Reset()

func (*CanvasAddNodeOp) SizeVT

func (m *CanvasAddNodeOp) SizeVT() (n int)

func (*CanvasAddNodeOp) String

func (x *CanvasAddNodeOp) String() string

func (*CanvasAddNodeOp) UnmarshalBlock

func (o *CanvasAddNodeOp) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*CanvasAddNodeOp) UnmarshalJSON

func (x *CanvasAddNodeOp) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the CanvasAddNodeOp from JSON.

func (*CanvasAddNodeOp) UnmarshalProtoJSON

func (x *CanvasAddNodeOp) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the CanvasAddNodeOp message from JSON.

func (*CanvasAddNodeOp) UnmarshalVT

func (m *CanvasAddNodeOp) UnmarshalVT(dAtA []byte) error

func (*CanvasAddNodeOp) Validate

func (o *CanvasAddNodeOp) Validate() error

Validate performs cursory checks on the op.

type CanvasInitOp

type CanvasInitOp struct {

	// ObjectKey is the object key for the Canvas.
	ObjectKey string `protobuf:"bytes,1,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
	// Timestamp is the modification time.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

CanvasInitOp is an operation to initialize a blank canvas. Creates an empty CanvasState and sets the object type to "canvas".

func NewCanvasInitOp

func NewCanvasInitOp(
	objKey string,
	ts time.Time,
) *CanvasInitOp

NewCanvasInitOp constructs a new CanvasInitOp block.

func (*CanvasInitOp) ApplyWorldObjectOp

func (o *CanvasInitOp) ApplyWorldObjectOp(
	ctx context.Context,
	le *logrus.Entry,
	objectHandle world.ObjectState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldObjectOp applies the operation to a world object handle.

func (*CanvasInitOp) ApplyWorldOp

func (o *CanvasInitOp) ApplyWorldOp(
	ctx context.Context,
	le *logrus.Entry,
	worldHandle world.WorldState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldOp applies the operation as a world operation.

func (*CanvasInitOp) CloneMessageVT

func (m *CanvasInitOp) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*CanvasInitOp) CloneVT

func (m *CanvasInitOp) CloneVT() *CanvasInitOp

func (*CanvasInitOp) EqualMessageVT

func (this *CanvasInitOp) EqualMessageVT(thatMsg any) bool

func (*CanvasInitOp) EqualVT

func (this *CanvasInitOp) EqualVT(that *CanvasInitOp) bool

func (*CanvasInitOp) GetObjectKey

func (x *CanvasInitOp) GetObjectKey() string

func (*CanvasInitOp) GetOperationTypeId

func (o *CanvasInitOp) GetOperationTypeId() string

GetOperationTypeId returns the operation type identifier.

func (*CanvasInitOp) GetTimestamp

func (x *CanvasInitOp) GetTimestamp() *timestamppb.Timestamp

func (*CanvasInitOp) MarshalBlock

func (o *CanvasInitOp) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*CanvasInitOp) MarshalJSON

func (x *CanvasInitOp) MarshalJSON() ([]byte, error)

MarshalJSON marshals the CanvasInitOp to JSON.

func (*CanvasInitOp) MarshalProtoJSON

func (x *CanvasInitOp) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the CanvasInitOp message to JSON.

func (*CanvasInitOp) MarshalProtoText

func (x *CanvasInitOp) MarshalProtoText() string

func (*CanvasInitOp) MarshalToSizedBufferVT

func (m *CanvasInitOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*CanvasInitOp) MarshalToVT

func (m *CanvasInitOp) MarshalToVT(dAtA []byte) (int, error)

func (*CanvasInitOp) MarshalVT

func (m *CanvasInitOp) MarshalVT() (dAtA []byte, err error)

func (*CanvasInitOp) ProtoMessage

func (*CanvasInitOp) ProtoMessage()

func (*CanvasInitOp) Reset

func (x *CanvasInitOp) Reset()

func (*CanvasInitOp) SizeVT

func (m *CanvasInitOp) SizeVT() (n int)

func (*CanvasInitOp) String

func (x *CanvasInitOp) String() string

func (*CanvasInitOp) UnmarshalBlock

func (o *CanvasInitOp) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*CanvasInitOp) UnmarshalJSON

func (x *CanvasInitOp) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the CanvasInitOp from JSON.

func (*CanvasInitOp) UnmarshalProtoJSON

func (x *CanvasInitOp) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the CanvasInitOp message from JSON.

func (*CanvasInitOp) UnmarshalVT

func (m *CanvasInitOp) UnmarshalVT(dAtA []byte) error

func (*CanvasInitOp) Validate

func (o *CanvasInitOp) Validate() error

Validate performs cursory checks on the op.

type CanvasRemoveEdgeOp

type CanvasRemoveEdgeOp struct {

	// ObjectKey is the canvas object key.
	ObjectKey string `protobuf:"bytes,1,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
	// EdgeIds is the list of edge IDs to remove.
	EdgeIds []string `protobuf:"bytes,2,rep,name=edge_ids,json=edgeIds,proto3" json:"edgeIds,omitempty"`
	// contains filtered or unexported fields
}

CanvasRemoveEdgeOp is an operation to remove edges from a canvas.

func NewCanvasRemoveEdgeOp

func NewCanvasRemoveEdgeOp(objKey string, edgeIDs []string) *CanvasRemoveEdgeOp

NewCanvasRemoveEdgeOp constructs a new CanvasRemoveEdgeOp block.

func (*CanvasRemoveEdgeOp) ApplyWorldObjectOp

func (o *CanvasRemoveEdgeOp) ApplyWorldObjectOp(
	ctx context.Context,
	le *logrus.Entry,
	objectHandle world.ObjectState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldObjectOp applies the operation to a world object handle.

func (*CanvasRemoveEdgeOp) ApplyWorldOp

func (o *CanvasRemoveEdgeOp) ApplyWorldOp(
	ctx context.Context,
	le *logrus.Entry,
	worldHandle world.WorldState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldOp applies the operation as a world operation.

func (*CanvasRemoveEdgeOp) CloneMessageVT

func (m *CanvasRemoveEdgeOp) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*CanvasRemoveEdgeOp) CloneVT

func (m *CanvasRemoveEdgeOp) CloneVT() *CanvasRemoveEdgeOp

func (*CanvasRemoveEdgeOp) EqualMessageVT

func (this *CanvasRemoveEdgeOp) EqualMessageVT(thatMsg any) bool

func (*CanvasRemoveEdgeOp) EqualVT

func (this *CanvasRemoveEdgeOp) EqualVT(that *CanvasRemoveEdgeOp) bool

func (*CanvasRemoveEdgeOp) GetEdgeIds

func (x *CanvasRemoveEdgeOp) GetEdgeIds() []string

func (*CanvasRemoveEdgeOp) GetObjectKey

func (x *CanvasRemoveEdgeOp) GetObjectKey() string

func (*CanvasRemoveEdgeOp) GetOperationTypeId

func (o *CanvasRemoveEdgeOp) GetOperationTypeId() string

GetOperationTypeId returns the operation type identifier.

func (*CanvasRemoveEdgeOp) MarshalBlock

func (o *CanvasRemoveEdgeOp) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*CanvasRemoveEdgeOp) MarshalJSON

func (x *CanvasRemoveEdgeOp) MarshalJSON() ([]byte, error)

MarshalJSON marshals the CanvasRemoveEdgeOp to JSON.

func (*CanvasRemoveEdgeOp) MarshalProtoJSON

func (x *CanvasRemoveEdgeOp) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the CanvasRemoveEdgeOp message to JSON.

func (*CanvasRemoveEdgeOp) MarshalProtoText

func (x *CanvasRemoveEdgeOp) MarshalProtoText() string

func (*CanvasRemoveEdgeOp) MarshalToSizedBufferVT

func (m *CanvasRemoveEdgeOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*CanvasRemoveEdgeOp) MarshalToVT

func (m *CanvasRemoveEdgeOp) MarshalToVT(dAtA []byte) (int, error)

func (*CanvasRemoveEdgeOp) MarshalVT

func (m *CanvasRemoveEdgeOp) MarshalVT() (dAtA []byte, err error)

func (*CanvasRemoveEdgeOp) ProtoMessage

func (*CanvasRemoveEdgeOp) ProtoMessage()

func (*CanvasRemoveEdgeOp) Reset

func (x *CanvasRemoveEdgeOp) Reset()

func (*CanvasRemoveEdgeOp) SizeVT

func (m *CanvasRemoveEdgeOp) SizeVT() (n int)

func (*CanvasRemoveEdgeOp) String

func (x *CanvasRemoveEdgeOp) String() string

func (*CanvasRemoveEdgeOp) UnmarshalBlock

func (o *CanvasRemoveEdgeOp) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*CanvasRemoveEdgeOp) UnmarshalJSON

func (x *CanvasRemoveEdgeOp) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the CanvasRemoveEdgeOp from JSON.

func (*CanvasRemoveEdgeOp) UnmarshalProtoJSON

func (x *CanvasRemoveEdgeOp) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the CanvasRemoveEdgeOp message from JSON.

func (*CanvasRemoveEdgeOp) UnmarshalVT

func (m *CanvasRemoveEdgeOp) UnmarshalVT(dAtA []byte) error

func (*CanvasRemoveEdgeOp) Validate

func (o *CanvasRemoveEdgeOp) Validate() error

Validate performs cursory checks on the op.

type CanvasRemoveNodeOp

type CanvasRemoveNodeOp struct {

	// ObjectKey is the canvas object key.
	ObjectKey string `protobuf:"bytes,1,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
	// NodeIds is the list of node IDs to remove.
	NodeIds []string `protobuf:"bytes,2,rep,name=node_ids,json=nodeIds,proto3" json:"nodeIds,omitempty"`
	// contains filtered or unexported fields
}

CanvasRemoveNodeOp is an operation to remove nodes from a canvas.

func NewCanvasRemoveNodeOp

func NewCanvasRemoveNodeOp(objKey string, nodeIDs []string) *CanvasRemoveNodeOp

NewCanvasRemoveNodeOp constructs a new CanvasRemoveNodeOp block.

func (*CanvasRemoveNodeOp) ApplyWorldObjectOp

func (o *CanvasRemoveNodeOp) ApplyWorldObjectOp(
	ctx context.Context,
	le *logrus.Entry,
	objectHandle world.ObjectState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldObjectOp applies the operation to a world object handle.

func (*CanvasRemoveNodeOp) ApplyWorldOp

func (o *CanvasRemoveNodeOp) ApplyWorldOp(
	ctx context.Context,
	le *logrus.Entry,
	worldHandle world.WorldState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldOp applies the operation as a world operation.

func (*CanvasRemoveNodeOp) CloneMessageVT

func (m *CanvasRemoveNodeOp) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*CanvasRemoveNodeOp) CloneVT

func (m *CanvasRemoveNodeOp) CloneVT() *CanvasRemoveNodeOp

func (*CanvasRemoveNodeOp) EqualMessageVT

func (this *CanvasRemoveNodeOp) EqualMessageVT(thatMsg any) bool

func (*CanvasRemoveNodeOp) EqualVT

func (this *CanvasRemoveNodeOp) EqualVT(that *CanvasRemoveNodeOp) bool

func (*CanvasRemoveNodeOp) GetNodeIds

func (x *CanvasRemoveNodeOp) GetNodeIds() []string

func (*CanvasRemoveNodeOp) GetObjectKey

func (x *CanvasRemoveNodeOp) GetObjectKey() string

func (*CanvasRemoveNodeOp) GetOperationTypeId

func (o *CanvasRemoveNodeOp) GetOperationTypeId() string

GetOperationTypeId returns the operation type identifier.

func (*CanvasRemoveNodeOp) MarshalBlock

func (o *CanvasRemoveNodeOp) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*CanvasRemoveNodeOp) MarshalJSON

func (x *CanvasRemoveNodeOp) MarshalJSON() ([]byte, error)

MarshalJSON marshals the CanvasRemoveNodeOp to JSON.

func (*CanvasRemoveNodeOp) MarshalProtoJSON

func (x *CanvasRemoveNodeOp) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the CanvasRemoveNodeOp message to JSON.

func (*CanvasRemoveNodeOp) MarshalProtoText

func (x *CanvasRemoveNodeOp) MarshalProtoText() string

func (*CanvasRemoveNodeOp) MarshalToSizedBufferVT

func (m *CanvasRemoveNodeOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*CanvasRemoveNodeOp) MarshalToVT

func (m *CanvasRemoveNodeOp) MarshalToVT(dAtA []byte) (int, error)

func (*CanvasRemoveNodeOp) MarshalVT

func (m *CanvasRemoveNodeOp) MarshalVT() (dAtA []byte, err error)

func (*CanvasRemoveNodeOp) ProtoMessage

func (*CanvasRemoveNodeOp) ProtoMessage()

func (*CanvasRemoveNodeOp) Reset

func (x *CanvasRemoveNodeOp) Reset()

func (*CanvasRemoveNodeOp) SizeVT

func (m *CanvasRemoveNodeOp) SizeVT() (n int)

func (*CanvasRemoveNodeOp) String

func (x *CanvasRemoveNodeOp) String() string

func (*CanvasRemoveNodeOp) UnmarshalBlock

func (o *CanvasRemoveNodeOp) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*CanvasRemoveNodeOp) UnmarshalJSON

func (x *CanvasRemoveNodeOp) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the CanvasRemoveNodeOp from JSON.

func (*CanvasRemoveNodeOp) UnmarshalProtoJSON

func (x *CanvasRemoveNodeOp) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the CanvasRemoveNodeOp message from JSON.

func (*CanvasRemoveNodeOp) UnmarshalVT

func (m *CanvasRemoveNodeOp) UnmarshalVT(dAtA []byte) error

func (*CanvasRemoveNodeOp) Validate

func (o *CanvasRemoveNodeOp) Validate() error

Validate performs cursory checks on the op.

type CanvasSetNodeOp

type CanvasSetNodeOp struct {

	// ObjectKey is the canvas object key.
	ObjectKey string `protobuf:"bytes,1,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
	// Node is the full replacement node.
	Node *canvas.CanvasNode `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty"`
	// contains filtered or unexported fields
}

CanvasSetNodeOp is an operation to replace a node in a canvas. The full node is provided; it replaces the existing node with the same ID.

func NewCanvasSetNodeOp

func NewCanvasSetNodeOp(objKey string, node *s4wave_canvas.CanvasNode) *CanvasSetNodeOp

NewCanvasSetNodeOp constructs a new CanvasSetNodeOp block.

func (*CanvasSetNodeOp) ApplyWorldObjectOp

func (o *CanvasSetNodeOp) ApplyWorldObjectOp(
	ctx context.Context,
	le *logrus.Entry,
	objectHandle world.ObjectState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldObjectOp applies the operation to a world object handle.

func (*CanvasSetNodeOp) ApplyWorldOp

func (o *CanvasSetNodeOp) ApplyWorldOp(
	ctx context.Context,
	le *logrus.Entry,
	worldHandle world.WorldState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldOp applies the operation as a world operation.

func (*CanvasSetNodeOp) CloneMessageVT

func (m *CanvasSetNodeOp) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*CanvasSetNodeOp) CloneVT

func (m *CanvasSetNodeOp) CloneVT() *CanvasSetNodeOp

func (*CanvasSetNodeOp) EqualMessageVT

func (this *CanvasSetNodeOp) EqualMessageVT(thatMsg any) bool

func (*CanvasSetNodeOp) EqualVT

func (this *CanvasSetNodeOp) EqualVT(that *CanvasSetNodeOp) bool

func (*CanvasSetNodeOp) GetNode

func (x *CanvasSetNodeOp) GetNode() *canvas.CanvasNode

func (*CanvasSetNodeOp) GetObjectKey

func (x *CanvasSetNodeOp) GetObjectKey() string

func (*CanvasSetNodeOp) GetOperationTypeId

func (o *CanvasSetNodeOp) GetOperationTypeId() string

GetOperationTypeId returns the operation type identifier.

func (*CanvasSetNodeOp) MarshalBlock

func (o *CanvasSetNodeOp) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*CanvasSetNodeOp) MarshalJSON

func (x *CanvasSetNodeOp) MarshalJSON() ([]byte, error)

MarshalJSON marshals the CanvasSetNodeOp to JSON.

func (*CanvasSetNodeOp) MarshalProtoJSON

func (x *CanvasSetNodeOp) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the CanvasSetNodeOp message to JSON.

func (*CanvasSetNodeOp) MarshalProtoText

func (x *CanvasSetNodeOp) MarshalProtoText() string

func (*CanvasSetNodeOp) MarshalToSizedBufferVT

func (m *CanvasSetNodeOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*CanvasSetNodeOp) MarshalToVT

func (m *CanvasSetNodeOp) MarshalToVT(dAtA []byte) (int, error)

func (*CanvasSetNodeOp) MarshalVT

func (m *CanvasSetNodeOp) MarshalVT() (dAtA []byte, err error)

func (*CanvasSetNodeOp) ProtoMessage

func (*CanvasSetNodeOp) ProtoMessage()

func (*CanvasSetNodeOp) Reset

func (x *CanvasSetNodeOp) Reset()

func (*CanvasSetNodeOp) SizeVT

func (m *CanvasSetNodeOp) SizeVT() (n int)

func (*CanvasSetNodeOp) String

func (x *CanvasSetNodeOp) String() string

func (*CanvasSetNodeOp) UnmarshalBlock

func (o *CanvasSetNodeOp) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*CanvasSetNodeOp) UnmarshalJSON

func (x *CanvasSetNodeOp) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the CanvasSetNodeOp from JSON.

func (*CanvasSetNodeOp) UnmarshalProtoJSON

func (x *CanvasSetNodeOp) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the CanvasSetNodeOp message from JSON.

func (*CanvasSetNodeOp) UnmarshalVT

func (m *CanvasSetNodeOp) UnmarshalVT(dAtA []byte) error

func (*CanvasSetNodeOp) Validate

func (o *CanvasSetNodeOp) Validate() error

Validate performs cursory checks on the op.

type Config

type Config struct {

	// EngineId restricts the LookupWorldOp resolver to a specific engine id.
	// If unset, resolves the ops for all engines.
	EngineId string `protobuf:"bytes,1,opt,name=engine_id,json=engineId,proto3" json:"engineId,omitempty"`
	// contains filtered or unexported fields
}

Config configures the LookupWorldOp controller for common space world ops.

func (*Config) CloneMessageVT

func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Config) CloneVT

func (m *Config) CloneVT() *Config

func (*Config) EqualMessageVT

func (this *Config) EqualMessageVT(thatMsg any) bool

func (*Config) EqualVT

func (this *Config) EqualVT(that *Config) bool

func (*Config) EqualsConfig

func (c *Config) EqualsConfig(other config.Config) bool

EqualsConfig checks if the config is equal to another.

func (*Config) GetConfigID

func (c *Config) GetConfigID() string

GetConfigID returns the unique string for this configuration type.

func (*Config) GetEngineId

func (x *Config) GetEngineId() string

func (*Config) MarshalJSON

func (x *Config) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Config to JSON.

func (*Config) MarshalProtoJSON

func (x *Config) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Config message to JSON.

func (*Config) MarshalProtoText

func (x *Config) MarshalProtoText() string

func (*Config) MarshalToSizedBufferVT

func (m *Config) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Config) MarshalToVT

func (m *Config) MarshalToVT(dAtA []byte) (int, error)

func (*Config) MarshalVT

func (m *Config) MarshalVT() (dAtA []byte, err error)

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (x *Config) Reset()

func (*Config) SizeVT

func (m *Config) SizeVT() (n int)

func (*Config) String

func (x *Config) String() string

func (*Config) UnmarshalJSON

func (x *Config) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Config from JSON.

func (*Config) UnmarshalProtoJSON

func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Config message from JSON.

func (*Config) UnmarshalVT

func (m *Config) UnmarshalVT(dAtA []byte) error

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configuration.

type InitCanvasDemoOp

type InitCanvasDemoOp struct {

	// ObjectKey is the object key for the Canvas.
	// Must be set.
	ObjectKey string `protobuf:"bytes,1,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
	// Timestamp is the modification time.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

InitCanvasDemoOp is an operation to initialize a Canvas with demo content. This creates a canvas object and populates it with a git repo node.

func NewInitCanvasDemoOp

func NewInitCanvasDemoOp(
	objKey string,
	ts time.Time,
) *InitCanvasDemoOp

NewInitCanvasDemoOp constructs a new InitCanvasDemoOp block.

func (*InitCanvasDemoOp) ApplyWorldObjectOp

func (o *InitCanvasDemoOp) ApplyWorldObjectOp(
	ctx context.Context,
	le *logrus.Entry,
	objectHandle world.ObjectState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldObjectOp applies the operation to a world object handle.

func (*InitCanvasDemoOp) ApplyWorldOp

func (o *InitCanvasDemoOp) ApplyWorldOp(
	ctx context.Context,
	le *logrus.Entry,
	worldHandle world.WorldState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldOp applies the operation as a world operation.

func (*InitCanvasDemoOp) CloneMessageVT

func (m *InitCanvasDemoOp) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*InitCanvasDemoOp) CloneVT

func (m *InitCanvasDemoOp) CloneVT() *InitCanvasDemoOp

func (*InitCanvasDemoOp) EqualMessageVT

func (this *InitCanvasDemoOp) EqualMessageVT(thatMsg any) bool

func (*InitCanvasDemoOp) EqualVT

func (this *InitCanvasDemoOp) EqualVT(that *InitCanvasDemoOp) bool

func (*InitCanvasDemoOp) GetObjectKey

func (x *InitCanvasDemoOp) GetObjectKey() string

func (*InitCanvasDemoOp) GetOperationTypeId

func (o *InitCanvasDemoOp) GetOperationTypeId() string

GetOperationTypeId returns the operation type identifier.

func (*InitCanvasDemoOp) GetTimestamp

func (x *InitCanvasDemoOp) GetTimestamp() *timestamppb.Timestamp

func (*InitCanvasDemoOp) MarshalBlock

func (o *InitCanvasDemoOp) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*InitCanvasDemoOp) MarshalJSON

func (x *InitCanvasDemoOp) MarshalJSON() ([]byte, error)

MarshalJSON marshals the InitCanvasDemoOp to JSON.

func (*InitCanvasDemoOp) MarshalProtoJSON

func (x *InitCanvasDemoOp) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the InitCanvasDemoOp message to JSON.

func (*InitCanvasDemoOp) MarshalProtoText

func (x *InitCanvasDemoOp) MarshalProtoText() string

func (*InitCanvasDemoOp) MarshalToSizedBufferVT

func (m *InitCanvasDemoOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*InitCanvasDemoOp) MarshalToVT

func (m *InitCanvasDemoOp) MarshalToVT(dAtA []byte) (int, error)

func (*InitCanvasDemoOp) MarshalVT

func (m *InitCanvasDemoOp) MarshalVT() (dAtA []byte, err error)

func (*InitCanvasDemoOp) ProtoMessage

func (*InitCanvasDemoOp) ProtoMessage()

func (*InitCanvasDemoOp) Reset

func (x *InitCanvasDemoOp) Reset()

func (*InitCanvasDemoOp) SizeVT

func (m *InitCanvasDemoOp) SizeVT() (n int)

func (*InitCanvasDemoOp) String

func (x *InitCanvasDemoOp) String() string

func (*InitCanvasDemoOp) UnmarshalBlock

func (o *InitCanvasDemoOp) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*InitCanvasDemoOp) UnmarshalJSON

func (x *InitCanvasDemoOp) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the InitCanvasDemoOp from JSON.

func (*InitCanvasDemoOp) UnmarshalProtoJSON

func (x *InitCanvasDemoOp) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the InitCanvasDemoOp message from JSON.

func (*InitCanvasDemoOp) UnmarshalVT

func (m *InitCanvasDemoOp) UnmarshalVT(dAtA []byte) error

func (*InitCanvasDemoOp) Validate

func (o *InitCanvasDemoOp) Validate() error

Validate performs cursory checks on the op.

type InitObjectLayoutOp

type InitObjectLayoutOp struct {

	// ObjectKey is the object key for the ObjectLayout.
	ObjectKey string `protobuf:"bytes,1,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
	// Timestamp is the modification time.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

InitObjectLayoutOp is an operation to initialize an ObjectLayout with starter content. This creates an ObjectLayout with a simple tabset containing one tab.

func NewInitObjectLayoutOp

func NewInitObjectLayoutOp(
	objKey string,
	ts time.Time,
) *InitObjectLayoutOp

NewInitObjectLayoutOp constructs a new InitObjectLayoutOp block.

func (*InitObjectLayoutOp) ApplyWorldObjectOp

func (o *InitObjectLayoutOp) ApplyWorldObjectOp(
	ctx context.Context,
	le *logrus.Entry,
	objectHandle world.ObjectState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldObjectOp applies the operation to a world object handle.

func (*InitObjectLayoutOp) ApplyWorldOp

func (o *InitObjectLayoutOp) ApplyWorldOp(
	ctx context.Context,
	le *logrus.Entry,
	worldHandle world.WorldState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldOp applies the operation as a world operation.

func (*InitObjectLayoutOp) CloneMessageVT

func (m *InitObjectLayoutOp) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*InitObjectLayoutOp) CloneVT

func (m *InitObjectLayoutOp) CloneVT() *InitObjectLayoutOp

func (*InitObjectLayoutOp) EqualMessageVT

func (this *InitObjectLayoutOp) EqualMessageVT(thatMsg any) bool

func (*InitObjectLayoutOp) EqualVT

func (this *InitObjectLayoutOp) EqualVT(that *InitObjectLayoutOp) bool

func (*InitObjectLayoutOp) GetObjectKey

func (x *InitObjectLayoutOp) GetObjectKey() string

func (*InitObjectLayoutOp) GetOperationTypeId

func (o *InitObjectLayoutOp) GetOperationTypeId() string

GetOperationTypeId returns the operation type identifier.

func (*InitObjectLayoutOp) GetTimestamp

func (x *InitObjectLayoutOp) GetTimestamp() *timestamppb.Timestamp

func (*InitObjectLayoutOp) MarshalBlock

func (o *InitObjectLayoutOp) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*InitObjectLayoutOp) MarshalJSON

func (x *InitObjectLayoutOp) MarshalJSON() ([]byte, error)

MarshalJSON marshals the InitObjectLayoutOp to JSON.

func (*InitObjectLayoutOp) MarshalProtoJSON

func (x *InitObjectLayoutOp) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the InitObjectLayoutOp message to JSON.

func (*InitObjectLayoutOp) MarshalProtoText

func (x *InitObjectLayoutOp) MarshalProtoText() string

func (*InitObjectLayoutOp) MarshalToSizedBufferVT

func (m *InitObjectLayoutOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*InitObjectLayoutOp) MarshalToVT

func (m *InitObjectLayoutOp) MarshalToVT(dAtA []byte) (int, error)

func (*InitObjectLayoutOp) MarshalVT

func (m *InitObjectLayoutOp) MarshalVT() (dAtA []byte, err error)

func (*InitObjectLayoutOp) ProtoMessage

func (*InitObjectLayoutOp) ProtoMessage()

func (*InitObjectLayoutOp) Reset

func (x *InitObjectLayoutOp) Reset()

func (*InitObjectLayoutOp) SizeVT

func (m *InitObjectLayoutOp) SizeVT() (n int)

func (*InitObjectLayoutOp) String

func (x *InitObjectLayoutOp) String() string

func (*InitObjectLayoutOp) UnmarshalBlock

func (o *InitObjectLayoutOp) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*InitObjectLayoutOp) UnmarshalJSON

func (x *InitObjectLayoutOp) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the InitObjectLayoutOp from JSON.

func (*InitObjectLayoutOp) UnmarshalProtoJSON

func (x *InitObjectLayoutOp) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the InitObjectLayoutOp message from JSON.

func (*InitObjectLayoutOp) UnmarshalVT

func (m *InitObjectLayoutOp) UnmarshalVT(dAtA []byte) error

func (*InitObjectLayoutOp) Validate

func (o *InitObjectLayoutOp) Validate() error

Validate performs cursory checks on the op.

type InitUnixFSOp

type InitUnixFSOp struct {

	// ObjectKey is the object key for the UnixFS filesystem.
	// Must be set.
	ObjectKey string `protobuf:"bytes,1,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
	// Timestamp is the modification time.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

InitUnixFSOp is an operation to initialize an empty UnixFS filesystem.

func NewInitUnixFSOp

func NewInitUnixFSOp(
	objKey string,
	ts time.Time,
) *InitUnixFSOp

NewInitUnixFSOp constructs a new InitUnixFSOp block.

func (*InitUnixFSOp) ApplyWorldObjectOp

func (o *InitUnixFSOp) ApplyWorldObjectOp(
	ctx context.Context,
	le *logrus.Entry,
	objectHandle world.ObjectState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldObjectOp applies the operation to a world object handle.

func (*InitUnixFSOp) ApplyWorldOp

func (o *InitUnixFSOp) ApplyWorldOp(
	ctx context.Context,
	le *logrus.Entry,
	worldHandle world.WorldState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldOp applies the operation as a world operation.

func (*InitUnixFSOp) CloneMessageVT

func (m *InitUnixFSOp) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*InitUnixFSOp) CloneVT

func (m *InitUnixFSOp) CloneVT() *InitUnixFSOp

func (*InitUnixFSOp) EqualMessageVT

func (this *InitUnixFSOp) EqualMessageVT(thatMsg any) bool

func (*InitUnixFSOp) EqualVT

func (this *InitUnixFSOp) EqualVT(that *InitUnixFSOp) bool

func (*InitUnixFSOp) GetObjectKey

func (x *InitUnixFSOp) GetObjectKey() string

func (*InitUnixFSOp) GetOperationTypeId

func (o *InitUnixFSOp) GetOperationTypeId() string

GetOperationTypeId returns the operation type identifier.

func (*InitUnixFSOp) GetTimestamp

func (x *InitUnixFSOp) GetTimestamp() *timestamppb.Timestamp

func (*InitUnixFSOp) MarshalBlock

func (o *InitUnixFSOp) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*InitUnixFSOp) MarshalJSON

func (x *InitUnixFSOp) MarshalJSON() ([]byte, error)

MarshalJSON marshals the InitUnixFSOp to JSON.

func (*InitUnixFSOp) MarshalProtoJSON

func (x *InitUnixFSOp) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the InitUnixFSOp message to JSON.

func (*InitUnixFSOp) MarshalProtoText

func (x *InitUnixFSOp) MarshalProtoText() string

func (*InitUnixFSOp) MarshalToSizedBufferVT

func (m *InitUnixFSOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*InitUnixFSOp) MarshalToVT

func (m *InitUnixFSOp) MarshalToVT(dAtA []byte) (int, error)

func (*InitUnixFSOp) MarshalVT

func (m *InitUnixFSOp) MarshalVT() (dAtA []byte, err error)

func (*InitUnixFSOp) ProtoMessage

func (*InitUnixFSOp) ProtoMessage()

func (*InitUnixFSOp) Reset

func (x *InitUnixFSOp) Reset()

func (*InitUnixFSOp) SizeVT

func (m *InitUnixFSOp) SizeVT() (n int)

func (*InitUnixFSOp) String

func (x *InitUnixFSOp) String() string

func (*InitUnixFSOp) UnmarshalBlock

func (o *InitUnixFSOp) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*InitUnixFSOp) UnmarshalJSON

func (x *InitUnixFSOp) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the InitUnixFSOp from JSON.

func (*InitUnixFSOp) UnmarshalProtoJSON

func (x *InitUnixFSOp) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the InitUnixFSOp message from JSON.

func (*InitUnixFSOp) UnmarshalVT

func (m *InitUnixFSOp) UnmarshalVT(dAtA []byte) error

func (*InitUnixFSOp) Validate

func (o *InitUnixFSOp) Validate() error

Validate performs cursory checks on the op.

type SetSpaceIndexPathOp

type SetSpaceIndexPathOp struct {

	// IndexPath is the new default object path, or empty to clear it.
	IndexPath string `protobuf:"bytes,1,opt,name=index_path,json=indexPath,proto3" json:"indexPath,omitempty"`
	// Timestamp is the modification time.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// ExpectedIndexPath makes automatic repair conditional on the current path.
	// A different current path leaves the settings unchanged.
	ExpectedIndexPath *string `protobuf:"bytes,3,opt,name=expected_index_path,json=expectedIndexPath,proto3,oneof" json:"expectedIndexPath,omitempty"`
	// contains filtered or unexported fields
}

SetSpaceIndexPathOp changes the default object while preserving other settings.

func (*SetSpaceIndexPathOp) ApplyWorldObjectOp

func (o *SetSpaceIndexPathOp) ApplyWorldObjectOp(
	context.Context,
	*logrus.Entry,
	world.ObjectState,
	peer.ID,
) (bool, error)

ApplyWorldObjectOp is unsupported; the operation addresses the World's settings.

func (*SetSpaceIndexPathOp) ApplyWorldOp

func (o *SetSpaceIndexPathOp) ApplyWorldOp(
	ctx context.Context,
	le *logrus.Entry,
	ws world.WorldState,
	sender peer.ID,
) (bool, error)

ApplyWorldOp changes only the index path in the transaction's current settings. Conditional repairs preserve a path another operation has already selected.

func (*SetSpaceIndexPathOp) CloneMessageVT

func (*SetSpaceIndexPathOp) CloneVT

func (*SetSpaceIndexPathOp) EqualMessageVT

func (this *SetSpaceIndexPathOp) EqualMessageVT(thatMsg any) bool

func (*SetSpaceIndexPathOp) EqualVT

func (this *SetSpaceIndexPathOp) EqualVT(that *SetSpaceIndexPathOp) bool

func (*SetSpaceIndexPathOp) GetExpectedIndexPath

func (x *SetSpaceIndexPathOp) GetExpectedIndexPath() string

func (*SetSpaceIndexPathOp) GetIndexPath

func (x *SetSpaceIndexPathOp) GetIndexPath() string

func (*SetSpaceIndexPathOp) GetOperationTypeId

func (o *SetSpaceIndexPathOp) GetOperationTypeId() string

GetOperationTypeId returns the operation identifier.

func (*SetSpaceIndexPathOp) GetTimestamp

func (x *SetSpaceIndexPathOp) GetTimestamp() *timestamppb.Timestamp

func (*SetSpaceIndexPathOp) MarshalBlock

func (o *SetSpaceIndexPathOp) MarshalBlock() ([]byte, error)

MarshalBlock encodes the operation.

func (*SetSpaceIndexPathOp) MarshalJSON

func (x *SetSpaceIndexPathOp) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SetSpaceIndexPathOp to JSON.

func (*SetSpaceIndexPathOp) MarshalProtoJSON

func (x *SetSpaceIndexPathOp) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SetSpaceIndexPathOp message to JSON.

func (*SetSpaceIndexPathOp) MarshalProtoText

func (x *SetSpaceIndexPathOp) MarshalProtoText() string

func (*SetSpaceIndexPathOp) MarshalToSizedBufferVT

func (m *SetSpaceIndexPathOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SetSpaceIndexPathOp) MarshalToVT

func (m *SetSpaceIndexPathOp) MarshalToVT(dAtA []byte) (int, error)

func (*SetSpaceIndexPathOp) MarshalVT

func (m *SetSpaceIndexPathOp) MarshalVT() (dAtA []byte, err error)

func (*SetSpaceIndexPathOp) ProtoMessage

func (*SetSpaceIndexPathOp) ProtoMessage()

func (*SetSpaceIndexPathOp) Reset

func (x *SetSpaceIndexPathOp) Reset()

func (*SetSpaceIndexPathOp) SizeVT

func (m *SetSpaceIndexPathOp) SizeVT() (n int)

func (*SetSpaceIndexPathOp) String

func (x *SetSpaceIndexPathOp) String() string

func (*SetSpaceIndexPathOp) UnmarshalBlock

func (o *SetSpaceIndexPathOp) UnmarshalBlock(data []byte) error

UnmarshalBlock decodes the operation.

func (*SetSpaceIndexPathOp) UnmarshalJSON

func (x *SetSpaceIndexPathOp) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SetSpaceIndexPathOp from JSON.

func (*SetSpaceIndexPathOp) UnmarshalProtoJSON

func (x *SetSpaceIndexPathOp) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SetSpaceIndexPathOp message from JSON.

func (*SetSpaceIndexPathOp) UnmarshalVT

func (m *SetSpaceIndexPathOp) UnmarshalVT(dAtA []byte) error

func (*SetSpaceIndexPathOp) Validate

func (o *SetSpaceIndexPathOp) Validate() error

Validate checks the operation timestamp.

type SetSpaceSettingsOp

type SetSpaceSettingsOp struct {

	// ObjectKey is the object key for the settings.
	// If empty, defaults to "settings".
	ObjectKey string `protobuf:"bytes,1,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
	// Settings contains the space settings to set.
	Settings *world.SpaceSettings `protobuf:"bytes,2,opt,name=settings,proto3" json:"settings,omitempty"`
	// Overwrite indicates to overwrite any existing object.
	Overwrite bool `protobuf:"varint,3,opt,name=overwrite,proto3" json:"overwrite,omitempty"`
	// Timestamp is the modification time.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// ExpectedKeybindingOverrides enables per-surface conflict detection for keybinding-only writes.
	ExpectedKeybindingOverrides *command.KeybindingOverrideSet `` /* 142-byte string literal not displayed */
	// contains filtered or unexported fields
}

SetSpaceSettingsOp is an operation to set the space settings. Can be applied as either an object op or a world op.

func NewSetSpaceSettingsOp

func NewSetSpaceSettingsOp(
	objKey string,
	settings *space_world.SpaceSettings,
	overwrite bool,
	ts time.Time,
) *SetSpaceSettingsOp

NewSetSpaceSettingsOp constructs a new SetSpaceSettingsOp block.

func (*SetSpaceSettingsOp) ApplyWorldObjectOp

func (o *SetSpaceSettingsOp) ApplyWorldObjectOp(
	ctx context.Context,
	le *logrus.Entry,
	objectHandle world.ObjectState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldObjectOp applies the operation to a world object handle.

func (*SetSpaceSettingsOp) ApplyWorldOp

func (o *SetSpaceSettingsOp) ApplyWorldOp(
	ctx context.Context,
	le *logrus.Entry,
	worldHandle world.WorldState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldOp applies the operation as a world operation.

func (*SetSpaceSettingsOp) CloneMessageVT

func (m *SetSpaceSettingsOp) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SetSpaceSettingsOp) CloneVT

func (m *SetSpaceSettingsOp) CloneVT() *SetSpaceSettingsOp

func (*SetSpaceSettingsOp) EqualMessageVT

func (this *SetSpaceSettingsOp) EqualMessageVT(thatMsg any) bool

func (*SetSpaceSettingsOp) EqualVT

func (this *SetSpaceSettingsOp) EqualVT(that *SetSpaceSettingsOp) bool

func (*SetSpaceSettingsOp) GetExpectedKeybindingOverrides added in v0.57.2

func (x *SetSpaceSettingsOp) GetExpectedKeybindingOverrides() *command.KeybindingOverrideSet

func (*SetSpaceSettingsOp) GetObjectKey

func (x *SetSpaceSettingsOp) GetObjectKey() string

func (*SetSpaceSettingsOp) GetOperationTypeId

func (o *SetSpaceSettingsOp) GetOperationTypeId() string

GetOperationTypeId returns the operation type identifier.

func (*SetSpaceSettingsOp) GetOverwrite

func (x *SetSpaceSettingsOp) GetOverwrite() bool

func (*SetSpaceSettingsOp) GetSettings

func (x *SetSpaceSettingsOp) GetSettings() *world.SpaceSettings

func (*SetSpaceSettingsOp) GetTimestamp

func (x *SetSpaceSettingsOp) GetTimestamp() *timestamppb.Timestamp

func (*SetSpaceSettingsOp) MarshalBlock

func (o *SetSpaceSettingsOp) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*SetSpaceSettingsOp) MarshalJSON

func (x *SetSpaceSettingsOp) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SetSpaceSettingsOp to JSON.

func (*SetSpaceSettingsOp) MarshalProtoJSON

func (x *SetSpaceSettingsOp) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SetSpaceSettingsOp message to JSON.

func (*SetSpaceSettingsOp) MarshalProtoText

func (x *SetSpaceSettingsOp) MarshalProtoText() string

func (*SetSpaceSettingsOp) MarshalToSizedBufferVT

func (m *SetSpaceSettingsOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SetSpaceSettingsOp) MarshalToVT

func (m *SetSpaceSettingsOp) MarshalToVT(dAtA []byte) (int, error)

func (*SetSpaceSettingsOp) MarshalVT

func (m *SetSpaceSettingsOp) MarshalVT() (dAtA []byte, err error)

func (*SetSpaceSettingsOp) ProtoMessage

func (*SetSpaceSettingsOp) ProtoMessage()

func (*SetSpaceSettingsOp) Reset

func (x *SetSpaceSettingsOp) Reset()

func (*SetSpaceSettingsOp) SizeVT

func (m *SetSpaceSettingsOp) SizeVT() (n int)

func (*SetSpaceSettingsOp) String

func (x *SetSpaceSettingsOp) String() string

func (*SetSpaceSettingsOp) UnmarshalBlock

func (o *SetSpaceSettingsOp) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*SetSpaceSettingsOp) UnmarshalJSON

func (x *SetSpaceSettingsOp) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SetSpaceSettingsOp from JSON.

func (*SetSpaceSettingsOp) UnmarshalProtoJSON

func (x *SetSpaceSettingsOp) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SetSpaceSettingsOp message from JSON.

func (*SetSpaceSettingsOp) UnmarshalVT

func (m *SetSpaceSettingsOp) UnmarshalVT(dAtA []byte) error

func (*SetSpaceSettingsOp) Validate

func (o *SetSpaceSettingsOp) Validate() error

Validate performs cursory checks on the op.

Jump to

Keyboard shortcuts

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