types

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Payload

type Payload struct {
	Resources []Resource `json:"resources" yaml:"resources"`
	Wait      Wait       `json:"wait" yaml:"wait"`
	Rego      string     `json:"rego" yaml:"rego"`
}

Current placeholder for all requisite data in the payload Fields will be populated as required otherwise left empty This could be expanded as providers add more fields

type PayloadAPI

type PayloadAPI struct {
	Requests []Request `mapstructure:"requests" json:"requests" yaml:"requests"`
	Rego     string    `json:"rego" yaml:"rego"`
}

type Request

type Request struct {
	Name string `json:"name" yaml:"name"`
	URL  string `json:"url" yaml:"url"`
}

type Resource

type Resource struct {
	Name         string       `json:"name" yaml:"name"`
	Description  string       `json:"description" yaml:"description"`
	ResourceRule ResourceRule `json:"resource-rule" yaml:"resource-rule"`
}

type ResourceRule

type ResourceRule struct {
	Name       string   `json:"name" yaml:"name"`
	Group      string   `json:"group" yaml:"group"`
	Version    string   `json:"version" yaml:"version"`
	Resource   string   `json:"resource" yaml:"resource"`
	Namespaces []string `json:"namespaces" yaml:"namespaces"`
}

type Result

type Result struct {
	UUID        string `json:"uuid" yaml:"uuid"`
	ControlId   string `json:"control-id" yaml:"control-id"`
	Description string `json:"description" yaml:"description"`
	Passing     int    `json:"passing" yaml:"passing"`
	Failing     int    `json:"failing" yaml:"failing"`
	State       string `json:"state" yaml:"state"`
}

native type for conversion to targeted report format

type Target

type Target struct {
	Provider string  `json:"provider" yaml:"provider"`
	Domain   string  `json:"domain" yaml:"domain"`
	Payload  Payload `json:"payload" yaml:"payload"`
}

type Validation

type Validation struct {
	Title       string                 `json:"title" yaml:"title"`
	Description map[string]interface{} `json:"description" yaml:"description"`
	Evaluated   bool                   `json:"evaluated" yaml:"evaluated"`
	Result      Result                 `json:"result" yaml:"result"`
}

type Wait

type Wait struct {
	Condition string `json:"condition" yaml:"condition"`
	Jsonpath  string `json:"jsonpath" yaml:"jsonpath"`
	Kind      string `json:"kind" yaml:"kind"`
	Namespace string `json:"namespace" yaml:"namespace"`
	Timeout   string `json:"timeout" yaml:"timeout"`
}

Jump to

Keyboard shortcuts

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