policy

package
v0.5.33 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Terraform      = Target("terraform")
	TerraformPlan  = Target("terraform-plan")
	Cloudformation = Target("cloudformation")
	Kubernetes     = Target("kubernetes")
	Helm           = Target("helm")
	Docker         = Target("docker")
	Secrets        = Target("secrets")
	ARM            = Target("arm")
	None           = Target("")
)

Variables

This section is empty.

Functions

func RegisterRuleType added in v0.5.23

func RegisterRuleType(ruleType RuleType)

Types

type Metadata added in v0.5.29

type Metadata map[string]interface{}

func (Metadata) GetString added in v0.5.29

func (m Metadata) GetString(key string) string

type Rule

type Rule struct {
	ID         string
	Path       string
	Metadata   Metadata
	Targets    []Target
	TargetData map[Target]interface{}
}

type RuleType

type RuleType interface {
	GetName() string
	GetCode() string
	PrepareRules(rules []*Rule, dest string) error
}

func GetRuleType added in v0.5.23

func GetRuleType(ruleTypeName string) RuleType

func GetRuleTypes added in v0.5.27

func GetRuleTypes() (res []RuleType)

type Store added in v0.5.27

type Store struct {
	Dir   string
	Rules map[RuleType][]*Rule
}

func (*Store) CreateTarBall added in v0.5.27

func (m *Store) CreateTarBall(path string) error

func (*Store) GetPolicyUploadMetadata added in v0.5.27

func (m *Store) GetPolicyUploadMetadata() (map[string]string, error)

func (*Store) LoadRules added in v0.5.27

func (m *Store) LoadRules() error

func (*Store) LoadRulesOfType added in v0.5.27

func (m *Store) LoadRulesOfType(ruleType RuleType) error

func (*Store) LoadSingleRule added in v0.5.27

func (m *Store) LoadSingleRule(ruleType RuleType, path string) (*Rule, error)

func (*Store) PrepareRules added in v0.5.27

func (m *Store) PrepareRules(dest string) error

func (*Store) RuleCount added in v0.5.27

func (m *Store) RuleCount() (count int)

type Target

type Target string

func (Target) Path added in v0.5.29

func (t Target) Path(rule *Rule) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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