Documentation ¶
Index ¶
- func ValidationDocs(validationRules []ValidationRule, format string) (string, error)
- type FileReport
- type GroupReport
- type IndentedOutput
- func (o *IndentedOutput) AddErrorLine(line string)
- func (o *IndentedOutput) AddLine(line string)
- func (o *IndentedOutput) AddSuccessLine(line string)
- func (o *IndentedOutput) AddTooPreviousLine(line string)
- func (o *IndentedOutput) DecreaseIndentation()
- func (o *IndentedOutput) IncreaseIndentation()
- func (o *IndentedOutput) ResetIndentation()
- func (o *IndentedOutput) SetIndentation(indentationLevel int)
- func (o *IndentedOutput) Text() string
- func (o *IndentedOutput) WriteErrors(errors []error)
- type RuleReport
- type ValidationReport
- type ValidationRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidationDocs ¶
func ValidationDocs(validationRules []ValidationRule, format string) (string, error)
Types ¶
type FileReport ¶
type FileReport struct { Name string Valid bool Excluded bool Errors []error HasRuleValidationErrors bool GroupReports []*GroupReport }
func (*FileReport) AsText ¶
func (r *FileReport) AsText(output *IndentedOutput)
func (*FileReport) NewGroupReport ¶
func (r *FileReport) NewGroupReport(name string) *GroupReport
type GroupReport ¶
type GroupReport struct { Valid bool Name string Excluded bool RuleReports []*RuleReport Errors []error }
func (*GroupReport) AsText ¶
func (r *GroupReport) AsText(output *IndentedOutput)
func (*GroupReport) NewRuleReport ¶
func (r *GroupReport) NewRuleReport(name string, ruleType config.ValidationScope) *RuleReport
type IndentedOutput ¶
type IndentedOutput struct {
// contains filtered or unexported fields
}
func NewIndentedOutput ¶
func NewIndentedOutput(indentationStep int, color bool) IndentedOutput
func (*IndentedOutput) AddErrorLine ¶
func (o *IndentedOutput) AddErrorLine(line string)
func (*IndentedOutput) AddLine ¶
func (o *IndentedOutput) AddLine(line string)
func (*IndentedOutput) AddSuccessLine ¶
func (o *IndentedOutput) AddSuccessLine(line string)
func (*IndentedOutput) AddTooPreviousLine ¶
func (o *IndentedOutput) AddTooPreviousLine(line string)
func (*IndentedOutput) DecreaseIndentation ¶
func (o *IndentedOutput) DecreaseIndentation()
func (*IndentedOutput) IncreaseIndentation ¶
func (o *IndentedOutput) IncreaseIndentation()
func (*IndentedOutput) ResetIndentation ¶
func (o *IndentedOutput) ResetIndentation()
func (*IndentedOutput) SetIndentation ¶
func (o *IndentedOutput) SetIndentation(indentationLevel int)
func (*IndentedOutput) Text ¶
func (o *IndentedOutput) Text() string
func (*IndentedOutput) WriteErrors ¶
func (o *IndentedOutput) WriteErrors(errors []error)
type RuleReport ¶
type RuleReport struct { Valid bool RuleType config.ValidationScope Name string Excluded bool Errors []error }
func (*RuleReport) AsText ¶
func (r *RuleReport) AsText(output *IndentedOutput)
type ValidationReport ¶
type ValidationReport struct { Failed bool Duration time.Duration ErrorsCount int FilesCount int FilesExcludedCount int GroupsCount int GroupsExcludedCount int RulesCount int RulesExcludedCount int ValidationRules []ValidationRule FilesReports []*FileReport }
func NewValidationReport ¶
func NewValidationReport() *ValidationReport
func (*ValidationReport) AsJSON ¶
func (r *ValidationReport) AsJSON() (string, error)
func (*ValidationReport) AsText ¶
func (r *ValidationReport) AsText(indentationStep int, color bool) (string, error)
func (*ValidationReport) AsYaml ¶
func (r *ValidationReport) AsYaml() (string, error)
func (*ValidationReport) NewFileReport ¶
func (r *ValidationReport) NewFileReport(name string) *FileReport
type ValidationRule ¶
type ValidationRule interface { Name() string Scope() config.ValidationScope ValidationTexts() []string }
Click to show internal directories.
Click to hide internal directories.