actionfile

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Schema = "taskbridge.actions.v1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	ID                   string `json:"id"`
	Type                 string `json:"type"`
	TaskID               string `json:"task_id,omitempty"`
	ProjectID            string `json:"project_id,omitempty"`
	DueDate              string `json:"due_date,omitempty"`
	Reason               string `json:"reason,omitempty"`
	RequiresConfirmation bool   `json:"requires_confirmation,omitempty"`
}

type ActionOutcome added in v1.0.7

type ActionOutcome struct {
	ActionID  string `json:"action_id"`
	Type      string `json:"type"`
	TaskID    string `json:"task_id,omitempty"`
	ProjectID string `json:"project_id,omitempty"`
	Status    string `json:"status"`
	Error     string `json:"error,omitempty"`
	Reason    string `json:"reason,omitempty"`
}

type ExecuteOptions

type ExecuteOptions struct {
	DryRun  bool
	Confirm bool
}

type ExecuteResult

type ExecuteResult struct {
	Schema               string          `json:"schema"`
	Status               string          `json:"status"`
	DryRun               bool            `json:"dry_run"`
	RequiresConfirmation bool            `json:"requires_confirmation"`
	Total                int             `json:"total"`
	Updated              int             `json:"updated"`
	Skipped              int             `json:"skipped"`
	Errors               []string        `json:"errors"`
	Actions              []ActionOutcome `json:"actions"`
}

type Executor

type Executor struct {
	TaskStore storage.Storage
}

func (Executor) Execute

func (e Executor) Execute(ctx context.Context, file *File, opts ExecuteOptions) ExecuteResult

type File

type File struct {
	Schema    string   `json:"schema"`
	Source    string   `json:"source,omitempty"`
	CreatedAt string   `json:"created_at,omitempty"`
	Actions   []Action `json:"actions"`
}

func Load

func Load(path string) (*File, error)

Jump to

Keyboard shortcuts

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