validation

package
v0.0.0-...-868fca8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2018 License: MPL-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildValidation

type BuildValidation struct {
	Mapping  map[string]interface{}  `json:"mapping"`
	Policies []policy.PolicyDocument `json:"policies"`
}

type Control

type Control struct {
	ID        string  `json:"id"`
	ProfileID string  `json:"profile_id"`
	Status    string  `json:"status"`
	CodeDesc  string  `json:"code_desc"`
	RunTime   float64 `json:"run_time"`
	StartTime string  `json:"start_time"`
	Message   string  `json:"message"`
}

Control describes an individual test within a build validation.

type ControlDetails

type ControlDetails struct {
	ID             string            `json:"id"`
	Title          string            `json:"title"`
	Description    string            `json:"desc"`
	Impact         float32           `json:"impact"`
	References     []string          `json:"refs"`
	Tags           map[string]string `json:"tags"`
	Code           string            `json:"code"`
	Results        []Control         `json:"results"`
	Groups         []Group           `json:"groups"`
	Attributes     []string          `json:"attribues"`
	SHA256         string            `json:"sha256"`
	SourceLocation struct {
		Reference string `json:"ref"`
		Line      int    `json:"line"`
	} `json:"source_location"`
}

ControlDetails describes additional information about a control

type Group

type Group struct {
	ID       string   `json:"id"`
	Title    string   `json:"title"`
	Controls []string `json:"controls"`
}

type Profile

type Profile struct {
	Supports []string         `json:"supports"`
	Title    string           `json:"title"`
	Name     string           `json:"name"`
	Controls []ControlDetails `json:"controls"`
}

Profile describes the policy document and its test results

type Statistics

type Statistics struct {
	Duration float64 `json:"duration"`
}

Statistics describes stats for the build validate service.

type Validation

type Validation struct {
	Version    string     `json:"version"`
	Controls   []Control  `json:"controls"`
	Profiles   []Profile  `json:"profiles"`
	Statistics Statistics `json:"statistics"`
}

Validation describes a response from the build validate service.

func (*Validation) Passed

func (v *Validation) Passed() bool

Passed : returns true if validation rules passed

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL