Documentation ¶
Index ¶
- func ParsePlaybook(entryFile string, readFile ReadFile, book *Playbook) error
- type Action
- type ActionArgs
- type ActionExitRequest
- type ActionExitResponse
- type ActionInitRequest
- type ActionInitResponse
- type ActionLog
- type ActionRecord
- type ActionResult
- type ActionRunRequest
- type ActionRunResponse
- type Alert
- type AlertMetaData
- type AlertPolicyResult
- type AlertRecord
- type ArgOption
- type ArgParser
- type ArgumentRecord
- type Attribute
- type AttributeRecord
- type Attributes
- type Clock
- type Context
- type CtxOption
- type Event
- type Next
- type NextRecord
- type PlayLog
- type Playbook
- type PubSubMessage
- type PubSubRequest
- type ReadFile
- type Reference
- type ReferenceRecord
- type References
- type Scenario
- type ScenarioLog
- type WorkflowRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action struct { ID types.ActionID `json:"id"` Name string `json:"name"` Uses types.ActionName `json:"uses"` Args ActionArgs `json:"args"` Force bool `json:"force"` }
type ActionArgs ¶
func (ActionArgs) Parse ¶ added in v0.0.14
func (x ActionArgs) Parse(psr ...ArgParser) error
type ActionExitRequest ¶
type ActionExitRequest struct { Action ActionResult `json:"action"` Called []ActionResult `json:"called"` Alert Alert `json:"alert"` EnvVars types.EnvVars `json:"env" masq:"secret"` Seq int `json:"seq"` }
type ActionExitResponse ¶
type ActionExitResponse struct {
Exit []Next `json:"exit"`
}
func (*ActionExitResponse) Abort ¶ added in v0.0.7
func (x *ActionExitResponse) Abort() bool
func (*ActionExitResponse) Attrs ¶ added in v0.0.7
func (x *ActionExitResponse) Attrs() Attributes
type ActionInitRequest ¶ added in v0.0.7
type ActionInitResponse ¶ added in v0.0.7
type ActionInitResponse struct {
Init []Next `json:"init"`
}
func (*ActionInitResponse) Abort ¶ added in v0.0.7
func (x *ActionInitResponse) Abort() bool
func (*ActionInitResponse) Attrs ¶ added in v0.0.7
func (x *ActionInitResponse) Attrs() Attributes
type ActionRecord ¶ added in v0.0.15
type ActionRecord struct { ID string `json:"id"` Seq int `json:"seq"` Uses string `json:"uses"` Args []*ArgumentRecord `json:"args"` Result *string `json:"result,omitempty"` Next []*NextRecord `json:"next"` Error *string `json:"error,omitempty"` StartedAt time.Time `json:"startedAt"` FinishedAt time.Time `json:"finishedAt"` }
type ActionResult ¶ added in v0.0.10
type ActionRunRequest ¶
type ActionRunRequest struct { Alert Alert `json:"alert"` EnvVars types.EnvVars `json:"env" masq:"secret"` Seq int `json:"seq"` Called []ActionResult `json:"called"` }
type ActionRunResponse ¶
type ActionRunResponse struct {
Runs []Action `json:"run"`
}
type Alert ¶
type Alert struct { AlertMetaData ID types.AlertID `json:"id"` Schema types.Schema `json:"schema"` Data any `json:"data,omitempty"` CreatedAt time.Time `json:"created_at"` // Raw is a JSON string of Data. The field will be redacted by masq because of verbosity. Raw string `json:"raw,omitempty" masq:"quiet"` }
type AlertMetaData ¶
type AlertMetaData struct { Title string `json:"title"` Description string `json:"description"` Source string `json:"source"` Namespace types.Namespace `json:"namespace"` Attrs Attributes `json:"attrs"` Refs References `json:"refs"` }
func (AlertMetaData) Copy ¶ added in v0.0.4
func (x AlertMetaData) Copy() AlertMetaData
type AlertPolicyResult ¶
type AlertPolicyResult struct {
Alerts []AlertMetaData `json:"alert"`
}
type AlertRecord ¶ added in v0.0.15
type AlertRecord struct { ID types.AlertID `json:"id"` Schema string `json:"schema"` Data string `json:"data"` CreatedAt time.Time `json:"createdAt"` Title string `json:"title"` Description string `json:"description"` Source string `json:"source"` Namespace *string `json:"namespace,omitempty"` InitAttrs []*AttributeRecord `json:"initAttrs"` LastAttrs []*AttributeRecord `json:"lastAttrs"` Refs []*ReferenceRecord `json:"refs"` }
type ArgOption ¶ added in v0.0.14
type ArgOption func(*argParserOption)
func ArgOptional ¶ added in v0.0.14
func ArgOptional() ArgOption
type ArgParser ¶ added in v0.0.14
type ArgParser func(args ActionArgs) error
type ArgumentRecord ¶ added in v0.0.15
type Attribute ¶ added in v0.0.4
type Attribute struct { ID types.AttrID `json:"id" firestore:"id"` Key types.AttrKey `json:"key" firestore:"key"` Value types.AttrValue `json:"value" firestore:"value"` Type types.AttrType `json:"type" firestore:"type"` Global bool `json:"global" firestore:"global"` TTL int `json:"ttl" firestore:"ttl"` }
type AttributeRecord ¶ added in v0.0.15
type Attributes ¶ added in v0.0.4
type Attributes []Attribute
func (Attributes) Copy ¶ added in v0.0.4
func (x Attributes) Copy() Attributes
func (Attributes) Tidy ¶ added in v0.0.7
func (x Attributes) Tidy() Attributes
type Context ¶
func NewContext ¶
type CtxOption ¶
type CtxOption func(ctx *Context)
func WithDryRunMode ¶
func WithDryRunMode() CtxOption
func WithStackIncrement ¶
func WithStackIncrement() CtxOption
type Event ¶ added in v0.0.7
type Event struct { Input any `json:"input"` Schema types.Schema `json:"schema"` Actions map[types.ActionName][]any `json:"actions"` // contains filtered or unexported fields }
type NextRecord ¶ added in v0.0.15
type NextRecord struct { Abort bool `json:"abort"` Attrs []*AttributeRecord `json:"attrs"` }
type PubSubMessage ¶
type PubSubRequest ¶
type PubSubRequest struct { DeliveryAttempt int64 `json:"deliveryAttempt"` Message PubSubMessage `json:"message"` Subscription string `json:"subscription"` }
type ReferenceRecord ¶ added in v0.0.15
type References ¶ added in v0.0.14
type References []Reference
func (References) Copy ¶ added in v0.0.14
func (refs References) Copy() References
type Scenario ¶
type Scenario struct { ID types.ScenarioID `json:"id"` Title types.ScenarioTitle `json:"title"` Events []Event `json:"events"` Env types.EnvVars `json:"env"` }
func ParseScenario ¶ added in v0.0.17
func (*Scenario) ToLog ¶
func (x *Scenario) ToLog() ScenarioLog
type ScenarioLog ¶
type ScenarioLog struct { ID types.ScenarioID `json:"id"` Title types.ScenarioTitle `json:"title"` Results []*PlayLog `json:"results,omitempty"` Error string `json:"error,omitempty"` }
type WorkflowRecord ¶ added in v0.0.15
type WorkflowRecord struct { ID types.WorkflowID `json:"id"` CreatedAt time.Time `json:"createdAt"` Alert *AlertRecord `json:"alert"` Actions []*ActionRecord `json:"actions"` }
Click to show internal directories.
Click to hide internal directories.