loader

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SearchPolicyDir

func SearchPolicyDir(path string) []string

SearchPolicyDir searchs the hierarchy of the given path step by step and find the default directory

Types

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser represents mainly HCL parser

func NewParser

func NewParser() *Parser

NewParser creates Parser instance

type Policy

type Policy struct {
	Body  hcl.Body
	Files map[string]*hcl.File
	// Data represents the raw data decoded based on stein schema
	Data *policy.Policy
}

Policy represents the raw data of HCL files decoded by hcl2 package

func Load

func Load(paths ...string) (Policy, error)

Load reads the files and converts them to Policy object

Jump to

Keyboard shortcuts

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