Documentation ¶
Index ¶
Constants ¶
View Source
const SpecFileName = "sg-project.yaml"
SpecFileName is the default name of the project specification file.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileTargetSpec ¶
type FileTargetSpec struct { // Name - name of the target. Name string `json:"name"` // Paths - paths to the targets to check. Paths []string `json:"paths"` // Policies - paths to the policy to load. Policies strListOrMap `json:"policies"` // Data - paths to the (extra) data to load. Data []string `json:"data"` }
FileTargetSpec defines the specification of a file target. Without further specification, paths are relative to the context root which is defined during execution.
NOTE: we should always use json tag here, please see the comment in ReadFromYAML for context.
type Spec ¶
type Spec struct {
Files []FileTargetSpec `json:"files"`
}
Spec defines the project specification.
func ReadFromFile ¶
ReadFromFile reads a project specification from a file.
Click to show internal directories.
Click to hide internal directories.