Documentation
¶
Index ¶
- type File
- func (f *File) Condition(source string) (bool, error)
- func (f *File) ConditionFromSCM(source string, scm scm.ScmHandler) (bool, error)
- func (f *File) Normalize() error
- func (f *File) Read() error
- func (f *File) Source(workingDir string) (string, error)
- func (f *File) Target(source string, dryRun bool) (bool, error)
- func (f *File) TargetFromSCM(source string, scm scm.ScmHandler, dryRun bool) (bool, []string, string, error)
- func (f *File) Validate() error
- type FileSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
CurrentContent string
// contains filtered or unexported fields
}
File defines a resource of type "file"
func New ¶ added in v0.13.0
New returns a reference to a newly initialized File object from a Filespec or an error if the provided Filespec triggers a validation error.
func (*File) Condition ¶
Condition test if a file content match the content provided via configuration. If the configuration doesn't specify a value then it fall back to the source output
func (*File) ConditionFromSCM ¶
ConditionFromSCM test if a file content from SCM match the content provided via configuration. If the configuration doesn't specify a value then it fall back to the source output
func (*File) Normalize ¶ added in v0.16.1
Normalize ensures that the attributes of the object are following the expected conventions
func (*File) Read ¶ added in v0.13.0
Read defines CurrentContent to the content of the file which path is specified in spec.File
func (*File) Target ¶
Target creates or updates a file located locally. The default content is the value retrieved from source