Documentation ¶
Index ¶
- Variables
- type Spec
- type Toml
- func (t *Toml) Changelog() string
- func (t *Toml) Condition(source string) (bool, error)
- func (t *Toml) ConditionFromSCM(source string, scm scm.ScmHandler) (bool, error)
- func (t *Toml) Source(workingDir string) (string, error)
- func (t *Toml) Target(source string, dryRun bool) (changed bool, err error)
- func (t *Toml) TargetFromSCM(source string, scm scm.ScmHandler, dryRun bool) (changed bool, files []string, message string, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrSpecFileUndefined is returned if a file wasn't specified ErrSpecFileUndefined = errors.New("toml file undefined") // ErrSpecKeyUndefined is returned if a key wasn't specified ErrSpecKeyUndefined = errors.New("toml key or query undefined") // ErrSpecFileAndFilesDefines when we both spec File and Files have been specified 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 ( // ErrDaselFailedParsingTOMLByteFormat is returned if dasel couldn't parse the byteData ErrDaselFailedParsingTOMLByteFormat error = errors.New("fail to parse Toml data") )
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 Spec ¶
type Spec struct { // [s][c][t] File specifies the toml file to manipulate File string `yaml:",omitempty"` // [c][t] Files specifies a list of Json file to manipuate Files []string `yaml:",omitempty"` // [s][c][t] Query allows to used advanced query. Override the parameter key Query string `yaml:",omitempty"` // [s][c][t] Key specifies the query to retrieve an information from a toml file Key string `yaml:",omitempty"` // [s][c][t] Value specifies the value for a specific key. Default to source output Value string `yaml:",omitempty"` // [c][t] *Deprecated* Please look at query parameter to achieve similar objective Multiple bool `yaml:",omitempty" jsonschema:"-"` // [s]VersionFilter provides parameters to specify version pattern and its type like regex, semver, or just latest. VersionFilter version.Filter `yaml:",omitempty"` }
type Toml ¶
type Toml struct {
// contains filtered or unexported fields
}
Toml stores configuration about the file and the key value which needs to be updated.
func (*Toml) Changelog ¶
Changelog returns the changelog for this resource, or an empty string if not supported
func (*Toml) ConditionFromSCM ¶
Click to show internal directories.
Click to hide internal directories.