processor

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 18 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DefaultPostKindTemplate = 0
	DefaultPostKindCommand  = 1
	DefaultPostKindRunbook  = 2
)

Variables

This section is empty.

Functions

func NewExecutorTemplate added in v0.2.0

func NewExecutorTemplate(name string, content string, executor *DefaultExecutor, observability *common.Observability) (*toolsRender.TextTemplate, error)

func NewFieldExecutorTemplate added in v0.10.9

func NewFieldExecutorTemplate(name string, content string, executor *DefaultFieldExecutor, observability *common.Observability) (*toolsRender.TextTemplate, map[string]any, error)

Types

type Default

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

func NewDefault

func NewDefault(name string, options DefaultOptions, observability *common.Observability, processors *common.Processors) *Default

func (*Default) AddCommand

func (d *Default) AddCommand(name, path string) error

func (*Default) Commands

func (d *Default) Commands() []common.Command

func (*Default) Name

func (d *Default) Name() string

type DefaultAction added in v0.10.0

type DefaultAction struct {
	Name     string
	Label    string
	Template string
	Style    string
}

type DefaultApproval added in v0.6.2

type DefaultApproval struct {
	Channel     string
	Template    string
	Reasons     []string
	Description bool
	Visible     bool
	Disabled    bool
}

type DefaultCommand

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

func (*DefaultCommand) Actions added in v0.9.3

func (dc *DefaultCommand) Actions() []common.Action

func (*DefaultCommand) Aliases added in v0.0.3

func (dc *DefaultCommand) Aliases() []string

func (*DefaultCommand) Approval added in v0.6.2

func (dc *DefaultCommand) Approval() common.Approval

func (*DefaultCommand) Channel added in v0.4.6

func (dc *DefaultCommand) Channel() string

func (*DefaultCommand) Confirmation added in v0.5.1

func (dc *DefaultCommand) Confirmation(params common.ExecuteParams) string

func (*DefaultCommand) Description

func (dc *DefaultCommand) Description() string

func (*DefaultCommand) Execute

func (*DefaultCommand) Fields added in v0.1.0

func (dc *DefaultCommand) Fields(bot common.Bot, message common.Message, params common.ExecuteParams, eval []string, parent common.Field) []common.Field

func (*DefaultCommand) Group added in v0.10.0

func (dc *DefaultCommand) Group() string

func (*DefaultCommand) Name

func (dc *DefaultCommand) Name() string

func (*DefaultCommand) Params

func (dc *DefaultCommand) Params() []string

func (*DefaultCommand) Permissions added in v0.6.12

func (dc *DefaultCommand) Permissions() bool

func (*DefaultCommand) Priority added in v0.3.4

func (dc *DefaultCommand) Priority() int

func (*DefaultCommand) Response added in v0.1.0

func (dc *DefaultCommand) Response() common.Response

func (*DefaultCommand) Schedule added in v0.3.9

func (dc *DefaultCommand) Schedule() string

func (*DefaultCommand) TrackMessages added in v0.12.12

func (dc *DefaultCommand) TrackMessages() bool

func (*DefaultCommand) Wrapper added in v0.3.4

func (dc *DefaultCommand) Wrapper() bool

type DefaultCommandAction added in v0.10.0

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

func (*DefaultCommandAction) Label added in v0.10.0

func (dca *DefaultCommandAction) Label() string

func (*DefaultCommandAction) Name added in v0.10.0

func (dca *DefaultCommandAction) Name() string

func (*DefaultCommandAction) Style added in v0.10.0

func (dca *DefaultCommandAction) Style() string

func (*DefaultCommandAction) Template added in v0.10.0

func (dca *DefaultCommandAction) Template() string

type DefaultCommandApproval added in v0.6.2

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

func (*DefaultCommandApproval) Channel added in v0.6.2

func (dca *DefaultCommandApproval) Channel(bot common.Bot, message common.Message, params common.ExecuteParams) string

func (*DefaultCommandApproval) Description added in v0.9.1

func (dca *DefaultCommandApproval) Description() bool

func (*DefaultCommandApproval) Message added in v0.6.2

func (dca *DefaultCommandApproval) Message(bot common.Bot, message common.Message, params common.ExecuteParams) string

func (*DefaultCommandApproval) Reasons added in v0.9.1

func (dca *DefaultCommandApproval) Reasons() []string

func (*DefaultCommandApproval) Visible added in v0.9.2

func (dca *DefaultCommandApproval) Visible() bool

type DefaultCommandConfig added in v0.5.0

type DefaultCommandConfig struct {
	Description   string
	Params        []string
	Aliases       []string
	Response      DefaultResponse
	Fields        []*DefaultField
	Actions       []*DefaultAction
	Priority      int
	Wrapper       bool
	Schedule      string
	Channel       string
	Confirmation  string
	Approval      *DefaultApproval
	Permissions   *bool
	TrackMessages *bool `yaml:"trackMessages"` // enable message tracking/tagging
}

type DefaultCommandResponse added in v0.6.4

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

func (*DefaultCommandResponse) Duration added in v0.6.4

func (dcr *DefaultCommandResponse) Duration() bool

func (*DefaultCommandResponse) Error added in v0.6.4

func (dcr *DefaultCommandResponse) Error() bool

func (*DefaultCommandResponse) IconURL added in v0.12.6

func (dcr *DefaultCommandResponse) IconURL() string

func (*DefaultCommandResponse) Original added in v0.6.4

func (dcr *DefaultCommandResponse) Original() bool

func (*DefaultCommandResponse) Visible added in v0.6.4

func (dcr *DefaultCommandResponse) Visible() bool

type DefaultExecutor added in v0.2.0

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

func NewExecutor added in v0.2.0

func NewExecutor(name, path string, command *DefaultCommand, bot common.Bot, message common.Message,
	params common.ExecuteParams, action common.Action) (*DefaultExecutor, error)

func (*DefaultExecutor) After added in v0.2.0

func (de *DefaultExecutor) After(message common.Message) error

func (*DefaultExecutor) Approval added in v0.6.2

func (de *DefaultExecutor) Approval() common.Approval

func (*DefaultExecutor) Duration added in v0.2.5

func (de *DefaultExecutor) Duration() bool

func (*DefaultExecutor) Error added in v0.2.5

func (de *DefaultExecutor) Error() bool

func (*DefaultExecutor) IconURL added in v0.12.6

func (de *DefaultExecutor) IconURL() string

func (*DefaultExecutor) Original added in v0.2.5

func (de *DefaultExecutor) Original() bool

func (*DefaultExecutor) Response added in v0.2.5

func (de *DefaultExecutor) Response() common.Response

func (*DefaultExecutor) Visible added in v0.2.5

func (de *DefaultExecutor) Visible() bool

type DefaultField added in v0.10.10

type DefaultField struct {
	Name         string
	Type         common.FieldType
	Label        string
	Values       []string
	Default      string
	Required     bool
	Template     string
	Dependencies []string
	Hint         string
	Filter       string
	Value        string
	Visible      *bool
}

type DefaultFieldExecutor added in v0.10.9

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

func NewFieldExecutor added in v0.10.9

func NewFieldExecutor(name, path string, command *DefaultCommand, bot common.Bot, message common.Message, params common.ExecuteParams, field *DefaultFieldWrapper) (*DefaultFieldExecutor, error)

func (*DefaultFieldExecutor) Execute added in v0.10.9

func (de *DefaultFieldExecutor) Execute() ([]*DefaultFieldWrapper, error)

type DefaultFieldWrapper added in v0.10.10

type DefaultFieldWrapper struct {
	*DefaultField
	// contains filtered or unexported fields
}

func (*DefaultFieldWrapper) Default added in v0.10.10

func (df *DefaultFieldWrapper) Default() string

func (*DefaultFieldWrapper) Dependencies added in v0.10.10

func (df *DefaultFieldWrapper) Dependencies() []string

func (*DefaultFieldWrapper) Filter added in v0.10.10

func (df *DefaultFieldWrapper) Filter() string

func (*DefaultFieldWrapper) Hint added in v0.10.10

func (df *DefaultFieldWrapper) Hint() string

func (*DefaultFieldWrapper) Label added in v0.10.10

func (df *DefaultFieldWrapper) Label() string

func (*DefaultFieldWrapper) Merge added in v0.11.0

func (df *DefaultFieldWrapper) Merge(f common.Field, empty bool) bool

func (*DefaultFieldWrapper) Name added in v0.10.10

func (df *DefaultFieldWrapper) Name() string

func (*DefaultFieldWrapper) Parent added in v0.11.0

func (df *DefaultFieldWrapper) Parent() common.Field

func (*DefaultFieldWrapper) Required added in v0.10.10

func (df *DefaultFieldWrapper) Required() bool

func (*DefaultFieldWrapper) Template added in v0.10.10

func (df *DefaultFieldWrapper) Template() string

func (*DefaultFieldWrapper) Type added in v0.10.10

func (*DefaultFieldWrapper) Value added in v0.11.0

func (df *DefaultFieldWrapper) Value() string

func (*DefaultFieldWrapper) Values added in v0.10.10

func (df *DefaultFieldWrapper) Values() []string

func (*DefaultFieldWrapper) Visible added in v0.11.4

func (df *DefaultFieldWrapper) Visible() bool

type DefaultOptions

type DefaultOptions struct {
	CommandsDir  string
	TemplatesDir string
	RunbooksDir  string
	CommandExt   string
	ConfigExt    string
	Description  string
	Error        string
}

type DefaultPost added in v0.2.0

type DefaultPost struct {
	Name string
	Path string
	Obj  interface{}
	Kind DefaultPostKind
}

type DefaultPostKind added in v0.5.0

type DefaultPostKind = int

type DefaultResponse added in v0.10.6

type DefaultResponse struct {
	Visible  *bool
	Original *bool
	Duration *bool
	IconURL  string `yaml:"iconURL"`
}

type DefaultRunbook added in v0.5.0

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

func NewRunbook added in v0.5.0

func NewRunbook(name, path string, command *DefaultCommand, parentExecutor *DefaultExecutor) (*DefaultRunbook, error)

func (*DefaultRunbook) Execute added in v0.5.0

func (dr *DefaultRunbook) Execute(bot common.Bot, message common.Message, obj interface{}, callback DefaultRunbookStepResultFunc, waitGroup bool) error

type DefaultRunbookCommandExecutor added in v0.5.0

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

type DefaultRunbookConfig added in v0.5.0

type DefaultRunbookConfig struct {
	Description string
	Params      []string
	Pipeline    []*DefaultRunbookStep
}

type DefaultRunbookExecutor added in v0.5.0

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

func NewRunbookExecutor added in v0.5.0

func NewRunbookExecutor(rb *DefaultRunbook, step *DefaultRunbookStep, bot common.Bot, message common.Message, params common.ExecuteParams) (*DefaultRunbookExecutor, error)

type DefaultRunbookStep added in v0.5.0

type DefaultRunbookStep struct {
	ID       string
	Step     string
	Template string
	Command  string
	Disabled bool
	Pipeline []*DefaultRunbookStep
}

type DefaultRunbookStepResult added in v0.5.0

type DefaultRunbookStepResult struct {
	ID           string
	Text         string
	Attachements []*common.Attachment
	Actions      []common.Action
	Error        error
}

type DefaultRunbookStepResultFunc added in v0.5.0

type DefaultRunbookStepResultFunc = func(result *DefaultRunbookStepResult, parent common.Message) error

type DefaultRunbookTemplateExecutor added in v0.5.0

type DefaultRunbookTemplateExecutor = DefaultExecutor

Jump to

Keyboard shortcuts

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