Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Mode filetypes.Mode // Out specifies an overwrite destination. Out io.Writer Stdin io.Reader Stdout io.Writer PkgName string // package name for files to generate Force bool // overwrite existing files. Strict bool Stream bool // will potentially write more than one document per file AllErrors bool EscapeHTML bool ProtoPath []string Format []format.Option ParseFile func(name string, src interface{}) (*ast.File, error) }
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
NewDecoder returns a stream of non-rooted data expressions. The encoding type of f must be a data type, but does not have to be an encoding that can stream. stdin is used in case the file is "-".
func (*Decoder) ID ¶
ID returns a canonical identifier for the decoded object or "" if no such identifier could be found.
func (*Decoder) Interpretation ¶ added in v0.2.0
func (i *Decoder) Interpretation() build.Interpretation
Interpretation returns the current interpretation detected by Detect.
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
An Encoder converts CUE to various file formats, including CUE itself. An Encoder allows
func NewEncoder ¶
NewEncoder writes content to the file with the given specification.
Click to show internal directories.
Click to hide internal directories.