layer

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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 DatasetIDFrom = id.DatasetIDFrom
View Source
var DatasetIDFromRef = id.DatasetIDFromRef
View Source
var DatasetSchemaIDFrom = id.DatasetSchemaIDFrom
View Source
var DatasetSchemaIDFromRef = id.DatasetSchemaIDFromRef
View Source
var ErrInvalidID = id.ErrInvalidID
View Source
var IDFrom = id.LayerIDFrom
View Source
var IDFromRef = id.LayerIDFromRef
View Source
var InfoboxFieldIDFrom = id.InfoboxFieldIDFrom
View Source
var InfoboxFieldIDFromRef = id.InfoboxFieldIDFromRef
View Source
var MustID = id.MustLayerID
View Source
var MustInfoboxFieldID = id.MustInfoboxFieldID
View Source
var MustPluginID = id.MustPluginID
View Source
var MustPropertyID = id.MustPropertyID
View Source
var MustSceneID = id.MustSceneID
View Source
var MustTagID = id.MustTagID
View Source
var NewDatasetID = id.NewDatasetID
View Source
var NewDatasetIDSet = id.NewDatasetIDSet
View Source
var NewDatasetSchemaID = id.NewDatasetSchemaID
View Source
var NewID = id.NewLayerID
View Source
var NewIDSet = id.NewLayerIDSet
View Source
var NewInfoboxFIeldIDSet = id.NewInfoboxFieldIDSet
View Source
var NewInfoboxFieldID = id.NewInfoboxFieldID
View Source
var NewPropertyID = id.NewPropertyID
View Source
var NewPropertySchemaID = id.NewPropertySchemaID
View Source
var NewSceneID = id.NewSceneID
View Source
var NewTagID = id.NewTagID
View Source
var NewTagIDSet = id.NewTagIDSet
View Source
var OfficialPluginID = id.OfficialPluginID
View Source
var PropertyIDFrom = id.PropertyIDFrom
View Source
var PropertyIDFromRef = id.PropertyIDFromRef
View Source
var SceneIDFrom = id.SceneIDFrom
View Source
var SceneIDFromRef = id.SceneIDFromRef
View Source
var TagIDFrom = id.TagIDFrom
View Source
var TagIDFromRef = id.TagIDFromRef
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 New

func New() *Builder

func (*Builder) Extension

func (b *Builder) Extension(extension *PluginExtensionID) *Builder

func (*Builder) Group

func (b *Builder) Group() *GroupBuilder

func (*Builder) ID

func (b *Builder) ID(id ID) *Builder

func (*Builder) Infobox

func (b *Builder) Infobox(infobox *Infobox) *Builder

func (*Builder) IsVisible

func (b *Builder) IsVisible(visible bool) *Builder

func (*Builder) IsVisibleRef

func (b *Builder) IsVisibleRef(visible *bool) *Builder

func (*Builder) Item

func (b *Builder) Item() *ItemBuilder

func (*Builder) Name

func (b *Builder) Name(name string) *Builder

func (*Builder) NewID

func (b *Builder) NewID() *Builder

func (*Builder) Plugin

func (b *Builder) Plugin(plugin *PluginID) *Builder

func (*Builder) Property

func (b *Builder) Property(p *PropertyID) *Builder

func (*Builder) Scene

func (b *Builder) Scene(s SceneID) *Builder

func (*Builder) Tags

func (b *Builder) Tags(tags *TagList) *Builder

type DatasetID added in v0.4.0

type DatasetID = id.DatasetID

type DatasetIDList added in v0.6.1

type DatasetIDList = id.DatasetIDList

type DatasetIDSet added in v0.4.0

type DatasetIDSet = id.DatasetIDSet

type DatasetSchemaID added in v0.4.0

type DatasetSchemaID = id.DatasetSchemaID

type Group

type Group struct {
	// contains filtered or unexported fields
}

func GroupFromLayer

func GroupFromLayer(l Layer) *Group

func GroupFromLayerRef

func GroupFromLayerRef(l *Layer) *Group

func ToLayerGroup

func ToLayerGroup(l Layer) *Group

func ToLayerGroupRef

func ToLayerGroupRef(l *Layer) *Group

func (*Group) Extension

func (l *Group) Extension() *PluginExtensionID

func (*Group) HasInfobox

func (l *Group) HasInfobox() bool

func (*Group) ID

func (l *Group) ID() ID

func (*Group) IDRef

func (l *Group) IDRef() *ID

func (*Group) Infobox

func (l *Group) Infobox() *Infobox

func (*Group) IsLinked

func (l *Group) IsLinked() bool

func (*Group) IsRoot

func (l *Group) IsRoot() bool

func (*Group) IsVisible

func (l *Group) IsVisible() bool

func (*Group) LayerRef

func (l *Group) LayerRef() *Layer

func (*Group) Layers

func (l *Group) Layers() *IDList
func (l *Group) Link(ds DatasetSchemaID)

func (*Group) LinkedDatasetSchema

func (l *Group) LinkedDatasetSchema() *DatasetSchemaID

func (*Group) MoveLayerFrom

func (l *Group) MoveLayerFrom(id ID, index int, fromLayerGroup *Group)

func (*Group) Name

func (l *Group) Name() string

func (*Group) Plugin

func (l *Group) Plugin() *PluginID

func (*Group) Properties

func (l *Group) Properties() []PropertyID

func (*Group) Property

func (l *Group) Property() *PropertyID

func (*Group) Rename

func (l *Group) Rename(name string)

func (*Group) Scene

func (l *Group) Scene() SceneID

func (*Group) SetInfobox

func (l *Group) SetInfobox(infobox *Infobox)

func (*Group) SetPlugin

func (l *Group) SetPlugin(plugin *PluginID)

func (*Group) SetVisible

func (l *Group) SetVisible(visible bool)

func (*Group) Tags

func (l *Group) Tags() *TagList
func (l *Group) Unlink()

func (*Group) UsesPlugin

func (l *Group) UsesPlugin() bool

func (*Group) ValidateProperties

func (l *Group) ValidateProperties(pm property.Map) error

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 *PluginExtensionID) *GroupBuilder

func (*GroupBuilder) ID

func (b *GroupBuilder) ID(id ID) *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 *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 *PluginID) *GroupBuilder

func (*GroupBuilder) Property

func (b *GroupBuilder) Property(property *PropertyID) *GroupBuilder

func (*GroupBuilder) Root

func (b *GroupBuilder) Root(root bool) *GroupBuilder

func (*GroupBuilder) Scene

func (b *GroupBuilder) Scene(s SceneID) *GroupBuilder

func (*GroupBuilder) Tags

func (b *GroupBuilder) Tags(tags *TagList) *GroupBuilder

type GroupList

type GroupList []*Group

func (GroupList) Last

func (ll GroupList) Last() *Group

func (GroupList) ToLayerList

func (ll GroupList) ToLayerList() List

type ID added in v0.4.0

type ID = id.LayerID

type IDList

type IDList struct {
	// contains filtered or unexported fields
}

func NewIDList

func NewIDList(layers []ID) *IDList

func (*IDList) AddLayer

func (l *IDList) AddLayer(lid ID, index int)

func (*IDList) AddOrMoveLayer

func (l *IDList) AddOrMoveLayer(lid ID, index int)

func (*IDList) AppendLayers

func (l *IDList) AppendLayers(lid ...ID) *IDList

func (*IDList) AtRef

func (l *IDList) AtRef(index int) *ID

func (*IDList) Clone

func (l *IDList) Clone() (l2 *IDList)

func (*IDList) Empty

func (l *IDList) Empty()

func (*IDList) FindLayerIndex

func (l *IDList) FindLayerIndex(id ID) int

func (*IDList) HasLayer

func (l *IDList) HasLayer(id ID) bool

func (*IDList) LayerAt

func (l *IDList) LayerAt(index int) ID

func (*IDList) LayerCount

func (l *IDList) LayerCount() int

func (*IDList) Layers

func (l *IDList) Layers() []ID

func (*IDList) Merge

func (l *IDList) Merge(l2 *IDList)

func (*IDList) MoveLayer

func (l *IDList) MoveLayer(id ID, toIndex int)

func (*IDList) MoveLayerAt

func (l *IDList) MoveLayerAt(fromIndex int, toIndex int)

func (*IDList) RemoveLayer

func (l *IDList) RemoveLayer(ids ...ID)

func (*IDList) RemoveLayerAt

func (l *IDList) RemoveLayerAt(index int)

func (*IDList) Strings added in v0.6.1

func (l *IDList) Strings() []string

type IDSet added in v0.4.0

type IDSet = id.LayerIDSet

type Infobox

type Infobox struct {
	// contains filtered or unexported fields
}

func NewInfobox

func NewInfobox(fields []*InfoboxField, p PropertyID) *Infobox

func (*Infobox) Add

func (i *Infobox) Add(field *InfoboxField, index int)

func (*Infobox) Count

func (i *Infobox) Count() int

func (*Infobox) Field

func (i *Infobox) Field(field InfoboxFieldID) *InfoboxField

func (*Infobox) FieldAt

func (i *Infobox) FieldAt(index int) *InfoboxField

func (*Infobox) Fields

func (i *Infobox) Fields() []*InfoboxField

func (*Infobox) FieldsByPlugin added in v0.5.0

func (i *Infobox) FieldsByPlugin(pid PluginID, eid *PluginExtensionID) []*InfoboxField

func (*Infobox) Has

func (i *Infobox) Has(id InfoboxFieldID) bool

func (*Infobox) Move

func (i *Infobox) Move(field InfoboxFieldID, toIndex int)

func (*Infobox) MoveAt

func (i *Infobox) MoveAt(fromIndex int, toIndex int)

func (*Infobox) Property

func (i *Infobox) Property() PropertyID

func (*Infobox) PropertyRef

func (i *Infobox) PropertyRef() *PropertyID

func (*Infobox) Remove

func (i *Infobox) Remove(field InfoboxFieldID)

func (*Infobox) RemoveAllByPlugin

func (i *Infobox) RemoveAllByPlugin(pid PluginID, eid *PluginExtensionID) []PropertyID

func (*Infobox) RemoveAt

func (i *Infobox) RemoveAt(index int)

func (*Infobox) ValidateProperties

func (i *Infobox) ValidateProperties(pm property.Map) error

type InfoboxFIeldIDSet added in v0.4.0

type InfoboxFIeldIDSet = id.InfoboxFieldIDSet

type InfoboxField

type InfoboxField struct {
	// contains filtered or unexported fields
}

func (*InfoboxField) Extension

func (i *InfoboxField) Extension() PluginExtensionID

func (*InfoboxField) ID

func (i *InfoboxField) ID() InfoboxFieldID

func (*InfoboxField) Plugin

func (i *InfoboxField) Plugin() PluginID

func (*InfoboxField) Property

func (i *InfoboxField) Property() PropertyID

func (*InfoboxField) PropertyRef

func (i *InfoboxField) PropertyRef() *PropertyID

func (*InfoboxField) ValidateProperty

func (i *InfoboxField) ValidateProperty(pm property.Map) error

type InfoboxFieldBuilder

type InfoboxFieldBuilder struct {
	// contains filtered or unexported fields
}

func NewInfoboxField

func NewInfoboxField() *InfoboxFieldBuilder

func (*InfoboxFieldBuilder) Build

func (b *InfoboxFieldBuilder) Build() (*InfoboxField, error)

func (*InfoboxFieldBuilder) Extension

func (*InfoboxFieldBuilder) ID

func (*InfoboxFieldBuilder) MustBuild

func (b *InfoboxFieldBuilder) MustBuild() *InfoboxField

func (*InfoboxFieldBuilder) NewID

func (*InfoboxFieldBuilder) Plugin

func (*InfoboxFieldBuilder) Property

type InfoboxFieldID added in v0.4.0

type InfoboxFieldID = id.InfoboxFieldID

type Initializer

type Initializer struct {
	ID                  *ID                   `json:"id"`
	Plugin              *PluginID             `json:"plugin"`
	Extension           *PluginExtensionID    `json:"extension"`
	Name                string                `json:"name"`
	Infobox             *InitializerInfobox   `json:"infobox"`
	PropertyID          *PropertyID           `json:"propertyId"`
	Property            *property.Initializer `json:"property"`
	Layers              []*Initializer        `json:"layers"`
	LayerIDs            []ID                  `json:"layerIds"`
	IsVisible           *bool                 `json:"isVisible"`
	LinkedDatasetSchema *DatasetSchemaID      `json:"linkedDatasetSchema"`
	LinkedDataset       *DatasetID            `json:"linkedDataset"`
}

func (*Initializer) Clone

func (i *Initializer) Clone() *Initializer

func (*Initializer) Layer

func (i *Initializer) Layer(sid SceneID) (r InitializerResult, err error)

func (*Initializer) MustBeLayer

func (i *Initializer) MustBeLayer(sid SceneID) InitializerResult

type InitializerInfobox

type InitializerInfobox struct {
	PropertyID *PropertyID                `json:"propertyId"`
	Property   *property.Initializer      `json:"property"`
	Fields     []*InitializerInfoboxField `json:"fields"`
}

func (*InitializerInfobox) Clone

func (*InitializerInfobox) Infobox

func (i *InitializerInfobox) Infobox(scene SceneID) (*Infobox, property.Map, error)

type InitializerInfoboxField

type InitializerInfoboxField struct {
	ID         *InfoboxFieldID       `json:"id"`
	Plugin     PluginID              `json:"plugin"`
	Extension  PluginExtensionID     `json:"extension"`
	PropertyID *PropertyID           `json:"propertyId"`
	Property   *property.Initializer `json:"property"`
}

func (*InitializerInfoboxField) Clone

func (*InitializerInfoboxField) InfoboxField

func (i *InitializerInfoboxField) InfoboxField(scene SceneID) (*InfoboxField, *property.Property, error)

type InitializerResult

type InitializerResult struct {
	Root       ID
	Layers     Map
	Properties property.Map
}

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 ItemFromLayer(l Layer) *Item

func ItemFromLayerRef

func ItemFromLayerRef(l *Layer) *Item

func ToLayerItem

func ToLayerItem(l Layer) *Item

func ToLayerItemRef

func ToLayerItemRef(l *Layer) *Item

func (*Item) Extension

func (l *Item) Extension() *PluginExtensionID

func (*Item) HasInfobox

func (l *Item) HasInfobox() bool

func (*Item) ID

func (l *Item) ID() ID

func (*Item) IDRef

func (l *Item) IDRef() *ID

func (*Item) Infobox

func (l *Item) Infobox() *Infobox

func (*Item) IsLinked

func (l *Item) IsLinked() bool

func (*Item) IsVisible

func (l *Item) IsVisible() bool

func (*Item) LayerRef

func (l *Item) LayerRef() *Layer
func (l *Item) Link(ds DatasetID)

func (*Item) LinkedDataset

func (l *Item) LinkedDataset() *DatasetID

func (*Item) Name

func (l *Item) Name() string

func (*Item) Plugin

func (l *Item) Plugin() *PluginID

func (*Item) Properties

func (l *Item) Properties() []PropertyID

func (*Item) Property

func (l *Item) Property() *PropertyID

func (*Item) Rename

func (l *Item) Rename(name string)

func (*Item) Scene

func (l *Item) Scene() SceneID

func (*Item) SetInfobox

func (l *Item) SetInfobox(infobox *Infobox)

func (*Item) SetPlugin

func (l *Item) SetPlugin(plugin *PluginID)

func (*Item) SetVisible

func (l *Item) SetVisible(visible bool)

func (*Item) Tags

func (l *Item) Tags() *TagList
func (l *Item) Unlink()

func (*Item) UsesPlugin

func (l *Item) UsesPlugin() bool

func (*Item) ValidateProperties

func (l *Item) ValidateProperties(pm property.Map) error

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 *PluginExtensionID) *ItemBuilder

func (*ItemBuilder) ID

func (b *ItemBuilder) ID(id ID) *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 *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 *PluginID) *ItemBuilder

func (*ItemBuilder) Property

func (b *ItemBuilder) Property(p *PropertyID) *ItemBuilder

func (*ItemBuilder) Scene

func (b *ItemBuilder) Scene(s SceneID) *ItemBuilder

func (*ItemBuilder) Tags

func (b *ItemBuilder) Tags(tags *TagList) *ItemBuilder

type ItemList

type ItemList []*Item

func (ItemList) FindByDataset

func (ll ItemList) FindByDataset(ds DatasetID) *Item

func (ItemList) Last

func (ll ItemList) Last() *Item

func (ItemList) ToLayerList

func (ll ItemList) ToLayerList() List

type Layer

type Layer interface {
	ID() ID
	Name() string
	IsVisible() bool
	Plugin() *PluginID
	Extension() *PluginExtensionID
	UsesPlugin() bool
	Property() *PropertyID
	HasInfobox() bool
	Infobox() *Infobox
	Scene() SceneID
	Tags() *TagList
	Rename(string)
	SetVisible(bool)
	SetInfobox(*Infobox)
	SetPlugin(*PluginID)
	Properties() []PropertyID
	ValidateProperties(property.Map) error
}

type List

type List []*Layer

func (List) Deref

func (ll List) Deref() []Layer

func (List) Find

func (ll List) Find(lid ID) *Layer

func (List) FindByDataset

func (ll List) FindByDataset(ds DatasetID) *Item

func (List) IDs added in v0.4.0

func (ll List) IDs() *IDList

func (List) Last

func (ll List) Last() *Layer

func (List) Loader

func (ll List) Loader() Loader

func (List) Map

func (ll List) Map() Map

func (List) Pick

func (ll List) Pick(il *IDList) List

func (List) Properties added in v0.4.0

func (ll List) Properties() []PropertyID

func (List) Remove

func (ll List) Remove(lids ...ID) List

func (List) SeparateLayerItemAndGroup

func (ll List) SeparateLayerItemAndGroup() (ItemList, GroupList)

func (List) ToLayerGroupList

func (ll List) ToLayerGroupList() GroupList

func (List) ToLayerItemList

func (ll List) ToLayerItemList() ItemList

type Loader

type Loader func(context.Context, ...ID) (List, error)

func LoaderFrom

func LoaderFrom(data []Layer) Loader

func LoaderFromMap

func LoaderFromMap(data map[ID]Layer) Loader

func (Loader) Walk

func (l Loader) Walk(ctx context.Context, walker func(Layer, GroupList) error, init []ID) error

type LoaderByScene

type LoaderByScene func(context.Context, SceneID) (List, error)

type Map

type Map map[ID]*Layer

func MapFrom

func MapFrom(l Layer) Map

func (Map) Add

func (m Map) Add(layers ...*Layer) Map

func (Map) Clone

func (m Map) Clone() Map

func (Map) Group

func (m Map) Group(i ID) *Group

func (Map) Item

func (m Map) Item(i ID) *Item

func (Map) Keys

func (m Map) Keys() []ID

func (Map) Layer

func (m Map) Layer(i ID) Layer

func (Map) Len

func (m Map) Len() int

func (Map) List

func (m Map) List() List

func (Map) Merge

func (m Map) Merge(m2 Map) Map

func (Map) Pick

func (m Map) Pick(il *IDList) List

type Merged

type Merged struct {
	Original    ID
	Parent      *ID
	Name        string
	Scene       SceneID
	Property    *property.MergedMetadata
	Infobox     *MergedInfobox
	PluginID    *PluginID
	ExtensionID *PluginExtensionID
	IsVisible   bool
	Tags        []MergedTag
}

Merged represents a merged layer from two layers

func Merge

func Merge(o Layer, p *Group) *Merged

Merge merges two layers

func (*Merged) AllTagIDs added in v0.5.0

func (m *Merged) AllTagIDs() (res []TagID)

func (*Merged) AllTags added in v0.5.0

func (m *Merged) AllTags() (res []MergedTag)

func (*Merged) Properties

func (m *Merged) Properties() []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 *DatasetID) *MergedInfobox

MergeInfobox merges two infoboxes

type MergedInfoboxField

type MergedInfoboxField struct {
	ID        InfoboxFieldID
	Plugin    PluginID
	Extension PluginExtensionID
	Property  *property.MergedMetadata
}

MergedInfoboxField represents a field of MergedInfobox

type MergedTag added in v0.5.0

type MergedTag struct {
	ID   TagID
	Tags []MergedTag
}

MergedTag represents a merged tag from two layers

func MergeTags added in v0.5.0

func MergeTags(o, _p *TagList) []MergedTag

MergeInfobox merges two tag lists

type PluginExtensionID added in v0.4.0

type PluginExtensionID = id.PluginExtensionID

type PluginID added in v0.4.0

type PluginID = id.PluginID

type PropertyID added in v0.4.0

type PropertyID = id.PropertyID

type SceneID added in v0.4.0

type SceneID = id.SceneID

type Tag added in v0.3.0

type Tag interface {
	ID() TagID
	Clone() Tag
}

type TagGroup added in v0.3.0

type TagGroup struct {
	// contains filtered or unexported fields
}

func NewTagGroup added in v0.3.0

func NewTagGroup(t TagID, children []*TagItem) *TagGroup

func TagGroupFrom added in v0.3.0

func TagGroupFrom(t Tag) *TagGroup

func (*TagGroup) Add added in v0.3.0

func (t *TagGroup) Add(ti *TagItem) bool

func (*TagGroup) Children added in v0.3.0

func (t *TagGroup) Children() []*TagItem

func (*TagGroup) Clone added in v0.3.0

func (t *TagGroup) Clone() Tag

func (*TagGroup) CloneGroup added in v0.3.0

func (t *TagGroup) CloneGroup() *TagGroup

func (*TagGroup) Delete added in v0.3.0

func (t *TagGroup) Delete(ti TagID) (res bool)

func (*TagGroup) Find added in v0.3.0

func (t *TagGroup) Find(ti TagID) *TagItem

func (*TagGroup) ID added in v0.3.0

func (t *TagGroup) ID() TagID

type TagID added in v0.3.0

type TagID = id.TagID

type TagIDList added in v0.6.1

type TagIDList = id.TagIDList

type TagIDSet added in v0.5.0

type TagIDSet = id.TagIDSet

type TagItem added in v0.3.0

type TagItem struct {
	// contains filtered or unexported fields
}

func NewTagItem added in v0.3.0

func NewTagItem(t TagID) *TagItem

func TagItemFrom added in v0.3.0

func TagItemFrom(t Tag) *TagItem

func (*TagItem) Clone added in v0.3.0

func (t *TagItem) Clone() Tag

func (*TagItem) CloneItem added in v0.3.0

func (t *TagItem) CloneItem() *TagItem

func (*TagItem) ID added in v0.3.0

func (t *TagItem) ID() TagID

type TagList added in v0.3.0

type TagList struct {
	// contains filtered or unexported fields
}

func NewTagList added in v0.3.0

func NewTagList(tags []Tag) *TagList

func (*TagList) Add added in v0.3.0

func (t *TagList) Add(ti Tag) bool

func (*TagList) Clone added in v0.3.0

func (t *TagList) Clone() *TagList

func (*TagList) Delete added in v0.3.0

func (t *TagList) Delete(ti TagID) (res bool)

func (*TagList) Find added in v0.3.0

func (t *TagList) Find(ti TagID) (*TagGroup, *TagItem)

func (*TagList) FindGroup added in v0.3.0

func (t *TagList) FindGroup(ti TagID) *TagGroup

func (*TagList) FindItem added in v0.3.0

func (t *TagList) FindItem(ti TagID) *TagItem

func (*TagList) Has added in v0.3.0

func (t *TagList) Has(ti TagID) bool

func (*TagList) IsEmpty added in v0.3.0

func (t *TagList) IsEmpty() bool

func (*TagList) RootItems added in v0.3.0

func (t *TagList) RootItems() []*TagItem

func (*TagList) Tags added in v0.3.0

func (t *TagList) Tags() []Tag

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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