core

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalCueValue

func MarshalCueValue(v cue.Value) (b []byte, err error)

func Register

func Register(m Translator)

func UnmarshalCueValue

func UnmarshalCueValue(cueValue cue.Value, v interface{}) error

func ValueFromCueValue

func ValueFromCueValue(v cue.Value) (interface{}, error)

Types

type Translator

type Translator interface {
	// Name renderer name, be will used in attr @render()
	Name() string
	// MarshalCue marshal cue as json raw
	MarshalCueValue(v cue.Value) ([]byte, error)
}

type Translators

type Translators map[string]Translator

func (Translators) Marshal

func (m Translators) Marshal(v cue.Value) (b []byte, err error)

Jump to

Keyboard shortcuts

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