aml

package module
v0.0.0-...-e936fb3 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Interpolate

func Interpolate(data any, s string) (string, error)

func Marshal

func Marshal(v any) ([]byte, error)

func ParseInt

func ParseInt(numString string) (int64, error)

ParseInt parses a number string to int following the same number syntax that AML supports.

func Unmarshal

func Unmarshal(data []byte, v any) error

Types

type Decoder

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

func NewDecoder

func NewDecoder(input io.Reader, options ...Option) *Decoder

func (*Decoder) Args

func (d *Decoder) Args() (*definition.ParamSpec, error)

func (*Decoder) ComputedArgs

func (d *Decoder) ComputedArgs() (map[string]any, error)

func (*Decoder) Decode

func (d *Decoder) Decode(v any) error

type Option

type Option interface {
	ApplyTo(d *Options)
}

type Options

type Options struct {
	Args      map[string]any
	Profiles  []string
	Acornfile bool
}

func (Options) ApplyTo

func (d Options) ApplyTo(opts *Options)

func (*Options) IsAcornfile

func (d *Options) IsAcornfile() bool

Directories

Path Synopsis
pkg
cue
internal
Package internal exposes some cue internals to other packages.
Package internal exposes some cue internals to other packages.
parser
Package parser implements a parser for CUE source files.
Package parser implements a parser for CUE source files.
source
Package source contains utility functions that standardize reading source bytes across cue packages.
Package source contains utility functions that standardize reading source bytes across cue packages.
std

Jump to

Keyboard shortcuts

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