Documentation ¶
Index ¶
- Variables
- type Builder
- func (b *Builder) Extension(extension *id.PluginExtensionID) *Builder
- func (b *Builder) Group() *GroupBuilder
- func (b *Builder) ID(id id.LayerID) *Builder
- func (b *Builder) Infobox(infobox *Infobox) *Builder
- func (b *Builder) IsVisible(visible bool) *Builder
- func (b *Builder) IsVisibleRef(visible *bool) *Builder
- func (b *Builder) Item() *ItemBuilder
- func (b *Builder) Name(name string) *Builder
- func (b *Builder) NewID() *Builder
- func (b *Builder) Plugin(plugin *id.PluginID) *Builder
- func (b *Builder) Property(p *id.PropertyID) *Builder
- func (b *Builder) Scene(s id.SceneID) *Builder
- func (b *Builder) Tags(tags *tag.List) *Builder
- type Group
- func (l *Group) AttachTag(t id.TagID) error
- func (l *Group) DetachTag(t id.TagID) error
- func (l *Group) Extension() *id.PluginExtensionID
- func (l *Group) HasInfobox() bool
- func (l *Group) ID() id.LayerID
- func (l *Group) IDRef() *id.LayerID
- func (l *Group) Infobox() *Infobox
- func (l *Group) IsLinked() bool
- func (l *Group) IsRoot() bool
- func (l *Group) IsVisible() bool
- func (l *Group) LayerRef() *Layer
- func (l *Group) Layers() *IDList
- func (l *Group) Link(ds id.DatasetSchemaID)
- func (l *Group) LinkedDatasetSchema() *id.DatasetSchemaID
- func (l *Group) MoveLayerFrom(id id.LayerID, index int, fromLayerGroup *Group)
- func (l *Group) Name() string
- func (l *Group) Plugin() *id.PluginID
- func (l *Group) Properties() []id.PropertyID
- func (l *Group) Property() *id.PropertyID
- func (l *Group) Rename(name string)
- func (l *Group) Scene() id.SceneID
- func (l *Group) SetInfobox(infobox *Infobox)
- func (l *Group) SetPlugin(plugin *id.PluginID)
- func (l *Group) SetVisible(visible bool)
- func (l *Group) Tags() *tag.List
- func (l *Group) Unlink()
- func (l *Group) UsesPlugin() bool
- func (l *Group) ValidateProperties(pm property.Map) error
- type GroupBuilder
- func (b *GroupBuilder) Build() (*Group, error)
- func (b *GroupBuilder) Extension(extension *id.PluginExtensionID) *GroupBuilder
- func (b *GroupBuilder) ID(id id.LayerID) *GroupBuilder
- func (b *GroupBuilder) Infobox(infobox *Infobox) *GroupBuilder
- func (b *GroupBuilder) IsVisible(visible bool) *GroupBuilder
- func (b *GroupBuilder) Layers(ll *IDList) *GroupBuilder
- func (b *GroupBuilder) LinkedDatasetSchema(linkedDatasetSchema *id.DatasetSchemaID) *GroupBuilder
- func (b *GroupBuilder) MustBuild() *Group
- func (b *GroupBuilder) Name(name string) *GroupBuilder
- func (b *GroupBuilder) NewID() *GroupBuilder
- func (b *GroupBuilder) Plugin(plugin *id.PluginID) *GroupBuilder
- func (b *GroupBuilder) Property(property *id.PropertyID) *GroupBuilder
- func (b *GroupBuilder) Root(root bool) *GroupBuilder
- func (b *GroupBuilder) Scene(s id.SceneID) *GroupBuilder
- func (b *GroupBuilder) Tags(tags *tag.List) *GroupBuilder
- type GroupList
- type IDList
- func (l *IDList) AddLayer(lid id.LayerID, index int)
- func (l *IDList) AddOrMoveLayer(lid id.LayerID, index int)
- func (l *IDList) AppendLayers(lid ...id.LayerID) *IDList
- func (l *IDList) AtRef(index int) *id.LayerID
- func (l *IDList) Clone() (l2 *IDList)
- func (l *IDList) Empty()
- func (l *IDList) FindLayerIndex(id id.LayerID) int
- func (l *IDList) HasLayer(id id.LayerID) bool
- func (l *IDList) LayerAt(index int) id.LayerID
- func (l *IDList) LayerCount() int
- func (l *IDList) Layers() []id.LayerID
- func (l *IDList) Merge(l2 *IDList)
- func (l *IDList) MoveLayer(id id.LayerID, toIndex int)
- func (l *IDList) MoveLayerAt(fromIndex int, toIndex int)
- func (l *IDList) RemoveLayer(id id.LayerID)
- func (l *IDList) RemoveLayerAt(index int)
- type Infobox
- func (i *Infobox) Add(field *InfoboxField, index int)
- func (i *Infobox) Count() int
- func (i *Infobox) Field(field id.InfoboxFieldID) *InfoboxField
- func (i *Infobox) FieldAt(index int) *InfoboxField
- func (i *Infobox) Fields() []*InfoboxField
- func (i *Infobox) Has(id id.InfoboxFieldID) bool
- func (i *Infobox) Move(field id.InfoboxFieldID, toIndex int)
- func (i *Infobox) MoveAt(fromIndex int, toIndex int)
- func (i *Infobox) Property() id.PropertyID
- func (i *Infobox) PropertyRef() *id.PropertyID
- func (i *Infobox) Remove(field id.InfoboxFieldID)
- func (i *Infobox) RemoveAllByPlugin(pid id.PluginID) []id.PropertyID
- func (i *Infobox) RemoveAt(index int)
- func (i *Infobox) ValidateProperties(pm property.Map) error
- type InfoboxField
- func (i *InfoboxField) Extension() id.PluginExtensionID
- func (i *InfoboxField) ID() id.InfoboxFieldID
- func (i *InfoboxField) Plugin() id.PluginID
- func (i *InfoboxField) Property() id.PropertyID
- func (i *InfoboxField) PropertyRef() *id.PropertyID
- func (i *InfoboxField) ValidateProperty(pm property.Map) error
- type InfoboxFieldBuilder
- func (b *InfoboxFieldBuilder) Build() (*InfoboxField, error)
- func (b *InfoboxFieldBuilder) Extension(extension id.PluginExtensionID) *InfoboxFieldBuilder
- func (b *InfoboxFieldBuilder) ID(id id.InfoboxFieldID) *InfoboxFieldBuilder
- func (b *InfoboxFieldBuilder) MustBuild() *InfoboxField
- func (b *InfoboxFieldBuilder) NewID() *InfoboxFieldBuilder
- func (b *InfoboxFieldBuilder) Plugin(plugin id.PluginID) *InfoboxFieldBuilder
- func (b *InfoboxFieldBuilder) Property(p id.PropertyID) *InfoboxFieldBuilder
- type Initializer
- type InitializerInfobox
- type InitializerInfoboxField
- type InitializerResult
- type Item
- func (l *Item) AttachTag(t id.TagID) error
- func (l *Item) DetachTag(t id.TagID) error
- func (l *Item) Extension() *id.PluginExtensionID
- func (l *Item) HasInfobox() bool
- func (l *Item) ID() id.LayerID
- func (l *Item) IDRef() *id.LayerID
- func (l *Item) Infobox() *Infobox
- func (l *Item) IsLinked() bool
- func (l *Item) IsVisible() bool
- func (l *Item) LayerRef() *Layer
- func (l *Item) Link(ds id.DatasetID)
- func (l *Item) LinkedDataset() *id.DatasetID
- func (l *Item) Name() string
- func (l *Item) Plugin() *id.PluginID
- func (l *Item) Properties() []id.PropertyID
- func (l *Item) Property() *id.PropertyID
- func (l *Item) Rename(name string)
- func (l *Item) Scene() id.SceneID
- func (l *Item) SetInfobox(infobox *Infobox)
- func (l *Item) SetPlugin(plugin *id.PluginID)
- func (l *Item) SetVisible(visible bool)
- func (l *Item) Tags() *tag.List
- func (l *Item) Unlink()
- func (l *Item) UsesPlugin() bool
- func (l *Item) ValidateProperties(pm property.Map) error
- type ItemBuilder
- func (b *ItemBuilder) Build() (*Item, error)
- func (b *ItemBuilder) Extension(extension *id.PluginExtensionID) *ItemBuilder
- func (b *ItemBuilder) ID(id id.LayerID) *ItemBuilder
- func (b *ItemBuilder) Infobox(infobox *Infobox) *ItemBuilder
- func (b *ItemBuilder) IsVisible(visible bool) *ItemBuilder
- func (b *ItemBuilder) LinkedDataset(linkedDataset *id.DatasetID) *ItemBuilder
- func (b *ItemBuilder) MustBuild() *Item
- func (b *ItemBuilder) Name(name string) *ItemBuilder
- func (b *ItemBuilder) NewID() *ItemBuilder
- func (b *ItemBuilder) Plugin(plugin *id.PluginID) *ItemBuilder
- func (b *ItemBuilder) Property(p *id.PropertyID) *ItemBuilder
- func (b *ItemBuilder) Scene(s id.SceneID) *ItemBuilder
- func (b *ItemBuilder) Tags(tags *tag.List) *ItemBuilder
- type ItemList
- type Layer
- type List
- func (ll List) Deref() []Layer
- func (ll List) Find(lid id.LayerID) *Layer
- func (ll List) FindByDataset(ds id.DatasetID) *Item
- func (ll List) Last() *Layer
- func (ll List) Loader() Loader
- func (ll List) Map() Map
- func (ll List) Pick(il *IDList) List
- func (ll List) Remove(lids ...id.LayerID) List
- func (ll List) SeparateLayerItemAndGroup() (ItemList, GroupList)
- func (ll List) ToLayerGroupList() GroupList
- func (ll List) ToLayerItemList() ItemList
- type Loader
- type LoaderByScene
- type Map
- func (m Map) Add(layers ...*Layer) Map
- func (m Map) Clone() Map
- func (m Map) Group(i id.LayerID) *Group
- func (m Map) Item(i id.LayerID) *Item
- func (m Map) Keys() []id.LayerID
- func (m Map) Layer(i id.LayerID) Layer
- func (m Map) Len() int
- func (m Map) List() List
- func (m Map) Merge(m2 Map) Map
- func (m Map) Pick(il *IDList) List
- type Merged
- type MergedInfobox
- type MergedInfoboxField
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInitializationInfobox = errors.New("infobox") ErrInitializationInfoboxWith = rerror.With(ErrInitializationInfobox) ErrInitializationProperty = errors.New("property") ErrInitializationPropertyWith = rerror.With(ErrInitializationProperty) )
View Source
var ( ErrDuplicatedTag = errors.New("duplicated tag") ErrTagNotFound = errors.New("tag not found") )
View Source
var WalkerSkipChildren = errors.New("LAYER_WALKER_SKIP_CHILDREN")
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) Group ¶
func (b *Builder) Group() *GroupBuilder
func (*Builder) IsVisibleRef ¶
func (*Builder) Item ¶
func (b *Builder) Item() *ItemBuilder
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func GroupFromLayer ¶
func GroupFromLayerRef ¶
func ToLayerGroup ¶
func ToLayerGroupRef ¶
func (*Group) Extension ¶
func (l *Group) Extension() *id.PluginExtensionID
func (*Group) HasInfobox ¶
func (l *Group) HasInfobox() bool
func (*Group) Link ¶
func (l *Group) Link(ds id.DatasetSchemaID)
func (*Group) LinkedDatasetSchema ¶
func (l *Group) LinkedDatasetSchema() *id.DatasetSchemaID
func (*Group) MoveLayerFrom ¶
func (*Group) Properties ¶
func (l *Group) Properties() []id.PropertyID
func (*Group) Property ¶
func (l *Group) Property() *id.PropertyID
func (*Group) SetInfobox ¶
func (*Group) SetVisible ¶
func (*Group) UsesPlugin ¶
type GroupBuilder ¶
type GroupBuilder struct {
// contains filtered or unexported fields
}
func NewGroup ¶
func NewGroup() *GroupBuilder
func (*GroupBuilder) Build ¶
func (b *GroupBuilder) Build() (*Group, error)
func (*GroupBuilder) Extension ¶
func (b *GroupBuilder) Extension(extension *id.PluginExtensionID) *GroupBuilder
func (*GroupBuilder) ID ¶
func (b *GroupBuilder) ID(id id.LayerID) *GroupBuilder
func (*GroupBuilder) Infobox ¶
func (b *GroupBuilder) Infobox(infobox *Infobox) *GroupBuilder
func (*GroupBuilder) IsVisible ¶
func (b *GroupBuilder) IsVisible(visible bool) *GroupBuilder
func (*GroupBuilder) Layers ¶
func (b *GroupBuilder) Layers(ll *IDList) *GroupBuilder
func (*GroupBuilder) LinkedDatasetSchema ¶
func (b *GroupBuilder) LinkedDatasetSchema(linkedDatasetSchema *id.DatasetSchemaID) *GroupBuilder
func (*GroupBuilder) MustBuild ¶
func (b *GroupBuilder) MustBuild() *Group
func (*GroupBuilder) Name ¶
func (b *GroupBuilder) Name(name string) *GroupBuilder
func (*GroupBuilder) NewID ¶
func (b *GroupBuilder) NewID() *GroupBuilder
func (*GroupBuilder) Plugin ¶
func (b *GroupBuilder) Plugin(plugin *id.PluginID) *GroupBuilder
func (*GroupBuilder) Property ¶
func (b *GroupBuilder) Property(property *id.PropertyID) *GroupBuilder
func (*GroupBuilder) Root ¶
func (b *GroupBuilder) Root(root bool) *GroupBuilder
func (*GroupBuilder) Scene ¶
func (b *GroupBuilder) Scene(s id.SceneID) *GroupBuilder
func (*GroupBuilder) Tags ¶
func (b *GroupBuilder) Tags(tags *tag.List) *GroupBuilder
type IDList ¶
type IDList struct {
// contains filtered or unexported fields
}
IDList _
func (*IDList) AddOrMoveLayer ¶
AddOrMoveLayer _
func (*IDList) AppendLayers ¶
AppendLayers _
type Infobox ¶
type Infobox struct {
// contains filtered or unexported fields
}
func NewInfobox ¶
func NewInfobox(fields []*InfoboxField, p id.PropertyID) *Infobox
func (*Infobox) Add ¶
func (i *Infobox) Add(field *InfoboxField, index int)
func (*Infobox) Field ¶
func (i *Infobox) Field(field id.InfoboxFieldID) *InfoboxField
func (*Infobox) FieldAt ¶
func (i *Infobox) FieldAt(index int) *InfoboxField
func (*Infobox) Fields ¶
func (i *Infobox) Fields() []*InfoboxField
func (*Infobox) Property ¶
func (i *Infobox) Property() id.PropertyID
func (*Infobox) PropertyRef ¶
func (i *Infobox) PropertyRef() *id.PropertyID
func (*Infobox) Remove ¶
func (i *Infobox) Remove(field id.InfoboxFieldID)
func (*Infobox) RemoveAllByPlugin ¶
func (i *Infobox) RemoveAllByPlugin(pid id.PluginID) []id.PropertyID
type InfoboxField ¶
type InfoboxField struct {
// contains filtered or unexported fields
}
func (*InfoboxField) Extension ¶
func (i *InfoboxField) Extension() id.PluginExtensionID
func (*InfoboxField) ID ¶
func (i *InfoboxField) ID() id.InfoboxFieldID
func (*InfoboxField) Plugin ¶
func (i *InfoboxField) Plugin() id.PluginID
func (*InfoboxField) Property ¶
func (i *InfoboxField) Property() id.PropertyID
func (*InfoboxField) PropertyRef ¶
func (i *InfoboxField) PropertyRef() *id.PropertyID
func (*InfoboxField) ValidateProperty ¶
func (i *InfoboxField) ValidateProperty(pm property.Map) error
type InfoboxFieldBuilder ¶
type InfoboxFieldBuilder struct {
// contains filtered or unexported fields
}
InfoboxFieldBuilder _
func NewInfoboxField ¶
func NewInfoboxField() *InfoboxFieldBuilder
func (*InfoboxFieldBuilder) Build ¶
func (b *InfoboxFieldBuilder) Build() (*InfoboxField, error)
func (*InfoboxFieldBuilder) Extension ¶
func (b *InfoboxFieldBuilder) Extension(extension id.PluginExtensionID) *InfoboxFieldBuilder
func (*InfoboxFieldBuilder) ID ¶
func (b *InfoboxFieldBuilder) ID(id id.InfoboxFieldID) *InfoboxFieldBuilder
func (*InfoboxFieldBuilder) MustBuild ¶
func (b *InfoboxFieldBuilder) MustBuild() *InfoboxField
func (*InfoboxFieldBuilder) NewID ¶
func (b *InfoboxFieldBuilder) NewID() *InfoboxFieldBuilder
func (*InfoboxFieldBuilder) Plugin ¶
func (b *InfoboxFieldBuilder) Plugin(plugin id.PluginID) *InfoboxFieldBuilder
func (*InfoboxFieldBuilder) Property ¶
func (b *InfoboxFieldBuilder) Property(p id.PropertyID) *InfoboxFieldBuilder
type Initializer ¶
type Initializer struct { ID *id.LayerID `json:"id"` Plugin *id.PluginID `json:"plugin"` Extension *id.PluginExtensionID `json:"extension"` Name string `json:"name"` Infobox *InitializerInfobox `json:"infobox"` PropertyID *id.PropertyID `json:"propertyId"` Property *property.Initializer `json:"property"` Layers []*Initializer `json:"layers"` LayerIDs []id.LayerID `json:"layerIds"` IsVisible *bool `json:"isVisible"` LinkedDatasetSchema *id.DatasetSchemaID `json:"linkedDatasetSchema"` LinkedDataset *id.DatasetID `json:"linkedDataset"` }
func (*Initializer) Clone ¶
func (i *Initializer) Clone() *Initializer
func (*Initializer) Layer ¶
func (i *Initializer) Layer(sid id.SceneID) (r InitializerResult, err error)
func (*Initializer) MustBeLayer ¶
func (i *Initializer) MustBeLayer(sid id.SceneID) InitializerResult
type InitializerInfobox ¶
type InitializerInfobox struct { PropertyID *id.PropertyID `json:"propertyId"` Property *property.Initializer `json:"property"` Fields []*InitializerInfoboxField `json:"fields"` }
func (*InitializerInfobox) Clone ¶
func (i *InitializerInfobox) Clone() *InitializerInfobox
type InitializerInfoboxField ¶
type InitializerInfoboxField struct { ID *id.InfoboxFieldID `json:"id"` Plugin id.PluginID `json:"plugin"` Extension id.PluginExtensionID `json:"extension"` PropertyID *id.PropertyID `json:"propertyId"` Property *property.Initializer `json:"property"` }
func (*InitializerInfoboxField) Clone ¶
func (i *InitializerInfoboxField) Clone() *InitializerInfoboxField
func (*InitializerInfoboxField) InfoboxField ¶
func (i *InitializerInfoboxField) InfoboxField(scene id.SceneID) (*InfoboxField, *property.Property, error)
type InitializerResult ¶
func (InitializerResult) RootLayer ¶
func (r InitializerResult) RootLayer() Layer
func (InitializerResult) RootLayerGroup ¶
func (r InitializerResult) RootLayerGroup() *Group
func (InitializerResult) RootLayerItem ¶
func (r InitializerResult) RootLayerItem() *Item
func (InitializerResult) RootLayerRef ¶
func (r InitializerResult) RootLayerRef() *Layer
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
func ItemFromLayer ¶
func ItemFromLayerRef ¶
func ToLayerItem ¶
func ToLayerItemRef ¶
func (*Item) Extension ¶
func (l *Item) Extension() *id.PluginExtensionID
func (*Item) HasInfobox ¶
func (l *Item) HasInfobox() bool
func (*Item) LinkedDataset ¶
func (*Item) Properties ¶
func (l *Item) Properties() []id.PropertyID
func (*Item) Property ¶
func (l *Item) Property() *id.PropertyID
func (*Item) SetInfobox ¶
func (*Item) SetVisible ¶
func (*Item) UsesPlugin ¶
type ItemBuilder ¶
type ItemBuilder struct {
// contains filtered or unexported fields
}
func NewItem ¶
func NewItem() *ItemBuilder
func (*ItemBuilder) Build ¶
func (b *ItemBuilder) Build() (*Item, error)
func (*ItemBuilder) Extension ¶
func (b *ItemBuilder) Extension(extension *id.PluginExtensionID) *ItemBuilder
func (*ItemBuilder) ID ¶
func (b *ItemBuilder) ID(id id.LayerID) *ItemBuilder
func (*ItemBuilder) Infobox ¶
func (b *ItemBuilder) Infobox(infobox *Infobox) *ItemBuilder
func (*ItemBuilder) IsVisible ¶
func (b *ItemBuilder) IsVisible(visible bool) *ItemBuilder
func (*ItemBuilder) LinkedDataset ¶
func (b *ItemBuilder) LinkedDataset(linkedDataset *id.DatasetID) *ItemBuilder
func (*ItemBuilder) MustBuild ¶
func (b *ItemBuilder) MustBuild() *Item
func (*ItemBuilder) Name ¶
func (b *ItemBuilder) Name(name string) *ItemBuilder
func (*ItemBuilder) NewID ¶
func (b *ItemBuilder) NewID() *ItemBuilder
func (*ItemBuilder) Plugin ¶
func (b *ItemBuilder) Plugin(plugin *id.PluginID) *ItemBuilder
func (*ItemBuilder) Property ¶
func (b *ItemBuilder) Property(p *id.PropertyID) *ItemBuilder
func (*ItemBuilder) Scene ¶
func (b *ItemBuilder) Scene(s id.SceneID) *ItemBuilder
func (*ItemBuilder) Tags ¶
func (b *ItemBuilder) Tags(tags *tag.List) *ItemBuilder
type Layer ¶
type Layer interface { ID() id.LayerID Name() string IsVisible() bool Plugin() *id.PluginID Extension() *id.PluginExtensionID UsesPlugin() bool Property() *id.PropertyID HasInfobox() bool Infobox() *Infobox Scene() id.SceneID Tags() *tag.List Rename(string) SetVisible(bool) SetInfobox(*Infobox) SetPlugin(*id.PluginID) Properties() []id.PropertyID ValidateProperties(property.Map) error AttachTag(t id.TagID) error DetachTag(t id.TagID) error }
type List ¶
type List []*Layer
func (List) SeparateLayerItemAndGroup ¶
func (List) ToLayerGroupList ¶
func (List) ToLayerItemList ¶
type Loader ¶
func LoaderFrom ¶
type Merged ¶
type Merged struct { Original id.LayerID Parent *id.LayerID Name string Scene id.SceneID Property *property.MergedMetadata Infobox *MergedInfobox PluginID *id.PluginID ExtensionID *id.PluginExtensionID }
Merged represents a merged layer from two layers
func (*Merged) Properties ¶
func (m *Merged) Properties() []id.PropertyID
Properties returns all property IDs in Merged
type MergedInfobox ¶
type MergedInfobox struct { Property *property.MergedMetadata Fields []*MergedInfoboxField }
MergedInfobox represents a merged info box from two layers
func MergeInfobox ¶
func MergeInfobox(o *Infobox, p *Infobox, linked *id.DatasetID) *MergedInfobox
MergeInfobox merges two infoboxes
type MergedInfoboxField ¶
type MergedInfoboxField struct { ID id.InfoboxFieldID Plugin id.PluginID Extension id.PluginExtensionID Property *property.MergedMetadata }
MergedInfoboxField represents a field of MergedInfobox
Source Files ¶
Click to show internal directories.
Click to hide internal directories.