Documentation
¶
Index ¶
- Constants
- type Approval
- func (a *Approval) Actions() []core.Action
- func (a *Approval) Cancel(ctx core.ExecutionContext) error
- func (a *Approval) Color() string
- func (a *Approval) Configuration() []configuration.Field
- func (a *Approval) Description() string
- func (a *Approval) Documentation() string
- func (a *Approval) ExampleOutput() map[string]any
- func (a *Approval) Execute(ctx core.ExecutionContext) error
- func (a *Approval) HandleAction(ctx core.ActionContext) error
- func (a *Approval) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (a *Approval) Icon() string
- func (a *Approval) Label() string
- func (a *Approval) Name() string
- func (a *Approval) OutputChannels(configuration any) []core.OutputChannel
- func (a *Approval) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (a *Approval) Setup(ctx core.SetupContext) error
- type ApprovalInfo
- type Config
- type Item
- type Metadata
- type Record
- type RejectionInfo
Constants ¶
View Source
const ( StatePending = "pending" StateApproved = "approved" StateRejected = "rejected" ItemTypeAnyone = "anyone" ItemTypeUser = "user" ItemTypeRole = "role" ItemTypeGroup = "group" ChannelApproved = "approved" ChannelRejected = "rejected" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Approval ¶
type Approval struct{}
func (*Approval) Configuration ¶
func (a *Approval) Configuration() []configuration.Field
func (*Approval) Description ¶
func (*Approval) Documentation ¶ added in v0.1.6
func (*Approval) ExampleOutput ¶ added in v0.0.45
func (*Approval) HandleAction ¶
func (a *Approval) HandleAction(ctx core.ActionContext) error
func (*Approval) HandleWebhook ¶
func (a *Approval) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
func (*Approval) OutputChannels ¶
func (a *Approval) OutputChannels(configuration any) []core.OutputChannel
func (*Approval) ProcessQueueItem ¶
type ApprovalInfo ¶
type Config ¶
type Config struct {
Items []Item `json:"items" mapstructure:"items"`
}
* Configuration for the component. * Filled when the component is added to a blueprint/workflow.
type Metadata ¶
type Metadata struct {
Result string `mapstructure:"result" json:"result"`
Records []Record `mapstructure:"records" json:"records"`
}
* Metadata for the component.
func NewMetadata ¶
func NewMetadata(ctx core.ExecutionContext, items []Item) (*Metadata, error)
func (*Metadata) UpdateResult ¶
func (m *Metadata) UpdateResult()
type Record ¶
type Record struct {
Index int `mapstructure:"index" json:"index"`
Type string `mapstructure:"type" json:"type"`
State string `mapstructure:"state" json:"state"`
User *core.User `mapstructure:"user" json:"user,omitempty"`
Role *string `mapstructure:"role" json:"role,omitempty"`
Group *string `mapstructure:"group" json:"group,omitempty"`
Approval *ApprovalInfo `mapstructure:"approval" json:"approval,omitempty"`
Rejection *RejectionInfo `mapstructure:"rejection" json:"rejection,omitempty"`
}
type RejectionInfo ¶
Click to show internal directories.
Click to hide internal directories.