Documentation
¶
Index ¶
- Variables
- type Action
- type BaseCmd
- func (b *BaseCmd) Action() Action
- func (b *BaseCmd) Category() []Category
- func (b *BaseCmd) CheckAccess(ctx context.Context, event IEvent) (ok bool, err error)
- func (b *BaseCmd) CheckOnResultAccess(ctx context.Context, event IEvent) (ok bool, err error)
- func (b *BaseCmd) Execute(ctx context.Context, event IEvent) (IEvent, error)
- func (b *BaseCmd) Kind() Kind
- func (b *BaseCmd) Name() string
- func (b *BaseCmd) OnResult(ctx context.Context, event IEvent) (IEvent, error)
- func (b *BaseCmd) OnResultError(ctx context.Context, event IEvent) (IEvent, error)
- type Category
- type CommandExecutorProto
- type ICommand
- type ICommandExecutor
- type ICommandHooks
- type ICommandInfo
- type ICommandManager
- type ICommandSignature
- type IEngine
- type IEvent
- type IPlugin
- type Kind
- type UUID
Constants ¶
This section is empty.
Variables ¶
View Source
var ExtractCommandManager func(ctx context.Context) ICommandManager
View Source
var NewCommandExecutor func(plugin IPlugin) (ICommandExecutor, error)
View Source
var NewCommandHooks func() ICommandHooks
View Source
var NewCommandInfo func(plugin IPlugin, cmd ICommand, hooks ...ICommandHooks) ICommandInfo
View Source
var NewCommandManager func() (res ICommandManager)
View Source
var NewCommandSignature func(kind Kind, category []Category, action Action) ICommandSignature
View Source
var SetCommandManager func(ctx context.Context, manager ICommandManager) error
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action = include.EventAction
type BaseCmd ¶
type BaseCmd struct{}
BaseCmd является основой для описания своих собственных комманд.
Важно: Команда не может и не должна хранить какие-либо данные. Так как один экземпляр используется во множестве горутин... Все методы следует считать статическими. А экземпляры комманд синглетонами.
func (*BaseCmd) CheckAccess ¶
CheckAccess проверяет права на выполнение команды для заданного ивента
func (*BaseCmd) CheckOnResultAccess ¶
type Category ¶
type Category = include.EventCategory
type CommandExecutorProto ¶
type CommandExecutorProto = include.CommandExecutorProto
type ICommandExecutor ¶
type ICommandExecutor = include.ICommandExecutor
type ICommandHooks ¶
type ICommandHooks = include.ICommandHooks
type ICommandInfo ¶
type ICommandInfo = include.ICommandInfo
type ICommandManager ¶
type ICommandManager = include.ICommandManager
type ICommandSignature ¶
type ICommandSignature = include.ICommandSignature
Click to show internal directories.
Click to hide internal directories.