parser

package
v0.53.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StartLine = "startline"
	EndLine   = "endline"
	Value     = "value"
)
View Source
const (
	TagBool   = "!!bool"
	TagInt    = "!!int"
	TagString = "!!str"
	TagSlice  = "!!seq"
	TagMap    = "!!map"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Manifest added in v0.50.0

type Manifest struct {
	Path    string
	Content ManifestNode
}

func (*Manifest) ToRegoMap added in v0.50.0

func (m *Manifest) ToRegoMap() map[string]interface{}

func (*Manifest) UnmarshalYAML added in v0.50.0

func (m *Manifest) UnmarshalYAML(value *yaml.Node) error

type ManifestNode added in v0.50.0

type ManifestNode map[string]interface{}

func (ManifestNode) EndLine added in v0.50.0

func (r ManifestNode) EndLine() int

func (ManifestNode) StartLine added in v0.50.0

func (r ManifestNode) StartLine() int

func (ManifestNode) UnmarshalYAML added in v0.50.0

func (r ManifestNode) UnmarshalYAML(node *yaml.Node) error

func (ManifestNode) Value added in v0.50.0

func (r ManifestNode) Value() interface{}

type Parser

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

func New

func New(options ...options.ParserOption) *Parser

New creates a new K8s parser

func (*Parser) Parse added in v0.50.0

func (p *Parser) Parse(r io.Reader) ([]interface{}, error)

func (*Parser) ParseFS

func (p *Parser) ParseFS(ctx context.Context, target fs.FS, path string) (map[string][]interface{}, error)

func (*Parser) ParseFile

func (p *Parser) ParseFile(_ context.Context, fs fs.FS, path string) ([]interface{}, error)

ParseFile parses Kubernetes manifest from the provided filesystem path.

func (*Parser) SetDebugWriter added in v0.39.0

func (p *Parser) SetDebugWriter(writer io.Writer)

func (*Parser) SetSkipRequiredCheck added in v0.39.0

func (p *Parser) SetSkipRequiredCheck(b bool)

Jump to

Keyboard shortcuts

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