visitors

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetVisitor

func SetVisitor(visitor Visitor)

SetVisitor by visitor name

Types

type AbstractVisitor

type AbstractVisitor struct {
	widgets.AbstractStrategyWidget
}

AbstractVisitor abstract component of visotor

type DefaultVisitorsFactory

type DefaultVisitorsFactory interface {
	Get(name string) Visitor
	Set(Visitor)
	GetAll() []Visitor
}

DefaultVisitorsFactory default factory of visitors

func GetDefaultVisitorsChain

func GetDefaultVisitorsChain() DefaultVisitorsFactory

GetDefaultVisitorsChain for each controllers default visitor

type Visitor

type Visitor interface {
	widgets.PatternWidget
	Visit(event events.Event)
}

Visitor interface

func GetVisitor

func GetVisitor(name string) Visitor

GetVisitor by visitor name

func NewAccessVisitor

func NewAccessVisitor() Visitor

NewAccessVisitor new access visitor

func NewStdMQVisitor

func NewStdMQVisitor(topicCategory string, visitorTopic string, visitorRoutingKey string, matchPattern string) Visitor

NewStdMQVisitor new visitor

type VisitorOperator

type VisitorOperator interface {
	AttachVisitor(visitor Visitor) bool
	RemoveVisitor(name string) bool
	GetVisitors(string) []Visitor
	InitializeVisitors(from string)
}

VisitorOperator interface for controller operation

type VisitorsChain

type VisitorsChain struct {
	widgets.AbstractStrategyWidget
	// contains filtered or unexported fields
}

VisitorsChain responsibility chain of visitors

func NewVisitorsChain

func NewVisitorsChain(name string, matchPattern string) *VisitorsChain

NewVisitorsChain responsibility chain of visitors

func (*VisitorsChain) AttachVisitor

func (c *VisitorsChain) AttachVisitor(visitor Visitor) bool

AttachVisitor on visitor responsibility chain

func (*VisitorsChain) GetVisitors

func (c *VisitorsChain) GetVisitors(pattern string) []Visitor

GetVisitors of observer responsibility chain

func (*VisitorsChain) InitializeVisitors

func (c *VisitorsChain) InitializeVisitors(from string)

InitializeVisitors called from controller analyzement on loading

func (*VisitorsChain) LoadStrategies

func (c *VisitorsChain) LoadStrategies(strategies []string)

LoadStrategies for controller handlers

func (*VisitorsChain) RemoveVisitor

func (c *VisitorsChain) RemoveVisitor(name string) bool

RemoveVisitor on visitor responsibility chain

type VisitorsResponsibilityChain

type VisitorsResponsibilityChain interface {
	AttachVisitor(visitor Visitor) bool
	GetVisitors(string) []Visitor
}

VisitorsResponsibilityChain

type VisitorsStrategy

type VisitorsStrategy interface {
	Visitors() []Visitor
}

VisitorsStrategy interface of visitors strategy

Jump to

Keyboard shortcuts

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