Documentation
¶
Index ¶
- func AddIndent(code string, numOfIndentations int) string
- func Align(v string, l int) string
- func Int16Marshal() string
- func Int16SizeCode() string
- func Int16Unmarshal(typeName string) string
- func Int32Marshal() string
- func Int32SizeCode() string
- func Int32Unmarshal(typeName string) string
- func Int64Marshal() string
- func Int64SizeCode() string
- func Int64Unmarshal(typeName string) string
- func MergeTypes(existingTypes []reflect.Type, newTypes []reflect.Type) []reflect.Type
- func UInt16Marshal() string
- func UInt16SizeCode() string
- func UInt16Unmarshal(typeName string) string
- func UInt32Marshal() string
- func UInt32SizeCode() string
- func UInt32Unmarshal(typeName string) string
- func UInt64Marshal() string
- func UInt64SizeCode() string
- func UInt64Unmarshal(typeName string) string
- func Var(prefix string, varIndex *uint64) string
- type BuilderFactory
- type BuilderFactoryConstant
- type BuilderFactoryNonConstant
- type TypeMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Int16Marshal ¶
func Int16Marshal() string
Int16Marshal generates code to marshal varint for int16.
func Int16SizeCode ¶
func Int16SizeCode() string
Int16SizeCode generates code to get size of varint for int16.
func Int16Unmarshal ¶
Int16Unmarshal generates code to unmarshal varint for int16.
func Int32Marshal ¶
func Int32Marshal() string
Int32Marshal generates code to marshal varint for int32.
func Int32SizeCode ¶
func Int32SizeCode() string
Int32SizeCode generates code to get size of varint for int32.
func Int32Unmarshal ¶
Int32Unmarshal generates code to unmarshal varint for int32.
func Int64Marshal ¶
func Int64Marshal() string
Int64Marshal generates code to marshal varint for int64.
func Int64SizeCode ¶
func Int64SizeCode() string
Int64SizeCode generates code to get size of varint for int64.
func Int64Unmarshal ¶
Int64Unmarshal generates code to unmarshal varint for int64.
func MergeTypes ¶ added in v0.7.0
MergeTypes merges two sets of types.
func UInt16Marshal ¶
func UInt16Marshal() string
UInt16Marshal generates code to marshal varint for uint16.
func UInt16SizeCode ¶
func UInt16SizeCode() string
UInt16SizeCode generates code to get size of varint for uint16.
func UInt16Unmarshal ¶
UInt16Unmarshal generates code to unmarshal varint for uint16.
func UInt32Marshal ¶
func UInt32Marshal() string
UInt32Marshal generates code to marshal varint for uint32.
func UInt32SizeCode ¶
func UInt32SizeCode() string
UInt32SizeCode generates code to get size of varint for uint32.
func UInt32Unmarshal ¶
UInt32Unmarshal generates code to unmarshal varint for uint32.
func UInt64Marshal ¶
func UInt64Marshal() string
UInt64Marshal generates code to marshal varint for uint64.
func UInt64SizeCode ¶
func UInt64SizeCode() string
UInt64SizeCode generates code to get size of varint for uint64.
func UInt64Unmarshal ¶
UInt64Unmarshal generates code to unmarshal varint for uint64.
Types ¶
type BuilderFactory ¶
type BuilderFactory interface { Dependencies() []reflect.Type ConstantSize() uint64 SizeCodeTemplate(varIndex *uint64) (string, bool) MarshalCodeTemplate(varIndex *uint64) string UnmarshalCodeTemplate(varIndex *uint64) string }
BuilderFactory is the interface every type builder must implement.
type BuilderFactoryConstant ¶
type BuilderFactoryConstant interface { Dependencies() []reflect.Type ConstantSize() uint64 MarshalCodeTemplate(varIndex *uint64) string UnmarshalCodeTemplate(varIndex *uint64) string }
BuilderFactoryConstant is the relaxed interface implemented by builders representing types requiring only constant size of buffer.
type BuilderFactoryNonConstant ¶
type BuilderFactoryNonConstant interface { Dependencies() []reflect.Type SizeCodeTemplate(varIndex *uint64) string MarshalCodeTemplate(varIndex *uint64) string UnmarshalCodeTemplate(varIndex *uint64) string }
BuilderFactoryNonConstant is the relaxed interface implemented by builders representing types requiring only non-constant size of buffer.
type TypeMap ¶
type TypeMap struct {
// contains filtered or unexported fields
}
TypeMap implements type mapping required by go code.