parser

package
v0.92.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

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) ToRego added in v0.55.0

func (m *Manifest) ToRego() 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 struct {
	StartLine int
	EndLine   int
	Offset    int
	Value     interface{}
	Type      TagType
	Path      string
}

func (*ManifestNode) ToRego added in v0.55.0

func (r *ManifestNode) ToRego() interface{}

func (*ManifestNode) UnmarshalYAML added in v0.50.0

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

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, path string) ([]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)

type TagType added in v0.55.0

type TagType string
const (
	TagBool   TagType = "!!bool"
	TagInt    TagType = "!!int"
	TagFloat  TagType = "!!float"
	TagStr    TagType = "!!str"
	TagString TagType = "!!string"
	TagSlice  TagType = "!!seq"
	TagMap    TagType = "!!map"
)

Jump to

Keyboard shortcuts

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