|
1 | 1 | package config |
2 | 2 |
|
| 3 | +import "time" |
| 4 | + |
3 | 5 | type Job struct { |
4 | | - Name string `json:"name,omitempty" mapstructure:"name" toml:"name,omitempty" yaml:",omitempty"` |
5 | | - Run string `json:"run,omitempty" jsonschema:"oneof_required=Run a command" mapstructure:"run" toml:"run,omitempty" yaml:",omitempty"` |
6 | | - Script string `json:"script,omitempty" jsonschema:"oneof_required=Run a script" mapstructure:"script" toml:"script,omitempty" yaml:",omitempty"` |
7 | | - Runner string `json:"runner,omitempty" mapstructure:"runner" toml:"runner,omitempty" yaml:",omitempty"` |
8 | | - Args string `json:"args,omitempty" mapstructure:"args" toml:"args,omitempty" yaml:",omitempty"` |
9 | | - Root string `json:"root,omitempty" mapstructure:"root" toml:"root,omitempty" yaml:",omitempty"` |
10 | | - Files string `json:"files,omitempty" mapstructure:"files" toml:"files,omitempty" yaml:",omitempty"` |
11 | | - FailText string `json:"fail_text,omitempty" koanf:"fail_text" mapstructure:"fail_text" toml:"fail_text,omitempty" yaml:"fail_text,omitempty"` |
12 | | - Timeout string `json:"timeout,omitempty" mapstructure:"timeout" toml:"timeout,omitempty" yaml:",omitempty"` |
| 6 | + Name string `json:"name,omitempty" mapstructure:"name" toml:"name,omitempty" yaml:",omitempty"` |
| 7 | + Run string `json:"run,omitempty" jsonschema:"oneof_required=Run a command" mapstructure:"run" toml:"run,omitempty" yaml:",omitempty"` |
| 8 | + Script string `json:"script,omitempty" jsonschema:"oneof_required=Run a script" mapstructure:"script" toml:"script,omitempty" yaml:",omitempty"` |
| 9 | + Runner string `json:"runner,omitempty" mapstructure:"runner" toml:"runner,omitempty" yaml:",omitempty"` |
| 10 | + Args string `json:"args,omitempty" mapstructure:"args" toml:"args,omitempty" yaml:",omitempty"` |
| 11 | + Root string `json:"root,omitempty" mapstructure:"root" toml:"root,omitempty" yaml:",omitempty"` |
| 12 | + Files string `json:"files,omitempty" mapstructure:"files" toml:"files,omitempty" yaml:",omitempty"` |
| 13 | + FailText string `json:"fail_text,omitempty" koanf:"fail_text" mapstructure:"fail_text" toml:"fail_text,omitempty" yaml:"fail_text,omitempty"` |
| 14 | + Timeout time.Duration `json:"timeout,omitempty" jsonschema:"type=string,example=15s" mapstructure:"timeout" toml:"timeout,omitempty" yaml:",omitempty"` |
13 | 15 |
|
14 | 16 | Glob []string `json:"glob,omitempty" jsonschema:"oneof_type=string;array" mapstructure:"glob" toml:"glob,omitempty" yaml:",omitempty"` |
15 | 17 | Exclude []string `json:"exclude,omitempty" jsonschema:"oneof_type=string;array" mapstructure:"exclude" toml:"exclude,omitempty" yaml:",omitempty"` |
|
0 commit comments