Documentation ¶
Index ¶
- Variables
- func MarshalBinaryAdapter(marshalCser func(*Writer) error) ([]byte, error)
- func PaddedBytes(b []byte, n int) []byte
- func UnmarshalBinaryAdapter(raw []byte, unmarshalCser func(reader *Reader) error) (err error)
- type Reader
- func (r *Reader) BigInt() *big.Int
- func (r *Reader) Bool() bool
- func (r *Reader) FixedBytes(v []byte)
- func (r *Reader) I64() int64
- func (r *Reader) SliceBytes() []byte
- func (r *Reader) U16() uint16
- func (r *Reader) U32() uint32
- func (r *Reader) U56() uint64
- func (r *Reader) U64() uint64
- func (r *Reader) U8() uint8
- func (r *Reader) VarUint() uint64
- type Writer
- func (w *Writer) BigInt(v *big.Int)
- func (w *Writer) Bool(v bool)
- func (w *Writer) FixedBytes(v []byte)
- func (w *Writer) I64(v int64)
- func (w *Writer) SliceBytes(v []byte)
- func (w *Writer) U16(v uint16)
- func (w *Writer) U32(v uint32)
- func (w *Writer) U56(v uint64)
- func (w *Writer) U64(v uint64)
- func (w *Writer) U8(v uint8)
- func (w *Writer) VarUint(v uint64)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNonCanonicalEncoding = errors.New("non canonical encoding") ErrMalformedEncoding = errors.New("malformed encoding") )
Functions ¶
func MarshalBinaryAdapter ¶
func PaddedBytes ¶
PaddedBytes returns a slice with length of the slice is at least n bytes.
Types ¶
Click to show internal directories.
Click to hide internal directories.