Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyFindings ¶
ApplyFindings applies the given findings to the repository filesystem.
Types ¶
type Boundary ¶
type Boundary struct {
Type string // start_of_file, end_of_file, line, content, contains
Value string // For line: number string; for content/contains: match text
}
Boundary defines where a section starts or ends in a file.
type Finding ¶
type Finding struct {
FilePath string `json:"file_path"`
Operation string `json:"operation"`
Message string `json:"message"`
Expected string `json:"expected,omitempty"`
Actual string `json:"actual,omitempty"`
}
Finding represents a single compliance finding for a file.
func ComputeFindings ¶
func ComputeFindings(repoCfg *config.RepoConfig, centralCfg *config.CentralConfig, repoPath string) ([]Finding, error)
ComputeFindings computes the compliance findings for a repo.
type ParsedTemplate ¶
type ParsedTemplate struct {
Sections []Section
BootstrapContent string
HasBootstrap bool
IsWholeFile bool
OriginalContent string
}
ParsedTemplate is the result of parsing section directives from a template. If no directives are found, IsWholeFile is true and the template should replace the entire file (backward compatible).
type TemplateData ¶
type TemplateData struct {
Name string
DefaultBranch string
Config map[string]interface{}
// contains filtered or unexported fields
}
TemplateData is the data passed to template files for rendering.
Click to show internal directories.
Click to hide internal directories.