go: cuelang.org/go/pkg/encoding/yaml Index | Files

package yaml

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

Index

Package Files

manual.go

func Marshal Uses

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

Marshal returns the YAML encoding of v.

func MarshalStream Uses

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

MarshalStream returns the YAML encoding of v.

func Unmarshal Uses

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

Unmarshal parses the YAML to a CUE instance.

func Validate Uses

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.

Package yaml imports 7 packages (graph) and is imported by 1 packages. Updated 2019-08-25. Refresh now. Tools for package owners.