Documentation
¶
Index ¶
- Variables
- type Json
- func (j *Json) Changelog() string
- func (j *Json) Condition(source string, scm scm.ScmHandler, resultCondition *result.Condition) error
- func (j *Json) Source(workingDir string, resultSource *result.Source) error
- func (j *Json) Target(source string, scm scm.ScmHandler, dryRun bool, resultTarget *result.Target) error
- type Spec
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSpecFileUndefined = errors.New("json file undefined") ErrSpecKeyUndefined = errors.New("json key or query undefined") ErrSpecFileAndFilesDefined = errors.New("parameter \"file\" and \"files\" are mutually exclusive") // ErrWrongSpec is returned when the Spec has wrong content ErrWrongSpec error = errors.New("wrong spec content") )
View Source
var (
ErrSpecVersionFilterRequireMultiple = errors.New("in the context of a source, parameter \"versionfilter\" and \"query\" must be used together")
)
Functions ¶
This section is empty.
Types ¶
type Json ¶
type Json struct {
// contains filtered or unexported fields
}
Json stores configuration about the file and the key value which needs to be updated.
func (*Json) Changelog ¶
Changelog returns the changelog for this resource, or an empty string if not supported
type Spec ¶
type Spec struct {
// [s][c][t] File specifies the Json file to manipulate
File string `yaml:",omitempty"`
// [c][t] Files specifies a list of Json file to manipulate
Files []string `yaml:",omitempty"`
// [s][c][t] Key specifies the Jsonpath key to manipulate
Key string `yaml:",omitempty"`
// [s][c][t] Value specifies the Jsonpath key to manipulate. Default to source output
Value string `yaml:",omitempty"`
// [s][c][t] Query allows to used advanced query. Override the parameter key
Query string `yaml:",omitempty"`
// [s]VersionFilter provides parameters to specify version pattern and its type like regex, semver, or just latest.
VersionFilter version.Filter `yaml:",omitempty"`
// [c][t] *Deprecated* Please look at query parameter to achieve similar objective
Multiple bool `yaml:",omitempty" jsonschema:"-"`
}
Click to show internal directories.
Click to hide internal directories.