Documentation ¶
Index ¶
- Constants
- Variables
- func New(ctx *ValidateYamlCommandContext) *cobra.Command
- func PrintValidationResults(printer IPrinter, invalidFiles []*pkgExtractor.InvalidFile, filesCount int)
- func SendResults(localConfig ILocalConfig, client ICliClient, cliVersion string, isValid bool, ...)
- func SetSilentMode(cmd *cobra.Command)
- type ICliClient
- type ILocalConfig
- type IPrinter
- type IReader
- type ValidateYamlCommandContext
Constants ¶
View Source
const ( STATUS_PASSED = "passed" STATUS_FAILED = "failed" )
Variables ¶
View Source
var YamlNotValidError = errors.New("")
Functions ¶
func New ¶
func New(ctx *ValidateYamlCommandContext) *cobra.Command
func PrintValidationResults ¶
func PrintValidationResults(printer IPrinter, invalidFiles []*pkgExtractor.InvalidFile, filesCount int)
func SendResults ¶
func SendResults(localConfig ILocalConfig, client ICliClient, cliVersion string, isValid bool, invalidYamlFiles []*pkgExtractor.InvalidFile, filesPaths []string)
func SetSilentMode ¶
Types ¶
type ICliClient ¶
type ICliClient interface {
SendValidateYamlResult(request *cliClient.ValidatedYamlResult)
}
type ILocalConfig ¶
type ILocalConfig interface {
GetLocalConfiguration() (*localConfig.LocalConfig, error)
}
type ValidateYamlCommandContext ¶
type ValidateYamlCommandContext struct { Printer IPrinter Reader IReader Extractor yamlValidator.IExtractor CliClient ICliClient LocalConfig ILocalConfig CliVersion string }
Click to show internal directories.
Click to hide internal directories.