Documentation ¶
Overview ¶
v2 encoding, this will replace the reflect based one earlier
Index ¶
- Constants
- Variables
- func Generate(pkg string, imports []string, ts ...Type) ([]byte, error)
- func ReadFrom(r io.Reader, f interface{}) (int64, error)
- func ReadFromAndPost(r io.Reader, f postUnmarshaller) (int64, error)
- func WriteTo(w io.Writer, f interface{}) (int64, error)
- func WriteToAndPre(w io.Writer, f preMarshaller) (int64, error)
- type Array
- func (t *Array) Consts() []NamedConstant
- func (t *Array) Deser(p Context, m string) ([]Statement, error)
- func (t *Array) FindReference(needle interface{}) string
- func (t *Array) Functions() []Function
- func (t *Array) PreSer(p Context, m string) ([]Statement, error)
- func (t *Array) Ser(p Context, m string) ([]Statement, error)
- func (t *Array) TypeDefs() []TypeDef
- func (t *Array) TypeName() string
- type BitStruct
- func (t *BitStruct) BoolBit(n string) *bitfield
- func (t *BitStruct) Consts() []NamedConstant
- func (t *BitStruct) Deser(p Context, m string) ([]Statement, error)
- func (t *BitStruct) FindReference(needle interface{}) string
- func (t *BitStruct) Functions() []Function
- func (t *BitStruct) IntField(n string, bits int) *bitfield
- func (t *BitStruct) PreSer(p Context, m string) ([]Statement, error)
- func (t *BitStruct) Ser(p Context, m string) ([]Statement, error)
- func (t *BitStruct) SkipBit(n int)
- func (t *BitStruct) TypeDefs() []TypeDef
- func (t *BitStruct) TypeName() string
- type ByteArray
- func (t *ByteArray) Consts() []NamedConstant
- func (t *ByteArray) Deser(p Context, m string) ([]Statement, error)
- func (t *ByteArray) FindReference(interface{}) string
- func (t *ByteArray) Functions() []Function
- func (t *ByteArray) PreSer(p Context, m string) ([]Statement, error)
- func (t *ByteArray) Ser(p Context, m string) ([]Statement, error)
- func (t *ByteArray) TypeDefs() []TypeDef
- func (t *ByteArray) TypeName() string
- type Constant
- type Context
- type Enum
- func (t *Enum) Consts() []NamedConstant
- func (t *Enum) Deser(p Context, m string) ([]Statement, error)
- func (t *Enum) FindReference(interface{}) string
- func (t *Enum) Functions() []Function
- func (t *Enum) PreSer(p Context, m string) ([]Statement, error)
- func (t *Enum) Ser(p Context, m string) ([]Statement, error)
- func (t *Enum) TypeDefs() []TypeDef
- func (t *Enum) TypeName() string
- type Field
- type Function
- type NamedConstant
- type Object
- func (t *Object) Consts() []NamedConstant
- func (t *Object) Deser(p Context, m string) ([]Statement, error)
- func (t *Object) FindReference(interface{}) string
- func (t *Object) Functions() []Function
- func (t *Object) PreSer(p Context, m string) ([]Statement, error)
- func (t *Object) Ser(p Context, m string) ([]Statement, error)
- func (t *Object) TypeDefs() []TypeDef
- func (t *Object) TypeName() string
- type Reader
- type Size
- type Skip
- func (t *Skip) Consts() []NamedConstant
- func (t *Skip) Deser(p Context, m string) ([]Statement, error)
- func (t *Skip) FindReference(interface{}) string
- func (t *Skip) Functions() []Function
- func (t *Skip) PreSer(p Context, m string) ([]Statement, error)
- func (t *Skip) Ser(p Context, m string) ([]Statement, error)
- func (t *Skip) TypeDefs() []TypeDef
- func (t *Skip) TypeName() string
- type Statement
- type Struct
- func (t *Struct) Consts() []NamedConstant
- func (t *Struct) Deser(p Context, m string) ([]Statement, error)
- func (t *Struct) Field(n string, ty Type) *Field
- func (t *Struct) FindReference(needle interface{}) string
- func (t *Struct) Functions() []Function
- func (t *Struct) PreSer(p Context, m string) ([]Statement, error)
- func (t *Struct) Ser(p Context, m string) ([]Statement, error)
- func (t *Struct) TypeDefs() []TypeDef
- func (t *Struct) TypeName() string
- type SwitchedType
- func (t *SwitchedType) Consts() []NamedConstant
- func (t *SwitchedType) Deser(p Context, m string) ([]Statement, error)
- func (t *SwitchedType) FindReference(interface{}) string
- func (t *SwitchedType) Functions() []Function
- func (t *SwitchedType) PreSer(p Context, m string) ([]Statement, error)
- func (t *SwitchedType) Ser(p Context, m string) ([]Statement, error)
- func (t *SwitchedType) TypeDefs() []TypeDef
- func (t *SwitchedType) TypeName() string
- type Type
- type TypeDef
- type Unsigned
- func (t *Unsigned) Consts() []NamedConstant
- func (t *Unsigned) Deser(p Context, m string) ([]Statement, error)
- func (t *Unsigned) FindReference(interface{}) string
- func (t *Unsigned) Functions() []Function
- func (t *Unsigned) PreSer(p Context, m string) ([]Statement, error)
- func (t *Unsigned) Ser(p Context, m string) ([]Statement, error)
- func (t *Unsigned) TypeDefs() []TypeDef
- func (t *Unsigned) TypeName() string
- type Writer
Constants ¶
View Source
const ( Bits = Size(1) Bytes = Size(8) RemainingBytes = Size(-1) )
Variables ¶
Functions ¶
func ReadFrom ¶
Reads a fibrechannel package annotated structure from the io.Reader If fed a structure that does not have any `fc` tags it will do nothing
Types ¶
type Array ¶
func (*Array) Consts ¶
func (t *Array) Consts() []NamedConstant
func (*Array) FindReference ¶
type BitStruct ¶
type BitStruct struct { Name string // contains filtered or unexported fields }
func NewBitStruct ¶
func (*BitStruct) Consts ¶
func (t *BitStruct) Consts() []NamedConstant
func (*BitStruct) FindReference ¶
type ByteArray ¶
type ByteArray struct {
Count int
}
func (*ByteArray) Consts ¶
func (t *ByteArray) Consts() []NamedConstant
func (*ByteArray) FindReference ¶
type Context ¶
type Context interface {
FindReference(interface{}) string
}
Context is used to bind dependent parts of the structures together
type Enum ¶
func (*Enum) Consts ¶
func (t *Enum) Consts() []NamedConstant
func (*Enum) FindReference ¶
type NamedConstant ¶
type Object ¶
type Object struct {
Class string
}
func (*Object) Consts ¶
func (t *Object) Consts() []NamedConstant
func (*Object) FindReference ¶
type Reader ¶
func (*Reader) ReadObject ¶
func (r *Reader) ReadObject(v interface{})
type Skip ¶
type Skip struct {
Size Size
}
func (*Skip) Consts ¶
func (t *Skip) Consts() []NamedConstant
func (*Skip) FindReference ¶
type Struct ¶
func (*Struct) Consts ¶
func (t *Struct) Consts() []NamedConstant
func (*Struct) FindReference ¶
type SwitchedType ¶
func (*SwitchedType) Consts ¶
func (t *SwitchedType) Consts() []NamedConstant
func (*SwitchedType) FindReference ¶
func (t *SwitchedType) FindReference(interface{}) string
func (*SwitchedType) Functions ¶
func (t *SwitchedType) Functions() []Function
func (*SwitchedType) PreSer ¶
func (t *SwitchedType) PreSer(p Context, m string) ([]Statement, error)
func (*SwitchedType) TypeDefs ¶
func (t *SwitchedType) TypeDefs() []TypeDef
func (*SwitchedType) TypeName ¶
func (t *SwitchedType) TypeName() string
type Unsigned ¶
type Unsigned struct {
Size Size
}
func (*Unsigned) Consts ¶
func (t *Unsigned) Consts() []NamedConstant
func (*Unsigned) FindReference ¶
Click to show internal directories.
Click to hide internal directories.