yaml

package
v0.11.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(v cue.Value) (string, error)

Marshal returns the YAML encoding of v.

func MarshalStream

func MarshalStream(v cue.Value) (string, error)

MarshalStream returns the YAML encoding of v.

func Unmarshal

func Unmarshal(data []byte) (ast.Expr, error)

Unmarshal parses the YAML to a CUE expression.

func UnmarshalStream added in v0.4.2

func UnmarshalStream(data []byte) (ast.Expr, error)

UnmarshalStream parses the YAML to a CUE list expression on success.

func Validate added in v0.0.6

func Validate(b []byte, v pkg.Schema) (bool, error)

Validate validates YAML and confirms it is an instance of schema. If the YAML source is a stream, every object must match v.

func ValidatePartial added in v0.1.0

func ValidatePartial(b []byte, v pkg.Schema) (bool, error)

ValidatePartial validates YAML and confirms it matches the constraints specified by v using unification. This means that b must be consistent with, but does not have to be an instance of v. If the YAML source is a stream, every object must match v.

Types

This section is empty.

Jump to

Keyboard shortcuts

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