Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( KindTemplate = "Template" // the value of the "kind" field in a spec.yaml file KindGoldenTest = "GoldenTest" // ... a test.yaml file KindManifest = "Manifest" // ... a manifest.yaml file // LatestAPIVersion is the most up-to-date API version. LatestAPIVersion = apiVersions[len(apiVersions)-1].apiVersion )
Functions ¶
func Decode ¶
Decode parses the given YAML contents of r into a struct and returns it. The given filename is used only for error messages. The type of struct to return is determined by the "kind" field in the YAML. If the given requireKind is non-empty, then we'll also validate that the "kind" of the YAML file matches requireKind, and return error if not. This also calls Validate() on the returned struct and returns error if invalid.
func DecodeValidateUpgrade ¶
func DecodeValidateUpgrade(ctx context.Context, r io.Reader, filename, requireKind string) (model.ValidatorUpgrader, error)
DecodeValidateUpgrade parses the given YAML contents of r into a struct, then repeatedly calls Upgrade() and Validate() on it until it's the newest version, then returns it. requireKind has the same meaning as in Decode().
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.