scene

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute = map[string]V

type BlockDefinition

type BlockDefinition struct {
	Name        string  `json:"name"`
	Title       string  `json:"title"`
	Family      string  `json:"family"`
	Description string  `json:"description"`
	Fields      []Field `json:"fields"`
}

func NewBlockDefinition

func NewBlockDefinition(jsonStr string) *BlockDefinition

func NewBlocksDefinition

func NewBlocksDefinition(jsonStr string) []*BlockDefinition

type BlockInstance

type BlockInstance struct {
	ID         int                  `json:"id"`
	Name       string               `json:"name"`
	Title      string               `json:"title"`
	Attributes map[string]Attribute `json:"values"`
}

type Field

type Field struct {
	Name  string `json:"name"`
	Label string `json:"label,omitempty"`
	Type  string `json:"type"`
	Attr  string `json:"attr"`
}
type Link struct {
	ID         int `json:"id"`
	OriginID   int `json:"originID"`
	OriginSlot int `json:"originSlot"`
	TargetID   int `json:"targetID"`
	TargetSlot int `json:"targetSlot"`
}

type Scene

type Scene struct {
	Blocks []BlockInstance `json:"blocks"`
	Links  []Link          `json:"links"`
}

func NewScene

func NewScene(jsonStr string) *Scene

type V

type V struct {
	Label string      `json:"label"`
	Name  string      `json:"name"`
	Type  string      `json:"type"`
	Value interface{} `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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