Documentation
¶
Index ¶
- Constants
- Variables
- func Marshal(v interface{}) ([]byte, error)
- func MarshalToBitBuffer(bb *bitbuffer.BitBuffer, v interface{}) error
- func Unmarshal(data []byte, v interface{}) (err error)
- func UnmarshalFromBitBuffer(bb *bitbuffer.BitBuffer, v interface{}) (err error)
- type Context
- type FieldWidthTag
- type IncludeIfOperation
- type IncludeIfTag
- type Marshaler
- type SlicePrefixTag
- type StringTermination
- type StringTypeTag
- type Unmarshaler
Constants ¶
View Source
const ( Prefix StringTermination = 0 Null StringTermination = 1 TagEndian = "bcendian" TagSlicePrefix = "bcsliceprefix" TagStringType = "bcstringtype" TagIncludeIf = "bcincludeif" TagFieldWidth = "bcfieldwidth" BigEndianKeyword = "big" NullTerminationKeyword = "null" )
Variables ¶
View Source
var ErrUnsupportedType = errors.New("unsupported type")
View Source
var IncludeIfRegex = regexp.MustCompile(`^([a-zA-Z0-9.]+)(!=|==)?(.*)$`)
Functions ¶
func MarshalToBitBuffer ¶
func UnmarshalFromBitBuffer ¶
Types ¶
type FieldWidthTag ¶
func (FieldWidthTag) Width ¶
func (t FieldWidthTag) Width(defaultWidth int) int
type IncludeIfOperation ¶
type IncludeIfOperation uint8
const ( Equal IncludeIfOperation = 0x00 NotEqual IncludeIfOperation = 0x01 )
type IncludeIfTag ¶
type IncludeIfTag struct {
Relative bool
FieldPath []string
Operation IncludeIfOperation
Value string
}
func (IncludeIfTag) HasIncludeIf ¶
func (i IncludeIfTag) HasIncludeIf() bool
type SlicePrefixTag ¶
func (SlicePrefixTag) HasPrefix ¶
func (l SlicePrefixTag) HasPrefix() bool
type StringTermination ¶
type StringTermination uint8
type StringTypeTag ¶
type StringTypeTag struct {
Termination StringTermination
Size uint8
Endian bitbuffer.Endian
}
Click to show internal directories.
Click to hide internal directories.