Documentation
¶
Overview ¶
Package proposal persists write proposals on disk. Agents create them; humans apply them via `sudo cosql apply <id>`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDir ¶
DefaultDir returns ~/.local/share/cosql/proposals (or $XDG_DATA_HOME).
Types ¶
type Proposal ¶
type Proposal struct {
ID string `json:"id"`
DB string `json:"db"`
Driver string `json:"driver"`
SQL string `json:"sql"`
Note string `json:"note,omitempty"`
CreatedAt string `json:"created_at"`
CreatedBy string `json:"created_by"`
DryRun *DryRun `json:"dry_run,omitempty"`
Status Status `json:"status"`
AppliedAt string `json:"applied_at,omitempty"`
AppliedBy string `json:"applied_by,omitempty"`
Result *Result `json:"result,omitempty"`
}
Proposal is what gets written to disk as <id>.json.
type Store ¶
type Store struct{ Dir string }
Store is the filesystem-backed proposal store.
Click to show internal directories.
Click to hide internal directories.