report

package
v0.2.16 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJSONBytes added in v0.1.7

func GetJSONBytes(data []byte) ([]byte, error)

Types

type Check

type Check struct {
	ID                 string            `yaml:"id" json:"id"`
	Text               string            `json:"description"`
	Remediation        string            `json:"remediation"`
	State              State             `json:"state"`
	NodeType           []NodeType        `json:"node_type"`
	Nodes              []string          `json:"nodes,omitempty"`
	Audit              string            `json:"audit"`
	AuditConfig        string            `json:"audit_config"`
	TestInfo           []string          `json:"test_info"`
	Commands           []*exec.Cmd       `json:"commands"`
	ConfigCommands     []*exec.Cmd       `json:"config_commands"`
	ActualValueNodeMap map[string]string `json:"actual_value_per_node"`
	ExpectedResult     string            `json:"expected_result"`
	TestType           string            `json:"test_type"`
	Scored             bool              `json:"scored"`
}

type Group

type Group struct {
	ID     string   `yaml:"id" json:"id"`
	Text   string   `json:"description"`
	Checks []*Check `json:"checks"`
}

type NodeType added in v0.1.3

type NodeType string
const (
	NodeTypeEtcd   NodeType = "etcd"
	NodeTypeMaster NodeType = "master"
	NodeTypeNode   NodeType = "node"
)

type Report

type Report struct {
	Version       string                `json:"version"`
	Total         int                   `json:"total"`
	Pass          int                   `json:"pass"`
	Fail          int                   `json:"fail"`
	Skip          int                   `json:"skip"`
	Warn          int                   `json:"warn"`
	NotApplicable int                   `json:"notApplicable"`
	Nodes         map[NodeType][]string `json:"nodes"`
	Results       []*Group              `json:"results"`
}

func Get added in v0.1.7

func Get(data []byte) (*Report, error)

type State added in v0.1.3

type State string
const (
	Pass          State = "pass"
	Fail          State = "fail"
	Skip          State = "skip"
	Mixed         State = "mixed"
	Warn          State = "warn"
	NotApplicable State = "notApplicable"
)

Jump to

Keyboard shortcuts

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