model

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// OutputTypes - All Supported Output Types
	OutputTypes = map[string]string{
		JSON.ToOutput(): JSON.ToOutput(),
		Table:           Table,
	}
)

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	File             *string
	Output           *Output
	Dir              *string
	Check            *[]string
	SkipCheck        *[]string
	SeverityCriteria *string
}

Arguments - CLI Arguments

type Check

type Check struct {
	ID          string      `json:"id,omitempty"`
	Title       string      `json:"title,omitempty"`
	Description string      `json:"description,omitempty"`
	Message     string      `json:"message,omitempty"`
	Path        string      `json:"path,omitempty"`
	Resource    string      `json:"resource,omitempty"`
	Class       string      `json:"class,omitempty"`
	CheckResult string      `json:"checkResult,omitempty"`
	Severity    string      `json:"severity,omitempty"`
	Reference   string      `json:"reference,omitempty"`
	LineRange   []string    `json:"lineRange,omitempty"`
	CodeBlock   []CodeBlock `json:"codeBlock,omitempty"`
}

type CodeBlock

type CodeBlock []string

type Output

type Output string

Output type

const (
	// JSON Output Type
	JSON Output = "json"
	// Table Output Type (Default)
	Table = "table"
)

func (Output) ToOutput

func (c Output) ToOutput() string

ToOutput - returns the output type as string

type Result

type Result struct {
	CheckType    string  `json:"CheckType,omitempty"`
	FailedChecks []Check `json:"failedChecks,omitempty"`
	PassedChecks []Check `json:"passedChecks,omitempty"`
	Summary      Summary `json:"summary,omitempty"`
}

checks result

type Summary

type Summary struct {
	Failed   int `json:"failed,omitempty"`
	Passed   int `json:"passed,omitempty"`
	Low      int `json:"low,omitempty"`
	Medium   int `json:"medium,omitempty"`
	High     int `json:"high,omitempty"`
	Critical int `json:"critical,omitempty"`
}

Jump to

Keyboard shortcuts

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