Documentation ¶
Index ¶
- Constants
- type Activity
- type ActivityData
- type ActivityType
- type Asset2d
- type Asset2dMeta
- type Asset2dOptions
- type Asset3d
- type Asset3dMeta
- type Asset3dOptions
- type Attribute
- type AttributeID
- type AttributeOptions
- type AttributePayload
- type AttributeType
- type AttributeTypeID
- type AttributeValue
- type Balance
- type BigInt
- type Blockchain
- type Contract
- type NFT
- type Node
- type NodeAttribute
- type NodeAttributeID
- type Object
- type ObjectActivity
- type ObjectActivityID
- type ObjectAttribute
- type ObjectAttributeID
- type ObjectChildPlacement
- type ObjectOptions
- type ObjectType
- type ObjectUserAttribute
- type ObjectUserAttributeID
- type ObjectVisibleType
- type PermissionsAttributeOption
- type PermissionsRoleType
- type Plugin
- type PluginMeta
- type PluginOptions
- type PosBusAutoAttributeOption
- type PosBusAutoScopeAttributeOption
- type RenderAutoAttributeOption
- type SlotContentType
- type SlotType
- type Stake
- type User
- type UserActivity
- type UserActivityID
- type UserAsset3d
- type UserAttribute
- type UserAttributeID
- type UserObject
- type UserObjectID
- type UserObjectValue
- type UserOptions
- type UserProfile
- type UserType
- type UserUserAttribute
- type UserUserAttributeID
- type Wallet
Constants ¶
View Source
const RenderAutoHashFieldName = "auto_render_hash"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Activity ¶ added in v0.4.0
type Activity struct { ActivityID umid.UMID `db:"activity_id" json:"activity_id"` UserID umid.UMID `db:"user_id" json:"user_id"` ObjectID umid.UMID `db:"object_id" json:"object_id"` Type *ActivityType `db:"type" json:"type"` Data *ActivityData `db:"data" json:"data"` CreatedAt time.Time `db:"created_at" json:"created_at"` }
type ActivityData ¶ added in v0.4.0
type ActivityData struct { Position *cmath.Vec3 `db:"position" json:"position"` Description *string `db:"description" json:"description"` Hash *string `db:"hash" json:"hash"` TokenSymbol *string `db:"token_symbol" json:"token_symbol"` TokenAmount *string `db:"token_amount" json:"token_amount"` BCTxHash *string `db:"bc_tx_hash" json:"bc_tx_hash"` BCLogIndex *string `db:"bc_log_index" json:"bc_log_index"` }
func (ActivityData) MarshalMUS ¶ added in v0.4.0
func (v ActivityData) MarshalMUS(buf []byte) int
MarshalMUS fills buf with the MUS encoding of v.
func (ActivityData) SizeMUS ¶ added in v0.4.0
func (v ActivityData) SizeMUS() int
SizeMUS returns the size of the MUS-encoded v.
func (*ActivityData) UnmarshalMUS ¶ added in v0.4.0
func (v *ActivityData) UnmarshalMUS(buf []byte) (int, error)
UnmarshalMUS parses the MUS-encoded buf, and sets the result to *v.
type ActivityType ¶ added in v0.4.0
type ActivityType string
const ( ActivityTypeVideo ActivityType = "video" ActivityTypeScreenshot ActivityType = "screenshot" ActivityTypeWorldCreated ActivityType = "world_created" ActivityTypeStake ActivityType = "stake" ActivityTypeUnstake ActivityType = "unstake" )
func (ActivityType) MarshalMUS ¶ added in v0.4.0
func (v ActivityType) MarshalMUS(buf []byte) int
MarshalMUS fills buf with the MUS encoding of v.
func (ActivityType) SizeMUS ¶ added in v0.4.0
func (v ActivityType) SizeMUS() int
SizeMUS returns the size of the MUS-encoded v.
func (*ActivityType) UnmarshalMUS ¶ added in v0.4.0
func (v *ActivityType) UnmarshalMUS(buf []byte) (int, error)
UnmarshalMUS parses the MUS-encoded buf, and sets the result to *v.
type Asset2d ¶
type Asset2d struct { Asset2dID umid.UMID `db:"asset_2d_id" json:"asset_2d_id"` Meta Asset2dMeta `db:"meta" json:"meta"` Options *Asset2dOptions `db:"options" json:"options"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
type Asset2dMeta ¶
type Asset2dOptions ¶
type Asset3d ¶
type Asset3d struct { Asset3dID umid.UMID `db:"asset_3d_id" json:"asset_3d_id"` Meta *Asset3dMeta `db:"meta" json:"meta"` Options *Asset3dOptions `db:"options" json:"options"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
type Asset3dMeta ¶
type Asset3dOptions ¶
type Attribute ¶
type Attribute struct { AttributeID *AttributePayload }
func NewAttribute ¶
func NewAttribute(attributeID AttributeID, payload *AttributePayload) *Attribute
type AttributeID ¶
type AttributeID AttributeTypeID
func NewAttributeID ¶
func NewAttributeID(pluginID umid.UMID, name string) AttributeID
type AttributeOptions ¶
func NewAttributeOptions ¶
func NewAttributeOptions() *AttributeOptions
type AttributePayload ¶
type AttributePayload struct { Value *AttributeValue `db:"value" json:"value"` Options *AttributeOptions `db:"options" json:"options"` }
func NewAttributePayload ¶
func NewAttributePayload(value *AttributeValue, options *AttributeOptions) *AttributePayload
type AttributeType ¶
type AttributeType struct { AttributeTypeID Description *string `db:"description" json:"description"` Options *AttributeOptions `db:"options" json:"options"` }
type AttributeTypeID ¶
type AttributeTypeID struct { PluginID umid.UMID `db:"plugin_id" json:"plugin_id"` Name string `db:"attribute_name" json:"attribute_name"` }
func NewAttributeTypeID ¶ added in v0.4.0
func NewAttributeTypeID(pluginID umid.UMID, name string) AttributeTypeID
type AttributeValue ¶
func NewAttributeValue ¶
func NewAttributeValue() *AttributeValue
type Blockchain ¶ added in v0.4.0
type NodeAttribute ¶
type NodeAttribute struct { NodeAttributeID *AttributePayload CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
func NewNodeAttribute ¶
func NewNodeAttribute(nodeAttributeID NodeAttributeID, payload *AttributePayload) *NodeAttribute
type NodeAttributeID ¶
type NodeAttributeID struct {
AttributeID
}
func NewNodeAttributeID ¶
func NewNodeAttributeID(attributeID AttributeID) NodeAttributeID
type Object ¶ added in v0.4.0
type Object struct { ObjectID umid.UMID `db:"object_id" json:"object_id"` ObjectTypeID umid.UMID `db:"object_type_id" json:"object_type_id"` OwnerID umid.UMID `db:"owner_id" json:"owner_id"` ParentID umid.UMID `db:"parent_id" json:"parent_id"` Asset2dID *umid.UMID `db:"asset_2d_id" json:"asset_2d_id"` Asset3dID *umid.UMID `db:"asset_3d_id" json:"asset_3d_id"` Options *ObjectOptions `db:"options" json:"options"` Transform *cmath.Transform `db:"transform" json:"transform"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
type ObjectActivity ¶ added in v0.4.0
type ObjectActivity struct { ObjectActivityID CreatedAt time.Time `db:"created_at" json:"created_at"` }
func NewObjectActivity ¶ added in v0.4.0
func NewObjectActivity(objectActivityID ObjectActivityID) *ObjectActivity
type ObjectActivityID ¶ added in v0.4.0
type ObjectActivityID struct { ObjectID umid.UMID `db:"object_id" json:"object_id"` ActivityID umid.UMID `db:"activity_id" json:"activity_id"` }
func NewObjectActivityID ¶ added in v0.4.0
func NewObjectActivityID(objectID umid.UMID, activityID umid.UMID) ObjectActivityID
type ObjectAttribute ¶ added in v0.4.0
type ObjectAttribute struct { ObjectAttributeID *AttributePayload CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
func NewObjectAttribute ¶ added in v0.4.0
func NewObjectAttribute(objectAttributeID ObjectAttributeID, payload *AttributePayload) *ObjectAttribute
type ObjectAttributeID ¶ added in v0.4.0
type ObjectAttributeID struct { AttributeID ObjectID umid.UMID `db:"object_id" json:"object_id"` }
func NewObjectAttributeID ¶ added in v0.4.0
func NewObjectAttributeID(attributeID AttributeID, objectID umid.UMID) ObjectAttributeID
type ObjectChildPlacement ¶ added in v0.4.0
type ObjectOptions ¶ added in v0.4.0
type ObjectOptions struct { Asset2dOptions any `db:"asset_2d_options" json:"asset_2d_options,omitempty"` Asset3dOptions any `db:"asset_3d_options" json:"asset_3d_options,omitempty"` FrameTemplates map[string]any `db:"frame_templates" json:"frame_templates,omitempty"` SpawnPoint *cmath.TransformNoScale `db:"spawn_point" json:"spawn_point,omitempty"` ChildPlacements map[umid.UMID]*ObjectChildPlacement `db:"child_placement" json:"child_placement,omitempty"` AllowedChildren []string `db:"allowed_children" json:"allowed_children,omitempty"` ChildLimit *uint `db:"child_limit" json:"child_limit,omitempty"` DefaultTiles []any `db:"default_tiles" json:"default_tiles,omitempty"` InfoUIID *umid.UMID `db:"infoui_id" json:"infoui_id,omitempty"` Minimap *bool `db:"minimap" json:"minimap,omitempty"` Visible *ObjectVisibleType `db:"visible" json:"visible,omitempty"` Editable *bool `db:"editable" json:"editable,omitempty"` Private *bool `db:"private" json:"private,omitempty"` DashboardPlugins []string `db:"dashboard_plugins" json:"dashboard_plugins,omitempty"` Subs map[string]any `db:"subs" json:"subs,omitempty"` }
type ObjectType ¶ added in v0.4.0
type ObjectType struct { ObjectTypeID umid.UMID `db:"object_type_id" json:"object_type_id"` Asset2dID *umid.UMID `db:"asset_2d_id" json:"asset_2d_id"` Asset3dID *umid.UMID `db:"asset_3d_id" json:"asset_3d_id"` ObjectTypeName string `db:"object_type_name" json:"object_type_name"` CategoryName string `db:"category_name" json:"category_name"` Description *string `db:"description" json:"description"` Options *ObjectOptions `db:"options" json:"options"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
type ObjectUserAttribute ¶ added in v0.4.0
type ObjectUserAttribute struct { ObjectUserAttributeID *AttributePayload CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
func NewObjectUserAttribute ¶ added in v0.4.0
func NewObjectUserAttribute( objectUserAttributeID ObjectUserAttributeID, payload *AttributePayload, ) *ObjectUserAttribute
type ObjectUserAttributeID ¶ added in v0.4.0
type ObjectUserAttributeID struct { AttributeID ObjectID umid.UMID `db:"object_id" json:"object_id"` UserID umid.UMID `db:"user_id" json:"user_id"` }
func NewObjectUserAttributeID ¶ added in v0.4.0
func NewObjectUserAttributeID(attributeID AttributeID, objectID, userID umid.UMID) ObjectUserAttributeID
type ObjectVisibleType ¶ added in v0.4.0
type ObjectVisibleType byte
const ( InvisibleObjectVisibleType ObjectVisibleType = 0b00 UI2DObjectVisibleType ObjectVisibleType = 0b01 UI3DObjectVisibleType ObjectVisibleType = 0b10 AllObjectVisibleType ObjectVisibleType = 0b11 )
type PermissionsAttributeOption ¶ added in v0.4.0
type PermissionsRoleType ¶ added in v0.4.0
type PermissionsRoleType string
const ( PermissionAny PermissionsRoleType = "any" // Anybody can access. PermissionUser PermissionsRoleType = "user" // Only authenticated users, this includes temporary guests. PermissionUserOwner PermissionsRoleType = "user_owner" // A user who 'owns' the attribute, this depends on the type of attribute. PermissionAdmin PermissionsRoleType = "admin" // A user who has been given the admin role through the object tree (entry.UserObject). PermissionTargetUser PermissionsRoleType = "target_user" // The target of a UserUserAttribute )
type Plugin ¶
type Plugin struct { PluginID umid.UMID `db:"plugin_id" json:"plugin_id"` Meta PluginMeta `db:"meta" json:"meta"` Options *PluginOptions `db:"options" json:"options"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
type PluginMeta ¶
type PluginOptions ¶
type PosBusAutoAttributeOption ¶
type PosBusAutoAttributeOption struct { Scope []PosBusAutoScopeAttributeOption `db:"scope" json:"scope"` Topic string `db:"topic" json:"topic"` }
type PosBusAutoScopeAttributeOption ¶
type PosBusAutoScopeAttributeOption string
const ( InvalidPosBusAutoScopeAttributeOption PosBusAutoScopeAttributeOption = "" NodePosBusAutoScopeAttributeOption PosBusAutoScopeAttributeOption = "node" WorldPosBusAutoScopeAttributeOption PosBusAutoScopeAttributeOption = "world" ObjectPosBusAutoScopeAttributeOption PosBusAutoScopeAttributeOption = "object" UserPosBusAutoScopeAttributeOption PosBusAutoScopeAttributeOption = "user" )
type RenderAutoAttributeOption ¶ added in v0.4.0
type RenderAutoAttributeOption struct { SlotType SlotType `db:"slot_type" json:"slot_type"` SlotName string `db:"slot_name" json:"slot_name"` ValueField string `db:"value_field" json:"value_field"` ContentType SlotContentType `db:"content_type" json:"content_type"` TextRenderTemplate string `db:"text_render_template" json:"text_render_template"` }
type SlotContentType ¶ added in v0.4.0
type SlotContentType string
const ( SlotContentTypeInvalid SlotContentType = "" SlotContentTypeString SlotContentType = "string" SlotContentTypeNumber SlotContentType = "number" SlotContentTypeImage SlotContentType = "image" SlotContentTypeText SlotContentType = "text" SlotContentTypeVideo SlotContentType = "video" SlotContentTypeAudio SlotContentType = "audio" )
type SlotType ¶ added in v0.4.0
type SlotType string
func (SlotType) MarshalMUS ¶ added in v0.4.0
MarshalMUS fills buf with the MUS encoding of v.
type Stake ¶ added in v0.4.0
type Stake struct { WalletID []byte `db:"wallet_id"` BlockchainID umid.UMID `db:"blockchain_id"` ObjectID umid.UMID `db:"object_id"` LastComment string `db:"last_comment"` Amount *BigInt `db:"amount"` //TODO should be big.Int CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` Kind uint8 `db:"kind"` Count uint8 `json:"count"` }
type User ¶
type User struct { UserID umid.UMID `db:"user_id" json:"user_id"` UserTypeID umid.UMID `db:"user_type_id" json:"user_type_id"` Profile UserProfile `db:"profile" json:"profile"` Options *UserOptions `db:"options" json:"options"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` Auth map[string]any `db:"auth" json:"auth"` }
type UserActivity ¶ added in v0.4.0
type UserActivity struct { UserActivityID CreatedAt time.Time `db:"created_at" json:"created_at"` }
func NewUserActivity ¶ added in v0.4.0
func NewUserActivity(userActivityID UserActivityID) *UserActivity
type UserActivityID ¶ added in v0.4.0
type UserActivityID struct { UserID umid.UMID `db:"user_id" json:"user_id"` ActivityID umid.UMID `db:"activity_id" json:"activity_id"` }
func NewUserActivityID ¶ added in v0.4.0
func NewUserActivityID(userID umid.UMID, activityID umid.UMID) UserActivityID
type UserAsset3d ¶ added in v0.4.0
type UserAsset3d struct { Asset3dID umid.UMID `db:"asset_3d_id" json:"asset_3d_id"` UserID umid.UMID `db:"user_id" json:"user_id"` Meta *Asset3dMeta `db:"meta" json:"meta"` Private bool `db:"is_private" json:"is_private"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
type UserAttribute ¶
type UserAttribute struct { UserAttributeID *AttributePayload }
func NewUserAttribute ¶
func NewUserAttribute(userAttributeID UserAttributeID, payload *AttributePayload) *UserAttribute
type UserAttributeID ¶
type UserAttributeID struct { AttributeID UserID umid.UMID `db:"user_id" json:"user_id"` }
func NewUserAttributeID ¶
func NewUserAttributeID(attributeID AttributeID, userID umid.UMID) UserAttributeID
type UserObject ¶ added in v0.4.0
type UserObject struct { UserObjectID Value *UserObjectValue `db:"value" json:"value"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
func NewUserObject ¶ added in v0.4.0
func NewUserObject(userObjectID UserObjectID, value *UserObjectValue) *UserObject
type UserObjectID ¶ added in v0.4.0
type UserObjectID struct { UserID umid.UMID `db:"user_id" json:"user_id"` ObjectID umid.UMID `db:"object_id" json:"object_id"` }
func NewUserObjectID ¶ added in v0.4.0
func NewUserObjectID(userID umid.UMID, objectID umid.UMID) UserObjectID
type UserObjectValue ¶ added in v0.4.0
func NewUserObjectValue ¶ added in v0.4.0
func NewUserObjectValue() *UserObjectValue
type UserOptions ¶
type UserOptions struct {
IsGuest *bool `db:"is_guest" json:"is_guest"`
}
type UserProfile ¶
type UserProfile struct { Name *string `db:"name" json:"name"` Bio *string `db:"bio" json:"bio"` Location *string `db:"location" json:"location"` AvatarHash *string `db:"avatar_hash" json:"avatar_hash"` ProfileLink *string `db:"profile_link" json:"profile_link"` OnBoarded *bool `db:"onboarded" json:"onboarded"` }
type UserType ¶
type UserType struct { UserTypeID umid.UMID `db:"user_type_id" json:"user_type_id"` UserTypeName string `db:"user_type_name" json:"user_type_name"` Description string `db:"description" json:"description"` Options *UserOptions `db:"options" json:"options"` }
type UserUserAttribute ¶
type UserUserAttribute struct { UserUserAttributeID *AttributePayload }
func NewUserUserAttribute ¶
func NewUserUserAttribute(userUserAttributeID UserUserAttributeID, payload *AttributePayload) *UserUserAttribute
type UserUserAttributeID ¶
type UserUserAttributeID struct { AttributeID SourceUserID umid.UMID `db:"source_user_id" json:"source_user_id"` TargetUserID umid.UMID `db:"target_user_id" json:"target_user_id"` }
func NewUserUserAttributeID ¶
func NewUserUserAttributeID(attributeID AttributeID, sourceUserID, targetUserID umid.UMID) UserUserAttributeID
Source Files ¶
- ActivityData.mus.go
- ActivityType.mus.go
- SlotType.mus.go
- activity.go
- asset_2d.go
- asset_3d.go
- attribute.go
- attribute_type.go
- balance.go
- blockchain.go
- contract.go
- entry.go
- nft.go
- node.go
- object.go
- object_activity.go
- object_type.go
- plugin.go
- stake.go
- user.go
- user_activity.go
- user_object.go
- user_type.go
- wallet.go
Click to show internal directories.
Click to hide internal directories.