package yaml

import "cuelang.org/go/pkg/encoding/yaml"

Index

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 instance.

func Validate

func Validate(b []byte, v cue.Value) (bool, error)

Validate validates YAML and confirms it matches the constraints specified by v. If the YAML source is a stream, every object must match v.

Source Files

manual.go

Version
v0.0.15
Published
Dec 5, 2019
Platform
linux/amd64
Imports
7 packages
Last checked
53 minutes ago

Tools for package owners.