Documentation ¶
Index ¶
Constants ¶
const ( CliErrOutputFormat = iota WebErrOutputFormat )
const MetadataFilename = ".tractusx"
Variables ¶
var ErrorOutputFormat = CliErrOutputFormat
ErrorOutputFormat is used to control the output format of error message. Before running QualityGuideline.Test(), set the value to your preferred output format
Functions ¶
This section is empty.
Types ¶
type Metadata ¶
type Metadata struct { ProductName string `yaml:"product"` LeadingRepository string `yaml:"leadingRepository"` RepoCategory string `yaml:"repoCategory"` Repositories []Repository `yaml:"repositories"` SkipReleaseChecks `yaml:"skipReleaseChecks"` }
func MetadataFromFile ¶
MetadataFromFile does take fileContent as byte slice and tries to deserialize it into Metadata. If the contents cannot be parsed into Metadata, an error is returned and Metadata will be nil
func MetadataFromLocalFile ¶
MetadataFromLocalFile will read a local file '.tractusx in the specified dir', that is supposed to contain information about a product. If the file exists, MetadataFromLocalFile will return the information as an instance of Metadata. If the file cannot be parsed or does not exist, an error is returned and Metadata will be nil
type QualityGuideline ¶
type QualityGuideline interface { // Name returns the Name to the QualityGuideline to test. Name() string // Description returns a brief description of the tested QualityGuideline. Description() string // ExternalDescription returns a URL to more information about the QualityGuideline. ExternalDescription() string // Test executes the test and returns QualityResult. If any error occurs it // returns QualityResult.Passed false. Test() *QualityResult // IsOptional returns a bool it the test or QualityGuideline is optional or not. IsOptional() bool }
QualityGuideline represents the QualityGuideline to check as an interface.
The interface provide information about Name, Description, ExternalDescription, the Test and the IsOptional bool.
type QualityResult ¶
QualityResult implements test result via Passed bool and in case of error a ErrorDescription.
type Repository ¶
type SkipReleaseChecks ¶ added in v0.9.0
type SkipReleaseChecks struct {
AlignedBaseImages []string `yaml:"alignedBaseImage"`
}