Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ScoreSchemaV1b1 string
Functions ¶
func ApplyCommonUpgradeTransforms ¶ added in v1.1.0
ApplyCommonUpgradeTransforms when we fix aspects of the score spec over time, we sometimes need to break compatibility. To reduce affects on users, we can apply a sequence of transformations to the yaml decoded structure so that we can fix things on their behalf. This reduces the impact on existing workflows. This function returns messages regarding any changes it has made or an error if the structure was unexpected. NOTE: this method should only be used for tools or utilities where there is already an established use-case and workflow for example score-compose and score-humanitec.
func Validate ¶
Validate validates the source structure which should be a decoded map. Generally, you must call ApplyCommonUpgradeTransforms on the raw structure first unless the input contains zero deprecated concepts. For all validation errors returned error would be a *jsonschema.ValidationError.
func ValidateJson ¶
ValidateJson validates a json structure read from the given reader source. Generally, you must call ApplyCommonUpgradeTransforms on the raw structure first unless the input contains zero deprecated concepts. For all validation errors, the returned error would be a *jsonschema.ValidationError.
func ValidateSpec ¶ added in v1.5.0
ValidateSpec validates a workload spec structure by serializing it to yaml and calling ValidateYaml.
func ValidateYaml ¶
ValidateYaml validates a yaml structure read from the given reader source. Generally, you must call ApplyCommonUpgradeTransforms on the raw structure first unless the input contains zero deprecated concepts. For all validation errors returned error would be a *jsonschema.ValidationError.
Types ¶
This section is empty.