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.11
Published
Sep 13, 2019
Platform
darwin/amd64
Imports
7 packages
Last checked
10 minutes ago

Tools for package owners.