enforcer

package
v0.1.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2018 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conform

type Conform struct {
	Metadata *metadata.Metadata      `yaml:"metadata"`
	Policies []*PolicyDeclaration    `yaml:"policies"`
	Pipeline *pipeline.Pipeline      `yaml:"pipeline"`
	Stages   map[string]*stage.Stage `yaml:"stages"`
	Tasks    map[string]*task.Task   `yaml:"tasks"`
	Script   *script.Script          `yaml:"script"`
}

Conform is a struct that conform.yaml gets decoded into.

func New

func New() (*Conform, error)

New loads the conform.yaml file and unmarshals it into a Conform struct.

func (*Conform) Enforce

func (c *Conform) Enforce() error

Enforce enforces all policies defined in the conform.yaml file.

type PolicyDeclaration

type PolicyDeclaration struct {
	Type string      `yaml:"type"`
	Spec interface{} `yaml:"spec"`
}

PolicyDeclaration allows a user to declare an arbitrary type along with a spec that will be decoded into the appropriate concrete type.

Jump to

Keyboard shortcuts

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