Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Boolean ¶
type Boolean bool
Boolean is used for encoding and decoding the nvlist BOOLEAN datatype, which is different than BOOLEAN_VALUE. An nvlist BOOLEAN data type consists of a string key and a zero length value. Instead of dealing with inconsistencies when working with go structs vs map[string]interface, special go property annotations, and/or inferring when to handle data as a BOOLEAN based on nil/interface{} values, this explicitly named go type is to be used.
type NativeDecoder ¶
type NativeDecoder struct {
// contains filtered or unexported fields
}
NativeDecoder is a Decoder for native encoding.
func NewNativeDecoder ¶
func NewNativeDecoder(r io.ReadSeeker) *NativeDecoder
NewNativeDecoder creates a new NativeDecoder.
func (*NativeDecoder) Decode ¶
func (d *NativeDecoder) Decode(target interface{}) (err error)
Decode decodes data into a supplied target. Note: care should be taken when decoding into a `map[string]interface{}` as bytes/uint8s (and their array forms) can not be distinguished and will be treated as uint8/[]uint8.
type NativeEncoder ¶
type NativeEncoder struct {
// contains filtered or unexported fields
}
NativeEncoder is an Encoder for native encoding.
func NewNativeEncoder ¶
func NewNativeEncoder(w io.Writer) *NativeEncoder
NewNativeEncoder creates a new NativeEncoder.
func (NativeEncoder) Encode ¶
func (e NativeEncoder) Encode(i interface{}) error
Encode encodes the supplied data with native encoding.
type XDRDecoder ¶
XDRDecoder is a Decoder for XDR encoding.
func NewXDRDecoder ¶
func NewXDRDecoder(r io.ReadSeeker) *XDRDecoder
NewXDRDecoder creates a new XDRDecoder.
func (*XDRDecoder) Decode ¶
func (d *XDRDecoder) Decode(target interface{}) error
Decode decodes data into a supplied target. Note: care should be taken when decoding into a `map[string]interface{}` as bytes/uint8s (and their array forms) can not be distinguished and will be treated as uint8/[]uint8.
type XDREncoder ¶
type XDREncoder struct {
// contains filtered or unexported fields
}
XDREncoder is an Encoder for XDR encoding.
func NewXDREncoder ¶
func NewXDREncoder(w io.Writer) XDREncoder
NewXDREncoder creates a new XDREncoder.
func (XDREncoder) Encode ¶
func (e XDREncoder) Encode(i interface{}) error
Encode encodes data using XDR encoding.