Documentation
¶
Index ¶
- Variables
- func Equal(left Value, right Value) bool
- func Hash(val Value, hash crypto.Hash) ([]byte, error)
- func Hex(val Value) string
- func Jsonify(val Value) string
- func MessagePacker(w io.Writer) *messagePacker
- func MessageParser() *messageParser
- func MessageReader(r io.Reader) *messageIOUnpacker
- func MessageUnpacker(buf []byte, copy bool) *messageBufUnpacker
- func Pack(val Value) ([]byte, error)
- func ParseBoolean(str string) boolValue
- func ReadStream(r io.Reader, out chan<- Value) error
- func Seal(val Value, recipientPublicKey, senderPrivateKey *[32]byte) ([]byte, error)
- func Unknown(tagAndData []byte) unknownValue
- func UnpackBigInt(data []byte) (*big.Int, error)
- func UnpackDecimal(data []byte) (decimal.Decimal, error)
- func Write(w io.Writer, val Value) error
- func WriteStream(w io.Writer, valueC <-chan Value) error
- type Bool
- type Collection
- type Ext
- type Extension
- type Format
- type Kind
- type List
- type ListItem
- type Map
- type MapEntry
- type Number
- type NumberType
- type Packer
- type Parser
- type String
- type StringType
- type Unpacker
- type Value
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var AllowFastAppends = true
View Source
var Base64Prefix = "base64,"
View Source
var DecimalExpDelim = byte('x')
View Source
var DecimalExpDelimStr = "x"
View Source
var ErrUnseal = errors.New("unseal error")
View Source
var False = boolValue(false)
View Source
var FirstIndexKey = 0
View Source
var PrecisionLevel = 0.00001
View Source
var True = boolValue(true)
View Source
var UnknownPrefix = "data:application/x-msgpack-ext;"
Functions ¶
func MessagePacker ¶
func MessageParser ¶
func MessageParser() *messageParser
func MessageReader ¶
func MessageUnpacker ¶
func ParseBoolean ¶
func ParseBoolean(str string) boolValue
Types ¶
type Collection ¶ added in v1.2.0
type List ¶
type List interface { Value Collection Items() []ListItem Values() []Value GetAt(int) Value GetBoolAt(int) Bool GetNumberAt(int) Number GetStringAt(int) String GetListAt(int) List GetMapAt(int) Map PutAt(int, Value) List InsertAt(int, Value) List Append(Value) List RemoveAt(int) List }
func EmptySparseList ¶ added in v1.2.0
func EmptySparseList() List
func SortedSparseList ¶ added in v1.2.0
func SparseList ¶ added in v1.2.0
func SparseListOf ¶ added in v1.2.0
type ListItem ¶ added in v1.2.0
type Map ¶
type Map interface { Value Collection HashMap() map[string]Value Keys() []string Values() []Value Get(string) (Value, bool) GetBool(string) Bool GetNumber(string) Number GetString(string) String GetList(string) List GetMap(string) Map Insert(key string, value Value) Map Put(key string, value Value) Map Remove(string) Map }
type Number ¶
type Number interface { Value Type() NumberType IsNaN() bool Long() int64 Double() float64 BigInt() *big.Int Decimal() decimal.Decimal Add(Number) Number Subtract(Number) Number }
func ParseNumber ¶
type NumberType ¶
type NumberType int
const ( InvalidNumber NumberType = iota LONG DOUBLE BIGINT DECIMAL )
func (NumberType) String ¶
func (t NumberType) String() string
type String ¶
type String interface { Value Type() StringType Len() int Utf8() string Raw() []byte }
func ParseString ¶
type StringType ¶
type StringType int
const ( InvalidString StringType = iota UTF8 RAW )
func (StringType) String ¶
func (t StringType) String() string
type Value ¶
Click to show internal directories.
Click to hide internal directories.