Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NaturalDecode ¶
Types ¶
type ParsedFile ¶
type SchemaValue ¶
type SchemaValue struct {
Id string `json:"id,omitempty" yaml:"id,omitempty" cbor:"id,omitempty"`
Kind string `json:"kind" yaml:"kind" cbor:"kind"`
Version string `json:"version" yaml:"version" cbor:"version"`
Metadata map[string]any `json:"metadata,omitempty" yaml:"metadata,omitempty" cbor:"metadata,omitempty"`
Spec map[string]any `json:"spec" yaml:"spec" cbor:"spec"`
}
func NaturalEncode ¶
func NaturalEncode(e *entity.Entity, es *entity.EncodedSchema) (*SchemaValue, error)
type TextFormatter ¶
type TextFormatter struct {
// contains filtered or unexported fields
}
func NewTextFormatter ¶
func NewTextFormatter(sc *entity.SchemaCache) (*TextFormatter, error)
func (*TextFormatter) Format ¶
Format produces a textual representation of an entity by YAML encoding its attributes.
func (*TextFormatter) Parse ¶
func (f *TextFormatter) Parse(ctx context.Context, data []byte) (*ParsedFile, error)
Click to show internal directories.
Click to hide internal directories.