parser

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(_ context.Context, r io.Reader, path string) ([]any, error)

Types

type Manifest

type Manifest struct {
	Path    string
	Content *ManifestNode
}

func (*Manifest) ToRego

func (m *Manifest) ToRego() any

func (*Manifest) UnmarshalYAML

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

type ManifestNode

type ManifestNode struct {
	StartLine int
	EndLine   int
	Offset    int
	Value     any
	Type      TagType
	Path      string
}

func (*ManifestNode) ToRego

func (r *ManifestNode) ToRego() any

func (*ManifestNode) UnmarshalYAML

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

type TagType

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