Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Check ¶
type Check struct { CommonCheckFields // contains filtered or unexported fields }
Check is wrapper struct around a Condition. This wrapping setup is used so that we only need to implement the UnmarshalYAML method once (in Check) instead of having to implement it in each individual condition type. This is similar to what we do with ParseAction for decoding the actions associated with steps.
func (*Check) UnmarshalYAML ¶
UnmarshalYAML implements custom deserialization process to ensure that the check is decoded into the correct struct type
func (*Check) Verify ¶
func (c *Check) Verify(ctx VerificationContext) error
Verify wraps the Verify method from the underlying condition
type Checksum ¶
type Checksum struct {
SHA256 string `yaml:"sha256"`
}
Checksum is a struct that contains different types of checksums against which a file can be verified. Right now we just support SHA256 checksums, but in the future others such as MD5 can be added if needed.
type CommonCheckFields ¶
type CommonCheckFields struct {
Msg string `yaml:"msg"`
}
CommonCheckFields are common fields across all check types
type Condition ¶
type Condition interface {
Verify(ctx VerificationContext) error
}
Condition is the common interface implemented by all condition types
type PathExists ¶
PathExists is a condition that verifies that a file exists at a given path It can also verify the contents of the file against a checksum
func (*PathExists) Verify ¶
func (c *PathExists) Verify(ctx VerificationContext) error
Verify checks the condition and returns an error if it fails