widgets

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractStrategyWidget

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

AbstractStrategyWidget abstract component of pattern widget

func (*AbstractStrategyWidget) GetName

func (f *AbstractStrategyWidget) GetName() string

GetName name of widget

func (*AbstractStrategyWidget) Init

func (f *AbstractStrategyWidget) Init(name string, matchPattern string)

Init widget

func (*AbstractStrategyWidget) MatchPattern

func (f *AbstractStrategyWidget) MatchPattern() string

MatchPattern pattern that which handle would match

type AbstractStrategyWidgetFactory

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

AbstractStrategyWidgetFactory factory of pattern widgets

func NewAbstractStrategyWidgetFactory

func NewAbstractStrategyWidgetFactory(widgets ...PatternWidget) *AbstractStrategyWidgetFactory

NewAbstractStrategyWidgetFactory with widgets

func (*AbstractStrategyWidgetFactory) Get

Get pattern widget by name

func (*AbstractStrategyWidgetFactory) GetAll

GetAll all registered widgets

func (*AbstractStrategyWidgetFactory) Set

Get pattern widget

type PatternWidget

type PatternWidget interface {
	GetName() string
	MatchPattern() string
}

PatternWidget interface

type VisitorsStrategy

type VisitorsStrategy interface {
	Visitors() []PatternWidget
}

GetAllPatternWidgetWrapper interface of visitors strategy

type WidgetsStrategyWrapper

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

WidgetsStrategyWrapper container of eatch strategy widgets manager

func (*WidgetsStrategyWrapper) Add

func (w *WidgetsStrategyWrapper) Add(widget PatternWidget)

Add widget element

func (*WidgetsStrategyWrapper) Get

Get widget element

func (*WidgetsStrategyWrapper) GetWidgetsByStrategy

func (w *WidgetsStrategyWrapper) GetWidgetsByStrategy(strategy string) []PatternWidget

GetWidgetsByStrategy widgets mathed by strategy pattern

func (*WidgetsStrategyWrapper) IsEmpty

func (w *WidgetsStrategyWrapper) IsEmpty() bool

IsEmpty if widget element were empty

func (*WidgetsStrategyWrapper) LoadStrategies

func (w *WidgetsStrategyWrapper) LoadStrategies(patterns []string)

LoadStrategies with strategy names

func (*WidgetsStrategyWrapper) Remove

func (w *WidgetsStrategyWrapper) Remove(name string) bool

Remove widget element

Jump to

Keyboard shortcuts

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