space_world

package
v0.56.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const SpaceSettingsObjectKey = "settings"

SpaceSettingsObjectKey is the object key for the SpaceSettings.

Variables

View Source
var SpaceSettingsBlockType = blocktype.NewBlockType(
	"space/settings",
	func() *SpaceSettings { return &SpaceSettings{} },
)

SpaceSettingsBlockType is the BlockType for SpaceSettings.

Functions

func LookupBlockType

func LookupBlockType(ctx context.Context, typeID string) (blocktype.BlockType, error)

LookupBlockType looks up a core-owned block type by ID. Returns nil if not found. Plugin-owned block types (such as the SQL cursor blocks owned by the sql plugin) resolve through their plugin's LookupBlockType directive handler, not here.

func LookupSpaceIndexObjectType added in v0.55.0

func LookupSpaceIndexObjectType(ctx context.Context, ws world.WorldState) (string, error)

LookupSpaceIndexObjectType returns the durable ObjectType selected by SpaceSettings.index_path. Missing settings, an empty index, and stale index paths have no semantic type and return an empty string.

func NewSpaceSettingsBlock

func NewSpaceSettingsBlock() block.Block

NewSpaceSettingsBlock constructs a new SpaceSettings block.

Types

type SpaceSettings

type SpaceSettings struct {

	// IndexPath is the default URL path to display at /.
	IndexPath string `protobuf:"bytes,1,opt,name=index_path,json=indexPath,proto3" json:"indexPath,omitempty"`
	// PluginIds lists manifest IDs of plugins this Space uses.
	// Shared with all Space participants.
	PluginIds []string `protobuf:"bytes,2,rep,name=plugin_ids,json=pluginIds,proto3" json:"pluginIds,omitempty"`
	// KeybindingOverrides stores Space-scope keybinding overrides.
	KeybindingOverrides *command.KeybindingOverrideSet `protobuf:"bytes,3,opt,name=keybinding_overrides,json=keybindingOverrides,proto3" json:"keybindingOverrides,omitempty"`
	// contains filtered or unexported fields
}

SpaceSettings is an object containing the settings for a Space.

Note: the space name and other "public" details are in the SpaceSoMeta.

func LookupSpaceSettings

func LookupSpaceSettings(ctx context.Context, ws world.WorldState) (*SpaceSettings, world.ObjectState, error)

LookupSpaceSettings looks up the SpaceSettings object in the world. Returns nil, nil, nil if the settings object does not exist.

func (*SpaceSettings) CloneMessageVT

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

func (*SpaceSettings) CloneVT

func (m *SpaceSettings) CloneVT() *SpaceSettings

func (*SpaceSettings) EqualMessageVT

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

func (*SpaceSettings) EqualVT

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

func (*SpaceSettings) GetIndexPath

func (x *SpaceSettings) GetIndexPath() string

func (*SpaceSettings) GetKeybindingOverrides added in v0.53.0

func (x *SpaceSettings) GetKeybindingOverrides() *command.KeybindingOverrideSet

func (*SpaceSettings) GetPluginIds

func (x *SpaceSettings) GetPluginIds() []string

func (*SpaceSettings) MarshalBlock

func (s *SpaceSettings) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*SpaceSettings) MarshalJSON

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

MarshalJSON marshals the SpaceSettings to JSON.

func (*SpaceSettings) MarshalProtoJSON

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

MarshalProtoJSON marshals the SpaceSettings message to JSON.

func (*SpaceSettings) MarshalProtoText

func (x *SpaceSettings) MarshalProtoText() string

func (*SpaceSettings) MarshalToSizedBufferVT

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

func (*SpaceSettings) MarshalToVT

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

func (*SpaceSettings) MarshalVT

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

func (*SpaceSettings) ProtoMessage

func (*SpaceSettings) ProtoMessage()

func (*SpaceSettings) Reset

func (x *SpaceSettings) Reset()

func (*SpaceSettings) SizeVT

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

func (*SpaceSettings) String

func (x *SpaceSettings) String() string

func (*SpaceSettings) UnmarshalBlock

func (s *SpaceSettings) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block from binary.

func (*SpaceSettings) UnmarshalJSON

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

UnmarshalJSON unmarshals the SpaceSettings from JSON.

func (*SpaceSettings) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the SpaceSettings message from JSON.

func (*SpaceSettings) UnmarshalVT

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

type WorldContents

type WorldContents struct {

	// Objects contains the list of world objects.
	Objects []*WorldContentsObject `protobuf:"bytes,1,rep,name=objects,proto3" json:"objects,omitempty"`
	// ObjectTypes contains the list of world object types.
	ObjectTypes []*WorldContentsObjectType `protobuf:"bytes,2,rep,name=object_types,json=objectTypes,proto3" json:"objectTypes,omitempty"`
	// contains filtered or unexported fields
}

WorldContents contains a list of world objects and types.

func BuildWorldContents

func BuildWorldContents(ctx context.Context, ws world.WorldState) (*WorldContents, error)

BuildWorldContents builds the list of world objects.

func (*WorldContents) CloneMessageVT

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

func (*WorldContents) CloneVT

func (m *WorldContents) CloneVT() *WorldContents

func (*WorldContents) EqualMessageVT

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

func (*WorldContents) EqualVT

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

func (*WorldContents) GetObjectTypes

func (x *WorldContents) GetObjectTypes() []*WorldContentsObjectType

func (*WorldContents) GetObjects

func (x *WorldContents) GetObjects() []*WorldContentsObject

func (*WorldContents) MarshalJSON

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

MarshalJSON marshals the WorldContents to JSON.

func (*WorldContents) MarshalProtoJSON

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

MarshalProtoJSON marshals the WorldContents message to JSON.

func (*WorldContents) MarshalProtoText

func (x *WorldContents) MarshalProtoText() string

func (*WorldContents) MarshalToSizedBufferVT

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

func (*WorldContents) MarshalToVT

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

func (*WorldContents) MarshalVT

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

func (*WorldContents) ProtoMessage

func (*WorldContents) ProtoMessage()

func (*WorldContents) Reset

func (x *WorldContents) Reset()

func (*WorldContents) SizeVT

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

func (*WorldContents) String

func (x *WorldContents) String() string

func (*WorldContents) UnmarshalJSON

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

UnmarshalJSON unmarshals the WorldContents from JSON.

func (*WorldContents) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the WorldContents message from JSON.

func (*WorldContents) UnmarshalVT

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

type WorldContentsObject

type WorldContentsObject struct {

	// ObjectKey is the key of the object in the world.
	ObjectKey string `protobuf:"bytes,1,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
	// ParentObjectKey is the key of the parent of the object.
	// Can be empty.
	ParentObjectKey string `protobuf:"bytes,2,opt,name=parent_object_key,json=parentObjectKey,proto3" json:"parentObjectKey,omitempty"`
	// ObjectType is the type of the object.
	ObjectType string `protobuf:"bytes,3,opt,name=object_type,json=objectType,proto3" json:"objectType,omitempty"`
	// contains filtered or unexported fields
}

WorldContentsObject is an entry in the WorldContents.

func (*WorldContentsObject) CloneMessageVT

func (*WorldContentsObject) CloneVT

func (*WorldContentsObject) EqualMessageVT

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

func (*WorldContentsObject) EqualVT

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

func (*WorldContentsObject) GetObjectKey

func (x *WorldContentsObject) GetObjectKey() string

func (*WorldContentsObject) GetObjectType

func (x *WorldContentsObject) GetObjectType() string

func (*WorldContentsObject) GetParentObjectKey

func (x *WorldContentsObject) GetParentObjectKey() string

func (*WorldContentsObject) MarshalJSON

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

MarshalJSON marshals the WorldContentsObject to JSON.

func (*WorldContentsObject) MarshalProtoJSON

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

MarshalProtoJSON marshals the WorldContentsObject message to JSON.

func (*WorldContentsObject) MarshalProtoText

func (x *WorldContentsObject) MarshalProtoText() string

func (*WorldContentsObject) MarshalToSizedBufferVT

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

func (*WorldContentsObject) MarshalToVT

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

func (*WorldContentsObject) MarshalVT

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

func (*WorldContentsObject) ProtoMessage

func (*WorldContentsObject) ProtoMessage()

func (*WorldContentsObject) Reset

func (x *WorldContentsObject) Reset()

func (*WorldContentsObject) SizeVT

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

func (*WorldContentsObject) String

func (x *WorldContentsObject) String() string

func (*WorldContentsObject) UnmarshalJSON

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

UnmarshalJSON unmarshals the WorldContentsObject from JSON.

func (*WorldContentsObject) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the WorldContentsObject message from JSON.

func (*WorldContentsObject) UnmarshalVT

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

type WorldContentsObjectType

type WorldContentsObjectType struct {

	// ObjectType is the type id.
	ObjectType string `protobuf:"bytes,1,opt,name=object_type,json=objectType,proto3" json:"objectType,omitempty"`
	// contains filtered or unexported fields
}

WorldContentsObjectType is an entry in the WorldContents.

func (*WorldContentsObjectType) CloneMessageVT

func (*WorldContentsObjectType) CloneVT

func (*WorldContentsObjectType) EqualMessageVT

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

func (*WorldContentsObjectType) EqualVT

func (*WorldContentsObjectType) GetObjectType

func (x *WorldContentsObjectType) GetObjectType() string

func (*WorldContentsObjectType) MarshalJSON

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

MarshalJSON marshals the WorldContentsObjectType to JSON.

func (*WorldContentsObjectType) MarshalProtoJSON

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

MarshalProtoJSON marshals the WorldContentsObjectType message to JSON.

func (*WorldContentsObjectType) MarshalProtoText

func (x *WorldContentsObjectType) MarshalProtoText() string

func (*WorldContentsObjectType) MarshalToSizedBufferVT

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

func (*WorldContentsObjectType) MarshalToVT

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

func (*WorldContentsObjectType) MarshalVT

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

func (*WorldContentsObjectType) ProtoMessage

func (*WorldContentsObjectType) ProtoMessage()

func (*WorldContentsObjectType) Reset

func (x *WorldContentsObjectType) Reset()

func (*WorldContentsObjectType) SizeVT

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

func (*WorldContentsObjectType) String

func (x *WorldContentsObjectType) String() string

func (*WorldContentsObjectType) UnmarshalJSON

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

UnmarshalJSON unmarshals the WorldContentsObjectType from JSON.

func (*WorldContentsObjectType) UnmarshalProtoJSON

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

UnmarshalProtoJSON unmarshals the WorldContentsObjectType message from JSON.

func (*WorldContentsObjectType) UnmarshalVT

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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