Versions in this module Expand all Collapse all v0 v0.2.1 Jan 2, 2025 Changes in this version type Attribute + func (x Attribute) Copy() Attribute type Commit + func (x Commit) Copy() Commit + type RunAction func(ctx context.Context, alert Alert, args ActionArgs) (any, error) v0.2.0 Dec 24, 2024 v0.1.1 Dec 23, 2024 Changes in this version type Attribute + Persist bool type AttributeRecord + Persist bool + type Query struct v0.1.0 Dec 21, 2024 Changes in this version + func ParsePlaybook(entryFile string, readFile ReadFile, book *Playbook) error + type Action struct + Abort bool + Args ActionArgs + Commit []Commit + Force bool + ID types.ActionID + Name string + Uses types.ActionName + func (x Action) Copy() Action + type ActionArgs map[string]any + func (x ActionArgs) Parse(psr ...ArgParser) error + type ActionLog struct + Seq int + type ActionRecord struct + Args []*ArgumentRecord + Error *string + FinishedAt time.Time + ID string + Next []*NextRecord + Result *string + Seq int + StartedAt time.Time + Uses string + type ActionResult struct + Attrs Attributes + Result any + type ActionRunRequest struct + Alert Alert + Called []ActionResult + EnvVars types.EnvVars + Seq int + type ActionRunResponse struct + Runs []Action + type Alert struct + CreatedAt time.Time + Data any + ID types.AlertID + Raw string + Schema types.Schema + func NewAlert(meta AlertMetaData, schema types.Schema, data any) Alert + func (x Alert) Copy() Alert + type AlertMetaData struct + Attrs Attributes + Description string + Namespace types.Namespace + Refs References + Source string + Title string + func (x AlertMetaData) Copy() AlertMetaData + type AlertPolicyResult struct + Alerts []AlertMetaData + type AlertRecord struct + CreatedAt time.Time + Data string + Description string + ID types.AlertID + InitAttrs []*AttributeRecord + LastAttrs []*AttributeRecord + Namespace *string + Refs []*ReferenceRecord + Schema string + Source string + Title string + type ArgOption func(*argParserOption) + func ArgOptional() ArgOption + type ArgParser func(args ActionArgs) error + func ArgDef[T any](key string, dst *T, options ...ArgOption) ArgParser + type ArgumentRecord struct + Key string + Value string + type Attribute struct + Global bool + ID types.AttrID + Key types.AttrKey + TTL int + Type types.AttrType + Value types.AttrValue + type AttributeRecord struct + Global bool + ID string + Key string + TTL int + Type *string + Value string + type Attributes []Attribute + func (x Attributes) Copy() Attributes + func (x Attributes) Tidy() Attributes + type Clock func() time.Time + type Commit struct + Path string + func (x *Commit) ToAttr(data any) (*Attribute, error) + type Event struct + Actions map[types.ActionName][]any + Input any + Schema types.Schema + func (x *Event) GetResult(actionName types.ActionName) any + func (x *Event) Validate() error + type NextRecord struct + Abort bool + Attrs []*AttributeRecord + type PlayLog struct + Actions []*ActionLog + Alert Alert + type Playbook struct + Scenarios []*Scenario + func (x *Playbook) Validate() error + type PubSubMessage struct + Attributes map[string]string + Data []byte + MessageID string + PublishTime string + type PubSubRequest struct + DeliveryAttempt int64 + Message PubSubMessage + Subscription string + type ReadFile func(name string) ([]byte, error) + type Reference struct + Title string + URL string + func (r Reference) Copy() Reference + type ReferenceRecord struct + Title *string + URL *string + type References []Reference + func (refs References) Copy() References + type Scenario struct + Env types.EnvVars + Events []Event + ID types.ScenarioID + Title types.ScenarioTitle + func ParseScenario(entryFile string, readFile ReadFile) (*Scenario, error) + func (x *Scenario) ToLog() ScenarioLog + func (x *Scenario) Validate() error + type ScenarioLog struct + Error string + ID types.ScenarioID + Results []*PlayLog + Title types.ScenarioTitle + type WorkflowRecord struct + Actions []*ActionRecord + Alert *AlertRecord + CreatedAt time.Time + ID types.WorkflowID