plugin

package
v0.10.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	WidgetZoneInner     WidgetZoneType    = "inner"
	WidgetZoneOuter     WidgetZoneType    = "outer"
	WidgetSectionLeft   WidgetSectionType = "left"
	WidgetSectionCenter WidgetSectionType = "center"
	WidgetSectionRight  WidgetSectionType = "right"
	WidgetAreaTop       WidgetAreaType    = "top"
	WidgetAreaMiddle    WidgetAreaType    = "middle"
	WidgetAreaBottom    WidgetAreaType    = "bottom"
)

Variables

View Source
var (
	ErrPluginExtensionDuplicated error         = errors.New("plugin extension duplicated")
	ExtensionTypePrimitive       ExtensionType = "primitive"
	ExtensionTypeWidget          ExtensionType = "widget"
	ExtensionTypeBlock           ExtensionType = "block"
	ExtensionTypeVisualizer      ExtensionType = "visualizer"
	ExtensionTypeInfobox         ExtensionType = "infobox"
	ExtensionTypeCluster         ExtensionType = "cluster"
)
View Source
var ErrInvalidID = id.ErrInvalidID
View Source
var IDFrom = id.PluginIDFrom
View Source
var IDFromRef = id.PluginIDFromRef
View Source
var MustID = id.MustPluginID
View Source
var MustPropertySchemaID = id.MustPropertySchemaID
View Source
var MustSceneID = id.MustSceneID
View Source
var NewID = id.NewPluginID
View Source
var NewPropertySchemaID = id.NewPropertySchemaID
View Source
var NewSceneID = id.NewSceneID
View Source
var OfficialPluginID = id.OfficialPluginID
View Source
var PropertySchemaIDFrom = id.PropertySchemaIDFrom
View Source
var PropertySchemaIDFromRef = id.PropertySchemaIDFromRef
View Source
var SceneIDFrom = id.SceneIDFrom
View Source
var SceneIDFromRef = id.SceneIDFromRef

Functions

This section is empty.

Types

type Builder

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

func New

func New() *Builder

func (*Builder) Author

func (b *Builder) Author(author string) *Builder

func (*Builder) Build

func (b *Builder) Build() (*Plugin, error)

func (*Builder) Description

func (b *Builder) Description(description i18n.String) *Builder

func (*Builder) Extensions

func (b *Builder) Extensions(extensions []*Extension) *Builder

func (*Builder) ID

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

func (*Builder) MustBuild

func (b *Builder) MustBuild() *Plugin

func (*Builder) Name

func (b *Builder) Name(name i18n.String) *Builder

func (*Builder) RepositoryURL

func (b *Builder) RepositoryURL(repositoryURL string) *Builder

func (*Builder) Schema

func (b *Builder) Schema(schema *PropertySchemaID) *Builder

type Extension

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

func (*Extension) Clone added in v0.4.0

func (w *Extension) Clone() *Extension

func (*Extension) Description

func (w *Extension) Description() i18n.String

func (*Extension) ID

func (w *Extension) ID() ExtensionID

func (*Extension) Icon

func (w *Extension) Icon() string

func (*Extension) Name

func (w *Extension) Name() i18n.String

func (*Extension) Rename

func (w *Extension) Rename(name i18n.String)

func (*Extension) Schema

func (w *Extension) Schema() PropertySchemaID

func (*Extension) SetDescription

func (w *Extension) SetDescription(des i18n.String)

func (*Extension) SingleOnly

func (w *Extension) SingleOnly() bool

func (*Extension) Type

func (w *Extension) Type() ExtensionType

func (*Extension) Visualizer

func (w *Extension) Visualizer() visualizer.Visualizer

func (*Extension) WidgetLayout

func (w *Extension) WidgetLayout() *WidgetLayout

type ExtensionBuilder

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

func NewExtension

func NewExtension() *ExtensionBuilder

func (*ExtensionBuilder) Build

func (b *ExtensionBuilder) Build() (*Extension, error)

func (*ExtensionBuilder) Description

func (b *ExtensionBuilder) Description(description i18n.String) *ExtensionBuilder

func (*ExtensionBuilder) ID

func (*ExtensionBuilder) Icon

func (b *ExtensionBuilder) Icon(icon string) *ExtensionBuilder

func (*ExtensionBuilder) MustBuild

func (b *ExtensionBuilder) MustBuild() *Extension

func (*ExtensionBuilder) Name

func (*ExtensionBuilder) Schema

func (*ExtensionBuilder) SingleOnly

func (b *ExtensionBuilder) SingleOnly(singleOnly bool) *ExtensionBuilder

func (*ExtensionBuilder) System

func (b *ExtensionBuilder) System(s bool) *ExtensionBuilder

func (*ExtensionBuilder) Type

func (b *ExtensionBuilder) Type(extensionType ExtensionType) *ExtensionBuilder

func (*ExtensionBuilder) Visualizer

func (b *ExtensionBuilder) Visualizer(visualizer visualizer.Visualizer) *ExtensionBuilder

func (*ExtensionBuilder) WidgetLayout

func (b *ExtensionBuilder) WidgetLayout(widgetLayout *WidgetLayout) *ExtensionBuilder

type ExtensionID added in v0.4.0

type ExtensionID = id.PluginExtensionID

type ExtensionType

type ExtensionType string

type ID added in v0.4.0

type ID = id.PluginID

type List added in v0.6.0

type List []*Plugin

func (List) Concat added in v0.6.0

func (l List) Concat(m List) List

func (List) Find added in v0.6.0

func (l List) Find(p ID) *Plugin

func (List) Map added in v0.6.0

func (l List) Map() Map

func (List) MapToIDs added in v0.6.0

func (l List) MapToIDs(ids []ID) List

type Loader

type Loader func(context.Context, []ID) ([]*Plugin, error)

type Map added in v0.6.0

type Map map[ID]*Plugin

func (Map) List added in v0.6.0

func (m Map) List() List

type Metadata

type Metadata struct {
	Name         string    `json:"name"`
	Description  string    `json:"description"`
	ThumbnailUrl string    `json:"thumbnailUrl"`
	Author       string    `json:"author"`
	CreatedAt    time.Time `json:"createdAt"`
}

type Plugin

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

func (*Plugin) Author

func (p *Plugin) Author() string

func (*Plugin) Clone added in v0.4.0

func (p *Plugin) Clone() *Plugin

func (*Plugin) Description

func (p *Plugin) Description() i18n.String

func (*Plugin) Extension

func (p *Plugin) Extension(id ExtensionID) *Extension

func (*Plugin) Extensions

func (p *Plugin) Extensions() []*Extension

func (*Plugin) ID

func (p *Plugin) ID() ID

func (*Plugin) Name

func (p *Plugin) Name() i18n.String

func (*Plugin) PropertySchemas

func (p *Plugin) PropertySchemas() []PropertySchemaID

func (*Plugin) RepositoryURL

func (p *Plugin) RepositoryURL() string

func (*Plugin) Scene added in v0.6.0

func (p *Plugin) Scene() *SceneID

func (*Plugin) Schema

func (p *Plugin) Schema() *PropertySchemaID

func (*Plugin) Version

func (p *Plugin) Version() semver.Version

type PropertySchemaID added in v0.4.0

type PropertySchemaID = id.PropertySchemaID

type SceneID added in v0.4.0

type SceneID = id.SceneID

type WidgetAreaType

type WidgetAreaType string

type WidgetLayout

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

func NewWidgetLayout

func NewWidgetLayout(horizontallyExtendable, verticallyExtendable, extended, floating bool, defaultLocation *WidgetLocation) WidgetLayout

func (*WidgetLayout) Clone added in v0.4.0

func (l *WidgetLayout) Clone() *WidgetLayout

func (WidgetLayout) DefaultLocation

func (l WidgetLayout) DefaultLocation() *WidgetLocation

func (WidgetLayout) Extendable

func (l WidgetLayout) Extendable(loc WidgetLocation) bool

func (WidgetLayout) Extended

func (l WidgetLayout) Extended() bool

func (WidgetLayout) Floating

func (l WidgetLayout) Floating() bool

func (WidgetLayout) HorizontallyExtendable

func (l WidgetLayout) HorizontallyExtendable() bool

func (WidgetLayout) Ref

func (l WidgetLayout) Ref() *WidgetLayout

func (WidgetLayout) VerticallyExtendable

func (l WidgetLayout) VerticallyExtendable() bool

type WidgetLocation

type WidgetLocation struct {
	Zone    WidgetZoneType
	Section WidgetSectionType
	Area    WidgetAreaType
}

func (*WidgetLocation) Clone added in v0.4.0

func (l *WidgetLocation) Clone() *WidgetLocation

func (WidgetLocation) Horizontal

func (l WidgetLocation) Horizontal() bool

func (WidgetLocation) Vertical

func (l WidgetLocation) Vertical() bool

type WidgetSectionType

type WidgetSectionType string

type WidgetZoneType

type WidgetZoneType string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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