Documentation ¶
Index ¶
- Variables
- type Builder
- func (b *Builder) Build() (*Scene, error)
- func (b *Builder) Clusters(cl *ClusterList) *Builder
- func (b *Builder) ID(id ID) *Builder
- func (b *Builder) MustBuild() *Scene
- func (b *Builder) NewID() *Builder
- func (b *Builder) Plugins(plugins *Plugins) *Builder
- func (b *Builder) Project(prj ProjectID) *Builder
- func (b *Builder) Property(p PropertyID) *Builder
- func (b *Builder) RootLayer(rootLayer LayerID) *Builder
- func (b *Builder) Team(team TeamID) *Builder
- func (b *Builder) UpdatedAt(updatedAt time.Time) *Builder
- func (b *Builder) Widgets(widgets *Widgets) *Builder
- type Cluster
- type ClusterID
- type ClusterList
- type ID
- type IDList
- type LayerID
- type List
- type LockMode
- type Plugin
- type PluginExtensionID
- type PluginID
- type Plugins
- func (p *Plugins) Add(sp *Plugin)
- func (p *Plugins) Has(id PluginID) bool
- func (p *Plugins) HasPlugin(id PluginID) bool
- func (p *Plugins) HasPluginByName(name string) bool
- func (p *Plugins) Plugin(pluginID PluginID) *Plugin
- func (p *Plugins) PluginByName(name string) *Plugin
- func (p *Plugins) Plugins() []*Plugin
- func (p *Plugins) Properties() []PropertyID
- func (p *Plugins) Property(id PluginID) *PropertyID
- func (p *Plugins) Remove(pid PluginID)
- func (p *Plugins) Upgrade(from, to PluginID, pr *PropertyID, deleteProperty bool)
- type ProjectID
- type PropertyID
- type Scene
- func (s *Scene) Clusters() *ClusterList
- func (s *Scene) CreatedAt() time.Time
- func (s *Scene) ID() ID
- func (s *Scene) IsTeamIncluded(teams []TeamID) bool
- func (s *Scene) Plugins() *Plugins
- func (s *Scene) Project() ProjectID
- func (s *Scene) Properties() []PropertyID
- func (s *Scene) Property() PropertyID
- func (s *Scene) RootLayer() LayerID
- func (s *Scene) SetUpdatedAt(updatedAt time.Time)
- func (s *Scene) Team() TeamID
- func (s *Scene) UpdatedAt() time.Time
- func (s *Scene) Widgets() *Widgets
- type TeamID
- type Widget
- func (w *Widget) Clone() *Widget
- func (w *Widget) Enabled() bool
- func (w *Widget) Extended() bool
- func (w *Widget) Extension() PluginExtensionID
- func (w *Widget) ID() WidgetID
- func (w *Widget) Plugin() PluginID
- func (w *Widget) Property() PropertyID
- func (w *Widget) SetEnabled(enabled bool)
- func (w *Widget) SetExtended(extended bool)
- func (w *Widget) SetPlugin(pid PluginID)
- type WidgetAlignSystem
- func (was *WidgetAlignSystem) Area(loc WidgetLocation) *WidgetArea
- func (was *WidgetAlignSystem) Find(wid WidgetID) (int, WidgetLocation)
- func (was *WidgetAlignSystem) Move(wid WidgetID, location WidgetLocation, index int)
- func (was *WidgetAlignSystem) Remove(wid WidgetID)
- func (w *WidgetAlignSystem) SetZone(t WidgetZoneType, z *WidgetZone)
- func (was *WidgetAlignSystem) Zone(zone WidgetZoneType) *WidgetZone
- type WidgetAlignType
- type WidgetArea
- func (a *WidgetArea) Add(wid WidgetID, index int)
- func (a *WidgetArea) AddAll(wids []WidgetID)
- func (a *WidgetArea) Alignment() WidgetAlignType
- func (a *WidgetArea) Find(wid WidgetID) int
- func (a *WidgetArea) Move(from, to int)
- func (a *WidgetArea) Remove(wid WidgetID)
- func (a *WidgetArea) SetAlignment(at WidgetAlignType)
- func (a *WidgetArea) WidgetIDs() WidgetIDList
- type WidgetAreaType
- type WidgetID
- type WidgetIDList
- type WidgetLocation
- type WidgetSection
- type WidgetSectionType
- type WidgetZone
- type WidgetZoneType
- type Widgets
- func (w *Widgets) Add(sw *Widget)
- func (w *Widgets) Alignment() *WidgetAlignSystem
- func (w *Widgets) Has(wid WidgetID) bool
- func (w *Widgets) Properties() []PropertyID
- func (w *Widgets) Remove(wid WidgetID)
- func (w *Widgets) RemoveAllByPlugin(p PluginID, e *PluginExtensionID) (res []PropertyID)
- func (w *Widgets) UpgradePlugin(oldp, newp PluginID)
- func (w *Widgets) Widget(wid WidgetID) *Widget
- func (w *Widgets) Widgets() []*Widget
Constants ¶
This section is empty.
Variables ¶
View Source
var ClusterIDFrom = id.ClusterIDFrom
View Source
var ClusterIDFromRef = id.ClusterIDFromRef
View Source
var (
ErrDuplicatedWidgetInstance = errors.New("duplicated widget instance")
)
View Source
var ErrInvalidID = id.ErrInvalidID
View Source
var ErrSceneIsLocked error = errors.New("scene is locked")
View Source
var IDFrom = id.SceneIDFrom
View Source
var IDFromRef = id.SceneIDFromRef
View Source
var LayerIDFrom = id.LayerIDFrom
View Source
var LayerIDFromRef = id.LayerIDFromRef
View Source
var MustClusterID = id.MustClusterID
View Source
var MustID = id.MustSceneID
View Source
var MustLayerID = id.MustLayerID
View Source
var MustPluginID = id.MustPluginID
View Source
var MustProjectID = id.MustProjectID
View Source
var MustPropertyID = id.MustPropertyID
View Source
var MustTeamID = id.MustTeamID
View Source
var MustWidgetID = id.MustWidgetID
View Source
var NewClusterID = id.NewClusterID
View Source
var NewID = id.NewSceneID
View Source
var NewLayerID = id.NewLayerID
View Source
var NewPluginID = id.NewPluginID
View Source
var NewProjectID = id.NewProjectID
View Source
var NewPropertyID = id.NewPropertyID
View Source
var NewTeamID = id.NewTeamID
View Source
var NewWidgetID = id.NewWidgetID
View Source
var OfficialPluginID = id.OfficialPluginID
View Source
var PluginIDFrom = id.PluginIDFrom
View Source
var PluginIDFromRef = id.PluginIDFromRef
View Source
var ProjectIDFrom = id.ProjectIDFrom
View Source
var ProjectIDFromRef = id.ProjectIDFromRef
View Source
var PropertyIDFrom = id.PropertyIDFrom
View Source
var PropertyIDFromRef = id.PropertyIDFromRef
View Source
var TeamIDFrom = id.TeamIDFrom
View Source
var TeamIDFromRef = id.TeamIDFromRef
View Source
var WidgetIDFrom = id.WidgetIDFrom
View Source
var WidgetIDFromRef = id.WidgetIDFromRef
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) Clusters ¶ added in v0.3.0
func (b *Builder) Clusters(cl *ClusterList) *Builder
func (*Builder) Property ¶
func (b *Builder) Property(p PropertyID) *Builder
type Cluster ¶ added in v0.3.0
type Cluster struct {
// contains filtered or unexported fields
}
func NewCluster ¶ added in v0.3.0
func NewCluster(cid ClusterID, name string, pid PropertyID) (*Cluster, error)
func (*Cluster) Property ¶ added in v0.3.0
func (c *Cluster) Property() PropertyID
func (*Cluster) UpdateProperty ¶ added in v0.3.0
func (c *Cluster) UpdateProperty(pid PropertyID)
type ClusterList ¶ added in v0.3.0
type ClusterList struct {
// contains filtered or unexported fields
}
func NewClusterList ¶ added in v0.3.0
func NewClusterList() *ClusterList
func NewClusterListFrom ¶ added in v0.3.0
func NewClusterListFrom(clusters []*Cluster) *ClusterList
func (*ClusterList) Add ¶ added in v0.3.0
func (tl *ClusterList) Add(clusters ...*Cluster)
func (*ClusterList) Clusters ¶ added in v0.3.0
func (tl *ClusterList) Clusters() []*Cluster
func (*ClusterList) Get ¶ added in v0.3.0
func (tl *ClusterList) Get(cid ClusterID) *Cluster
func (*ClusterList) Has ¶ added in v0.3.0
func (tl *ClusterList) Has(tid ClusterID) bool
func (*ClusterList) Properties ¶ added in v0.3.0
func (tl *ClusterList) Properties() []PropertyID
func (*ClusterList) Remove ¶ added in v0.3.0
func (tl *ClusterList) Remove(clusters ...ClusterID)
type IDList ¶ added in v0.6.0
type IDList = id.SceneIDList
type List ¶ added in v0.6.0
type List []*Scene
func (List) FilterByID ¶ added in v0.6.0
func (List) FilterByTeam ¶ added in v0.6.0
type LockMode ¶
type LockMode string
LockMode はシーンのロック状態を表します。
const ( // LockModeFree はロックがかかっていない状態です。 LockModeFree LockMode = "" // LockModePending は処理待ち中です。データの変更は無制限に変更はできます。 LockModePending LockMode = "pending" // LockModePluginUpgrading はプラグインをアップグレード中です。シーンへの各種操作ができません。 LockModePluginUpgrading LockMode = "plugin upgrading" // LockModeDatasetSyncing はデータセットを同期中です。シーンへの各種操作ができません。 LockModeDatasetSyncing LockMode = "dataset syncing" // LockModePublishing はシーンを書き出し中です。シーンへの各種操作ができません。 LockModePublishing LockMode = "publishing" )
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func NewPlugin ¶
func NewPlugin(plugin PluginID, property *PropertyID) *Plugin
func (*Plugin) Property ¶
func (s *Plugin) Property() *PropertyID
type PluginExtensionID ¶ added in v0.4.0
type PluginExtensionID = id.PluginExtensionID
type Plugins ¶ added in v0.4.0
type Plugins struct {
// contains filtered or unexported fields
}
func NewPlugins ¶ added in v0.4.0
func (*Plugins) HasPluginByName ¶ added in v0.5.0
func (*Plugins) PluginByName ¶ added in v0.5.0
func (*Plugins) Properties ¶ added in v0.4.0
func (p *Plugins) Properties() []PropertyID
func (*Plugins) Property ¶ added in v0.4.0
func (p *Plugins) Property(id PluginID) *PropertyID
type PropertyID ¶ added in v0.4.0
type PropertyID = id.PropertyID
type Scene ¶
type Scene struct {
// contains filtered or unexported fields
}
func (*Scene) Clusters ¶ added in v0.3.0
func (s *Scene) Clusters() *ClusterList
func (*Scene) IsTeamIncluded ¶
func (*Scene) Properties ¶
func (s *Scene) Properties() []PropertyID
func (*Scene) Property ¶
func (s *Scene) Property() PropertyID
func (*Scene) SetUpdatedAt ¶
type Widget ¶
type Widget struct {
// contains filtered or unexported fields
}
func MustWidget ¶ added in v0.5.0
func MustWidget(wid WidgetID, plugin PluginID, extension PluginExtensionID, property PropertyID, enabled bool, extended bool) *Widget
func NewWidget ¶
func NewWidget(wid WidgetID, plugin PluginID, extension PluginExtensionID, property PropertyID, enabled, extended bool) (*Widget, error)
func (*Widget) Extension ¶
func (w *Widget) Extension() PluginExtensionID
func (*Widget) Property ¶
func (w *Widget) Property() PropertyID
func (*Widget) SetEnabled ¶
func (*Widget) SetExtended ¶
type WidgetAlignSystem ¶
type WidgetAlignSystem struct {
// contains filtered or unexported fields
}
WidgetAlignSystem is the layout structure of any enabled widgets that will be displayed over the scene.
func NewWidgetAlignSystem ¶
func NewWidgetAlignSystem() *WidgetAlignSystem
NewWidgetAlignSystem returns a new widget align system.
func (*WidgetAlignSystem) Area ¶
func (was *WidgetAlignSystem) Area(loc WidgetLocation) *WidgetArea
func (*WidgetAlignSystem) Find ¶
func (was *WidgetAlignSystem) Find(wid WidgetID) (int, WidgetLocation)
func (*WidgetAlignSystem) Move ¶
func (was *WidgetAlignSystem) Move(wid WidgetID, location WidgetLocation, index int)
func (*WidgetAlignSystem) Remove ¶
func (was *WidgetAlignSystem) Remove(wid WidgetID)
Remove a widget from the align system.
func (*WidgetAlignSystem) SetZone ¶
func (w *WidgetAlignSystem) SetZone(t WidgetZoneType, z *WidgetZone)
func (*WidgetAlignSystem) Zone ¶
func (was *WidgetAlignSystem) Zone(zone WidgetZoneType) *WidgetZone
Zone will return a specific zone in the align system.
type WidgetAlignType ¶
type WidgetAlignType string
const ( WidgetAlignStart WidgetAlignType = "start" WidgetAlignCentered WidgetAlignType = "centered" WidgetAlignEnd WidgetAlignType = "end" )
type WidgetArea ¶
type WidgetArea struct {
// contains filtered or unexported fields
}
WidgetArea has the widgets and alignment information found in each part area of a section.
func NewWidgetArea ¶
func NewWidgetArea(widgetIds []WidgetID, align WidgetAlignType) *WidgetArea
func (*WidgetArea) Add ¶
func (a *WidgetArea) Add(wid WidgetID, index int)
func (*WidgetArea) AddAll ¶
func (a *WidgetArea) AddAll(wids []WidgetID)
func (*WidgetArea) Alignment ¶
func (a *WidgetArea) Alignment() WidgetAlignType
Alignment will return the alignment of a specific area.
func (*WidgetArea) Find ¶
func (a *WidgetArea) Find(wid WidgetID) int
func (*WidgetArea) Move ¶
func (a *WidgetArea) Move(from, to int)
func (*WidgetArea) Remove ¶
func (a *WidgetArea) Remove(wid WidgetID)
func (*WidgetArea) SetAlignment ¶
func (a *WidgetArea) SetAlignment(at WidgetAlignType)
func (*WidgetArea) WidgetIDs ¶
func (a *WidgetArea) WidgetIDs() WidgetIDList
WidgetIds will return a slice of widget ids from a specific area.
type WidgetAreaType ¶
type WidgetAreaType string
var ( WidgetAreaTop WidgetAreaType = "top" WidgetAreaMiddle WidgetAreaType = "middle" WidgetAreaBottom WidgetAreaType = "bottom" )
type WidgetIDList ¶ added in v0.6.1
type WidgetIDList = id.WidgetIDList
type WidgetLocation ¶
type WidgetLocation struct { Zone WidgetZoneType Section WidgetSectionType Area WidgetAreaType }
func (WidgetLocation) Horizontal ¶
func (l WidgetLocation) Horizontal() bool
func (WidgetLocation) Vertical ¶
func (l WidgetLocation) Vertical() bool
type WidgetSection ¶
type WidgetSection struct {
// contains filtered or unexported fields
}
WidgetSection is the structure of each section of the align system.
func NewWidgetSection ¶
func NewWidgetSection() *WidgetSection
func (*WidgetSection) Area ¶
func (s *WidgetSection) Area(t WidgetAreaType) *WidgetArea
func (*WidgetSection) Find ¶
func (s *WidgetSection) Find(wid WidgetID) (int, WidgetAreaType)
func (*WidgetSection) Remove ¶
func (s *WidgetSection) Remove(wid WidgetID)
func (*WidgetSection) SetArea ¶
func (s *WidgetSection) SetArea(t WidgetAreaType, a *WidgetArea)
type WidgetSectionType ¶
type WidgetSectionType string
const ( WidgetSectionLeft WidgetSectionType = "left" WidgetSectionCenter WidgetSectionType = "center" WidgetSectionRight WidgetSectionType = "right" )
type WidgetZone ¶
type WidgetZone struct {
// contains filtered or unexported fields
}
WidgetZone is the structure of each layer (inner and outer) of the align system.
func NewWidgetZone ¶
func NewWidgetZone() *WidgetZone
func (*WidgetZone) Find ¶
func (z *WidgetZone) Find(wid WidgetID) (int, WidgetSectionType, WidgetAreaType)
func (*WidgetZone) Remove ¶
func (z *WidgetZone) Remove(wid WidgetID)
func (*WidgetZone) Section ¶
func (wz *WidgetZone) Section(s WidgetSectionType) *WidgetSection
func (*WidgetZone) SetSection ¶
func (z *WidgetZone) SetSection(t WidgetSectionType, s *WidgetSection)
type WidgetZoneType ¶
type WidgetZoneType string
const ( WidgetZoneInner WidgetZoneType = "inner" WidgetZoneOuter WidgetZoneType = "outer" )
type Widgets ¶ added in v0.4.0
type Widgets struct {
// contains filtered or unexported fields
}
func NewWidgets ¶ added in v0.4.0
func NewWidgets(w []*Widget, a *WidgetAlignSystem) *Widgets
func (*Widgets) Alignment ¶ added in v0.5.0
func (w *Widgets) Alignment() *WidgetAlignSystem
func (*Widgets) Properties ¶ added in v0.4.0
func (w *Widgets) Properties() []PropertyID
func (*Widgets) RemoveAllByPlugin ¶ added in v0.4.0
func (w *Widgets) RemoveAllByPlugin(p PluginID, e *PluginExtensionID) (res []PropertyID)
func (*Widgets) UpgradePlugin ¶ added in v0.5.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.