Documentation ¶
Index ¶
- Variables
- func BebopMarshalBoolAt(buf []byte, offset int, b bool) (int, error)
- func BebopMarshalByteAt(buf []byte, offset int, bite byte) (int, error)
- func BebopMarshalDateAt(buf []byte, offset int, date time.Time) (int, error)
- func BebopMarshalFloat32At(buf []byte, offset int, num float32) (int, error)
- func BebopMarshalFloat64At(buf []byte, offset int, num float64) (int, error)
- func BebopMarshalGuidAt(buf []byte, offset int, guid uuid.UUID) (int, error)
- func BebopMarshalInt16At(buf []byte, offset int, num int16) (int, error)
- func BebopMarshalInt32At(buf []byte, offset int, num int32) (int, error)
- func BebopMarshalInt64At(buf []byte, offset int, num int64) (int, error)
- func BebopMarshalInt8At(buf []byte, offset int, num int8) (int, error)
- func BebopMarshalStringAt(buf []byte, offset int, str string) (int, error)
- func BebopMarshalUint16At(buf []byte, offset int, num uint16) (int, error)
- func BebopMarshalUint32At(buf []byte, offset int, num uint32) (int, error)
- func BebopMarshalUint64At(buf []byte, offset int, num uint64) (int, error)
- func BebopMarshalUint8At(buf []byte, offset int, num uint8) (int, error)
- func BebopUnmarshalBoolAt(buf []byte, offset int) (bool, int, error)
- func BebopUnmarshalByteAt(buf []byte, offset int) (byte, int, error)
- func BebopUnmarshalDateAt(buf []byte, offset int) (time.Time, int, error)
- func BebopUnmarshalFloat32At(buf []byte, offset int) (float32, int, error)
- func BebopUnmarshalFloat64At(buf []byte, offset int) (float64, int, error)
- func BebopUnmarshalGuidAt(buf []byte, offset int) (uuid.UUID, int, error)
- func BebopUnmarshalInt16At(buf []byte, offset int) (int16, int, error)
- func BebopUnmarshalInt32At(buf []byte, offset int) (int32, int, error)
- func BebopUnmarshalInt64At(buf []byte, offset int) (int64, int, error)
- func BebopUnmarshalInt8At(buf []byte, offset int) (int8, int, error)
- func BebopUnmarshalStringAt(buf []byte, offset int) (string, int, error)
- func BebopUnmarshalUint16At(buf []byte, offset int) (uint16, int, error)
- func BebopUnmarshalUint32At(buf []byte, offset int) (uint32, int, error)
- func BebopUnmarshalUint64At(buf []byte, offset int) (uint64, int, error)
- func BebopUnmarshalUint8At(buf []byte, offset int) (uint8, int, error)
- type Bebop
- type Decoder
- func (self *Decoder) DecodeBool() (bool, int, error)
- func (self *Decoder) DecodeByte() (byte, int, error)
- func (self *Decoder) DecodeDate() (time.Time, int, error)
- func (self *Decoder) DecodeFloat32() (float32, int, error)
- func (self *Decoder) DecodeFloat64() (float64, int, error)
- func (self *Decoder) DecodeGuid() (uuid.UUID, int, error)
- func (self *Decoder) DecodeInt16() (int16, int, error)
- func (self *Decoder) DecodeInt32() (int32, int, error)
- func (self *Decoder) DecodeInt64() (int64, int, error)
- func (self *Decoder) DecodeInt8() (int8, int, error)
- func (self *Decoder) DecodeString() (string, int, error)
- func (self *Decoder) DecodeUint16() (uint16, int, error)
- func (self *Decoder) DecodeUint32() (uint32, int, error)
- func (self *Decoder) DecodeUint64() (uint64, int, error)
- func (self *Decoder) DecodeUint8() (uint8, int, error)
- func (self *Decoder) DiscardN(n int) (int, error)
- type Encoder
- func (self *Encoder) EncodeBool(b bool) (err error)
- func (self *Encoder) EncodeByte(bite byte) error
- func (self *Encoder) EncodeDate(date time.Time) error
- func (self *Encoder) EncodeFloat32(num float32) (err error)
- func (self *Encoder) EncodeFloat64(num float64) (err error)
- func (self *Encoder) EncodeGuid(guid uuid.UUID) (err error)
- func (self *Encoder) EncodeInt16(num int16) error
- func (self *Encoder) EncodeInt32(num int32) error
- func (self *Encoder) EncodeInt64(num int64) error
- func (self *Encoder) EncodeInt8(num int8) error
- func (self *Encoder) EncodeString(str string) (err error)
- func (self *Encoder) EncodeUint16(num uint16) (err error)
- func (self *Encoder) EncodeUint32(num uint32) (err error)
- func (self *Encoder) EncodeUint64(num uint64) (err error)
- func (self *Encoder) EncodeUint8(num uint8) (err error)
- type OpcodeRegistry
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadEnumValue error = errors.New("Invalid Enum value") ErrBadBoolValue error = errors.New("Invalid Bool value") ErrBadLengthPrefix error = errors.New("Invalid encoding - bad length prefix") )
View Source
var ( // ErrEmptyUnion indicates a union had no contents (all fields are // nil), when exactly one member should be non-nil. ErrEmptyUnion error = errors.New("All fields in the Union are nil") ErrMultipleUnionValues error = errors.New("Multiple fields in the Union are non-nil. Exactly one field should be non-nil.") ErrBadDate error = errors.New("Dates before 1st Jan 1970 UTC cannot be encoded") )
View Source
var (
RegisterOpcode = registry.RegisterOpcode
)
Functions ¶
func BebopMarshalDateAt ¶
func BebopMarshalFloat32At ¶
func BebopMarshalFloat64At ¶
func BebopMarshalGuidAt ¶
func BebopMarshalStringAt ¶
func BebopMarshalUint16At ¶
func BebopMarshalUint32At ¶
func BebopMarshalUint64At ¶
func BebopUnmarshalDateAt ¶
func BebopUnmarshalFloat32At ¶
func BebopUnmarshalFloat64At ¶
func BebopUnmarshalGuidAt ¶
func BebopUnmarshalStringAt ¶
func BebopUnmarshalUint16At ¶
func BebopUnmarshalUint32At ¶
func BebopUnmarshalUint64At ¶
Types ¶
type Bebop ¶
type Bebop interface { // EncodeBebop writes the value to the writer, serialized as Bebop. EncodeBebop(writer io.Writer) error // DecodeBebop attempts to read Bebop from the reader and to // deserialize it into the value. DecodeBebop(reader io.Reader) error // MarshalBebop writes the value into the buf, serialized as // Bebop. The slice of the buf written to is returned. If the buf // is too small, a new buf is created, written to, and returned. MarshalBebop(buf []byte) ([]byte, error) // UnmarshalBebop attempts to read Bebop from the buf and to // deserialize it into the value. UnmarshalBebop(buf []byte) (int, error) // SizeBebop returns the number of bytes this value uses when // serialized to Bebop. SizeBebop() int }
Bebop Enums, Structs, Messages and Unions all satisfy this interface.
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
type OpcodeRegistry ¶
type OpcodeRegistry struct {
// contains filtered or unexported fields
}
func NewOpcodeRegistry ¶
func NewOpcodeRegistry() *OpcodeRegistry
func (*OpcodeRegistry) RegisterOpcode ¶
func (self *OpcodeRegistry) RegisterOpcode(name string, opcode uint32)
Click to show internal directories.
Click to hide internal directories.