P1.1: swap yaml struct tags for json in domain types
Replace yaml:"…" tags with json:"…" on Job, Config, and JobsFile. Add omitempty to bool fields in Config that previously lacked it. Update comments to reference .json filenames. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+10
-10
@@ -1,18 +1,18 @@
|
||||
package domain
|
||||
|
||||
// Job is the user-visible scheduled command. It contains only durable
|
||||
// configuration: every field is persisted to jobs.yaml. Transient execution
|
||||
// configuration: every field is persisted to jobs.json. Transient execution
|
||||
// state (last run, next run, command output, in-memory activity) lives in a
|
||||
// separate JobRuntime so the jobs file stays a clean, hand-editable record of
|
||||
// configuration and never mixes in process-lifetime bookkeeping.
|
||||
type Job struct {
|
||||
ID int `yaml:"id"`
|
||||
Name string `yaml:"name"`
|
||||
Folder string `yaml:"folder,omitempty"`
|
||||
Schedule string `yaml:"schedule"`
|
||||
Command string `yaml:"command"`
|
||||
Arguments string `yaml:"arguments,omitempty"`
|
||||
SuccessExitCodes string `yaml:"success_exit_codes,omitempty"`
|
||||
StartOnly bool `yaml:"start_only,omitempty"`
|
||||
Enabled bool `yaml:"enabled"`
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Folder string `json:"folder,omitempty"`
|
||||
Schedule string `json:"schedule"`
|
||||
Command string `json:"command"`
|
||||
Arguments string `json:"arguments,omitempty"`
|
||||
SuccessExitCodes string `json:"success_exit_codes,omitempty"`
|
||||
StartOnly bool `json:"start_only,omitempty"`
|
||||
Enabled bool `json:"enabled"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user