Documentation ¶
Index ¶
- func NewASTFromInterface(val interface{}) interface{}
- func PlainMarshal(val interface{}) ([]byte, error)
- func PlainUnmarshal(data []byte, val interface{}) error
- type Array
- func (n *Array) AddValue(val interface{}) error
- func (n *Array) DeepCopy() *Array
- func (n *Array) DeepCopyAsInterface() interface{}
- func (n *Array) DeepCopyAsNode() Node
- func (n *Array) GetAnnotations() interface{}
- func (n *Array) GetMetas() []*Meta
- func (n *Array) GetPosition() *filepos.Position
- func (n *Array) GetValues() []interface{}
- func (n *Array) MarshalYAML() (interface{}, error)
- func (n *Array) ResetValue()
- func (n *Array) SetAnnotations(anns interface{})
- func (n *Array) SetValue(val interface{}) error
- type ArrayItem
- func (n *ArrayItem) AddValue(val interface{}) error
- func (n *ArrayItem) DeepCopy() *ArrayItem
- func (n *ArrayItem) DeepCopyAsInterface() interface{}
- func (n *ArrayItem) DeepCopyAsNode() Node
- func (n *ArrayItem) GetAnnotations() interface{}
- func (n *ArrayItem) GetMetas() []*Meta
- func (n *ArrayItem) GetPosition() *filepos.Position
- func (n *ArrayItem) GetValues() []interface{}
- func (n *ArrayItem) MarshalYAML() (interface{}, error)
- func (n *ArrayItem) ResetValue()
- func (n *ArrayItem) SetAnnotations(anns interface{})
- func (n *ArrayItem) SetValue(val interface{}) error
- type DocSetOpts
- type Document
- func (n *Document) AddValue(val interface{}) error
- func (d *Document) AsInterface(opts InterfaceConvertOpts) interface{}
- func (n *Document) DeepCopy() *Document
- func (n *Document) DeepCopyAsInterface() interface{}
- func (n *Document) DeepCopyAsNode() Node
- func (n *Document) GetAnnotations() interface{}
- func (n *Document) GetMetas() []*Meta
- func (n *Document) GetPosition() *filepos.Position
- func (n *Document) GetValues() []interface{}
- func (d *Document) IsEmpty() bool
- func (n *Document) MarshalYAML() (interface{}, error)
- func (n *Document) ResetValue()
- func (n *Document) SetAnnotations(anns interface{})
- func (n *Document) SetValue(val interface{}) error
- type DocumentSet
- func (n *DocumentSet) AddValue(val interface{}) error
- func (d *DocumentSet) AsBytes() ([]byte, error)
- func (d *DocumentSet) AsSourceBytes() ([]byte, bool)
- func (n *DocumentSet) DeepCopy() *DocumentSet
- func (n *DocumentSet) DeepCopyAsInterface() interface{}
- func (n *DocumentSet) DeepCopyAsNode() Node
- func (n *DocumentSet) GetAnnotations() interface{}
- func (n *DocumentSet) GetMetas() []*Meta
- func (n *DocumentSet) GetPosition() *filepos.Position
- func (n *DocumentSet) GetValues() []interface{}
- func (n *DocumentSet) MarshalYAML() (interface{}, error)
- func (d *DocumentSet) Print(writer io.Writer)
- func (n *DocumentSet) ResetValue()
- func (n *DocumentSet) SetAnnotations(anns interface{})
- func (n *DocumentSet) SetValue(val interface{}) error
- type InterfaceConvertOpts
- type Map
- func (n *Map) AddValue(val interface{}) error
- func (n *Map) DeepCopy() *Map
- func (n *Map) DeepCopyAsInterface() interface{}
- func (n *Map) DeepCopyAsNode() Node
- func (n *Map) GetAnnotations() interface{}
- func (n *Map) GetMetas() []*Meta
- func (n *Map) GetPosition() *filepos.Position
- func (n *Map) GetValues() []interface{}
- func (n *Map) MarshalYAML() (interface{}, error)
- func (n *Map) ResetValue()
- func (n *Map) SetAnnotations(anns interface{})
- func (n *Map) SetValue(val interface{}) error
- type MapItem
- func (n *MapItem) AddValue(val interface{}) error
- func (n *MapItem) DeepCopy() *MapItem
- func (n *MapItem) DeepCopyAsInterface() interface{}
- func (n *MapItem) DeepCopyAsNode() Node
- func (n *MapItem) GetAnnotations() interface{}
- func (n *MapItem) GetMetas() []*Meta
- func (n *MapItem) GetPosition() *filepos.Position
- func (n *MapItem) GetValues() []interface{}
- func (n *MapItem) MarshalYAML() (interface{}, error)
- func (n *MapItem) ResetValue()
- func (n *MapItem) SetAnnotations(anns interface{})
- func (n *MapItem) SetValue(val interface{}) error
- type Meta
- type MetaSlice
- type Node
- type Parser
- type Printer
- type PrinterOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewASTFromInterface ¶
func NewASTFromInterface(val interface{}) interface{}
func PlainMarshal ¶
func PlainUnmarshal ¶
Types ¶
type Array ¶
type Array struct { Metas []*Meta Items []*ArrayItem Position *filepos.Position // contains filtered or unexported fields }
func (*Array) DeepCopyAsInterface ¶
func (n *Array) DeepCopyAsInterface() interface{}
func (*Array) DeepCopyAsNode ¶
func (*Array) GetAnnotations ¶
func (n *Array) GetAnnotations() interface{}
func (*Array) GetPosition ¶
func (*Array) MarshalYAML ¶
func (*Array) ResetValue ¶
func (n *Array) ResetValue()
func (*Array) SetAnnotations ¶
func (n *Array) SetAnnotations(anns interface{})
type ArrayItem ¶
type ArrayItem struct { Metas []*Meta Value interface{} Position *filepos.Position // contains filtered or unexported fields }
func (*ArrayItem) DeepCopyAsInterface ¶
func (n *ArrayItem) DeepCopyAsInterface() interface{}
func (*ArrayItem) DeepCopyAsNode ¶
func (*ArrayItem) GetAnnotations ¶
func (n *ArrayItem) GetAnnotations() interface{}
func (*ArrayItem) GetPosition ¶
func (*ArrayItem) MarshalYAML ¶
func (*ArrayItem) ResetValue ¶
func (n *ArrayItem) ResetValue()
func (*ArrayItem) SetAnnotations ¶
func (n *ArrayItem) SetAnnotations(anns interface{})
type DocSetOpts ¶ added in v0.4.0
type Document ¶
type Document struct { Metas []*Meta Value interface{} Position *filepos.Position // contains filtered or unexported fields }
func (*Document) AsInterface ¶
func (d *Document) AsInterface(opts InterfaceConvertOpts) interface{}
func (*Document) DeepCopyAsInterface ¶
func (n *Document) DeepCopyAsInterface() interface{}
func (*Document) DeepCopyAsNode ¶
func (*Document) GetAnnotations ¶
func (n *Document) GetAnnotations() interface{}
func (*Document) GetPosition ¶
func (*Document) MarshalYAML ¶
func (*Document) ResetValue ¶
func (n *Document) ResetValue()
func (*Document) SetAnnotations ¶
func (n *Document) SetAnnotations(anns interface{})
type DocumentSet ¶
type DocumentSet struct { Metas []*Meta AllMetas []*Meta Items []*Document Position *filepos.Position // contains filtered or unexported fields }
func NewDocumentSetFromBytes ¶
func NewDocumentSetFromBytes(data []byte, associatedName string) (*DocumentSet, error)
func NewDocumentSetFromBytesWithOpts ¶ added in v0.4.0
func NewDocumentSetFromBytesWithOpts(data []byte, opts DocSetOpts) (*DocumentSet, error)
func (*DocumentSet) AddValue ¶
func (n *DocumentSet) AddValue(val interface{}) error
func (*DocumentSet) AsBytes ¶
func (d *DocumentSet) AsBytes() ([]byte, error)
func (*DocumentSet) AsSourceBytes ¶
func (d *DocumentSet) AsSourceBytes() ([]byte, bool)
AsSourceBytes() returns bytes used to make original DocumentSet. Any changes made to the DocumentSet are not reflected in any way
func (*DocumentSet) DeepCopy ¶
func (n *DocumentSet) DeepCopy() *DocumentSet
func (*DocumentSet) DeepCopyAsInterface ¶
func (n *DocumentSet) DeepCopyAsInterface() interface{}
func (*DocumentSet) DeepCopyAsNode ¶
func (n *DocumentSet) DeepCopyAsNode() Node
func (*DocumentSet) GetAnnotations ¶
func (n *DocumentSet) GetAnnotations() interface{}
func (*DocumentSet) GetMetas ¶
func (n *DocumentSet) GetMetas() []*Meta
func (*DocumentSet) GetPosition ¶
func (n *DocumentSet) GetPosition() *filepos.Position
func (*DocumentSet) GetValues ¶
func (n *DocumentSet) GetValues() []interface{}
func (*DocumentSet) MarshalYAML ¶
func (n *DocumentSet) MarshalYAML() (interface{}, error)
func (*DocumentSet) Print ¶
func (d *DocumentSet) Print(writer io.Writer)
func (*DocumentSet) ResetValue ¶
func (n *DocumentSet) ResetValue()
func (*DocumentSet) SetAnnotations ¶
func (n *DocumentSet) SetAnnotations(anns interface{})
func (*DocumentSet) SetValue ¶
func (n *DocumentSet) SetValue(val interface{}) error
type InterfaceConvertOpts ¶
type InterfaceConvertOpts struct {
OrderedMap bool
}
type Map ¶
type Map struct { Metas []*Meta Items []*MapItem Position *filepos.Position // contains filtered or unexported fields }
func (*Map) DeepCopyAsInterface ¶
func (n *Map) DeepCopyAsInterface() interface{}
func (*Map) DeepCopyAsNode ¶
func (*Map) GetAnnotations ¶
func (n *Map) GetAnnotations() interface{}
func (*Map) GetPosition ¶
func (*Map) MarshalYAML ¶
func (*Map) ResetValue ¶
func (n *Map) ResetValue()
func (*Map) SetAnnotations ¶
func (n *Map) SetAnnotations(anns interface{})
type MapItem ¶
type MapItem struct { Metas []*Meta Key interface{} Value interface{} Position *filepos.Position // contains filtered or unexported fields }
func (*MapItem) DeepCopyAsInterface ¶
func (n *MapItem) DeepCopyAsInterface() interface{}
func (*MapItem) DeepCopyAsNode ¶
func (*MapItem) GetAnnotations ¶
func (n *MapItem) GetAnnotations() interface{}
func (*MapItem) GetPosition ¶
func (*MapItem) MarshalYAML ¶
func (*MapItem) ResetValue ¶
func (n *MapItem) ResetValue()
func (*MapItem) SetAnnotations ¶
func (n *MapItem) SetAnnotations(anns interface{})
type Node ¶
type Node interface { GetPosition() *filepos.Position GetValues() []interface{} // ie children SetValue(interface{}) error AddValue(interface{}) error ResetValue() GetMetas() []*Meta GetAnnotations() interface{} SetAnnotations(interface{}) DeepCopyAsInterface() interface{} DeepCopyAsNode() Node // contains filtered or unexported methods }
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) ParseBytes ¶
func (p *Parser) ParseBytes(data []byte, associatedName string) (*DocumentSet, error)
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
func NewPrinter ¶
func NewPrinterWithOpts ¶
func NewPrinterWithOpts(writer io.Writer, opts PrinterOpts) Printer
type PrinterOpts ¶
type PrinterOpts struct {
ExcludeRefs bool
}
Click to show internal directories.
Click to hide internal directories.