...

Package hctypes

import "gitlab.hexacode.org/go-libs/hctypes"
Overview
Index

Overview ▾

Index ▾

type BigInt
    func (this BigInt) ToBuffer() Buffer
type Bool
    func (this Bool) ToBuffer() Buffer
type Buffer
    func (this Buffer) Encode() String
    func (this Buffer) Equal(buf Buffer) Bool
    func (this Buffer) ToBigInt() BigInt
    func (this Buffer) ToBool() Bool
    func (this Buffer) ToFloat32() Float32
    func (this Buffer) ToFloat64() Float64
    func (this Buffer) ToInt16() Int16
    func (this Buffer) ToInt32() Int32
    func (this Buffer) ToInt64() Int64
    func (this Buffer) ToInt8() Int8
    func (this Buffer) ToString() String
    func (this Buffer) ToUInt16() UInt16
    func (this Buffer) ToUInt32() UInt32
    func (this Buffer) ToUInt64() UInt64
    func (this Buffer) ToUInt8() UInt8
type Dict
    func MarshalDict(src interface{}) (Dict, error)
    func NewDict() Dict
    func NewDictFromJson(data Buffer) Dict
    func (this Dict) ContainsKey(key String) bool
    func (this Dict) ContainsKeys(keys List) bool
    func (this Dict) Copy() Dict
    func (this Dict) Equal(other Dict) bool
    func (dict Dict) GetBool(key string) (Bool, bool)
    func (dict Dict) GetDict(key string) (Dict, bool)
    func (dict Dict) GetFloat32(key string) (Float32, bool)
    func (dict Dict) GetFloat64(key string) (Float64, bool)
    func (dict Dict) GetInt16(key string) (Int16, bool)
    func (dict Dict) GetInt32(key string) (Int32, bool)
    func (dict Dict) GetInt64(key string) (Int64, bool)
    func (dict Dict) GetInt8(key string) (Int8, bool)
    func (dict Dict) GetList(key string) (List, bool)
    func (dict Dict) GetString(key string) (String, bool)
    func (dict Dict) GetUInt16(key string) (UInt16, bool)
    func (dict Dict) GetUInt32(key string) (UInt32, bool)
    func (dict Dict) GetUInt64(key string) (UInt64, bool)
    func (dict Dict) GetUInt8(key string) (UInt8, bool)
    func (dict Dict) IsNil(key string) bool
    func (this Dict) Keys() List
    func (this Dict) String() string
    func (this Dict) ToColoredJson() String
    func (this Dict) ToJson() Buffer
    func (this Dict) ToQueryString() url.Values
    func (this Dict) Unmarshal(src interface{}) error
type Float32
    func (this Float32) ToBuffer() Buffer
type Float64
    func (this Float64) ToBuffer() Buffer
type Int16
    func (this Int16) ToBuffer() Buffer
type Int32
    func (this Int32) ToBuffer() Buffer
type Int64
    func (this Int64) ToBuffer() Buffer
type Int8
    func (this Int8) ToBuffer() Buffer
type Item
type List
    func MakeList(count int) List
    func MarshalList(src interface{}) (List, error)
    func NewList() List
    func NewListFromJson(data Buffer) List
    func (this List) Append(item ...Item) List
    func (this List) Copy() List
    func (this List) Equal(other List) bool
    func (list List) GetBool(i int) (Bool, bool)
    func (list List) GetDict(i int) (Dict, bool)
    func (list List) GetFloat32(i int) (Float32, bool)
    func (list List) GetFloat64(i int) (Float64, bool)
    func (list List) GetInt16(i int) (Int16, bool)
    func (list List) GetInt32(i int) (Int32, bool)
    func (list List) GetInt64(i int) (Int64, bool)
    func (list List) GetInt8(i int) (Int8, bool)
    func (list List) GetList(i int) (List, bool)
    func (list List) GetString(i int) (String, bool)
    func (list List) GetUInt16(i int) (UInt16, bool)
    func (list List) GetUInt32(i int) (UInt32, bool)
    func (list List) GetUInt64(i int) (UInt64, bool)
    func (list List) GetUInt8(i int) (UInt8, bool)
    func (list List) IsNil(i int) bool
    func (this List) String() string
    func (this List) ToColoredJson() String
    func (this List) ToJson() Buffer
    func (this List) Unmarshal(src interface{}) error
type String
    func ColoredJSON(data Buffer) String
    func (this String) Decode() Buffer
    func (this String) ToBuffer() Buffer
type UInt16
    func (this UInt16) ToBuffer() Buffer
type UInt32
    func (this UInt32) ToBuffer() Buffer
type UInt64
    func (this UInt64) ToBuffer() Buffer
type UInt8
    func (this UInt8) ToBuffer() Buffer

Package files

Buffer.go JSON.go QueryString.go

type BigInt

type BigInt big.Int

func (BigInt) ToBuffer

func (this BigInt) ToBuffer() Buffer

type Bool

type Bool bool

func (Bool) ToBuffer

func (this Bool) ToBuffer() Buffer

type Buffer

type Buffer []byte

func (Buffer) Encode

func (this Buffer) Encode() String

func (Buffer) Equal

func (this Buffer) Equal(buf Buffer) Bool

func (Buffer) ToBigInt

func (this Buffer) ToBigInt() BigInt

func (Buffer) ToBool

func (this Buffer) ToBool() Bool

func (Buffer) ToFloat32

func (this Buffer) ToFloat32() Float32

func (Buffer) ToFloat64

func (this Buffer) ToFloat64() Float64

func (Buffer) ToInt16

func (this Buffer) ToInt16() Int16

func (Buffer) ToInt32

func (this Buffer) ToInt32() Int32

func (Buffer) ToInt64

func (this Buffer) ToInt64() Int64

func (Buffer) ToInt8

func (this Buffer) ToInt8() Int8

func (Buffer) ToString

func (this Buffer) ToString() String

func (Buffer) ToUInt16

func (this Buffer) ToUInt16() UInt16

func (Buffer) ToUInt32

func (this Buffer) ToUInt32() UInt32

func (Buffer) ToUInt64

func (this Buffer) ToUInt64() UInt64

func (Buffer) ToUInt8

func (this Buffer) ToUInt8() UInt8

type Dict

type Dict map[string]Item

func MarshalDict

func MarshalDict(src interface{}) (Dict, error)

func NewDict

func NewDict() Dict

func NewDictFromJson

func NewDictFromJson(data Buffer) Dict

func (Dict) ContainsKey

func (this Dict) ContainsKey(key String) bool

func (Dict) ContainsKeys

func (this Dict) ContainsKeys(keys List) bool

func (Dict) Copy

func (this Dict) Copy() Dict

func (Dict) Equal

func (this Dict) Equal(other Dict) bool

func (Dict) GetBool

func (dict Dict) GetBool(key string) (Bool, bool)

func (Dict) GetDict

func (dict Dict) GetDict(key string) (Dict, bool)

func (Dict) GetFloat32

func (dict Dict) GetFloat32(key string) (Float32, bool)

func (Dict) GetFloat64

func (dict Dict) GetFloat64(key string) (Float64, bool)

func (Dict) GetInt16

func (dict Dict) GetInt16(key string) (Int16, bool)

func (Dict) GetInt32

func (dict Dict) GetInt32(key string) (Int32, bool)

func (Dict) GetInt64

func (dict Dict) GetInt64(key string) (Int64, bool)

func (Dict) GetInt8

func (dict Dict) GetInt8(key string) (Int8, bool)

func (Dict) GetList

func (dict Dict) GetList(key string) (List, bool)

func (Dict) GetString

func (dict Dict) GetString(key string) (String, bool)

func (Dict) GetUInt16

func (dict Dict) GetUInt16(key string) (UInt16, bool)

func (Dict) GetUInt32

func (dict Dict) GetUInt32(key string) (UInt32, bool)

func (Dict) GetUInt64

func (dict Dict) GetUInt64(key string) (UInt64, bool)

func (Dict) GetUInt8

func (dict Dict) GetUInt8(key string) (UInt8, bool)

func (Dict) IsNil

func (dict Dict) IsNil(key string) bool

func (Dict) Keys

func (this Dict) Keys() List

func (Dict) String

func (this Dict) String() string

func (Dict) ToColoredJson

func (this Dict) ToColoredJson() String

func (Dict) ToJson

func (this Dict) ToJson() Buffer

func (Dict) ToQueryString

func (this Dict) ToQueryString() url.Values

ToQueryString converts the Dict to a URL query string.

Example:

dict := hctypes.Dict{
  "key1": "value1",
  "key2": 42,
}

dict.ToQueryString().Encode()
// output: "key1=value1&key2=42"

No parameters. Returns url.Values.

func (Dict) Unmarshal

func (this Dict) Unmarshal(src interface{}) error

type Float32

type Float32 float32

func (Float32) ToBuffer

func (this Float32) ToBuffer() Buffer

type Float64

type Float64 float64

func (Float64) ToBuffer

func (this Float64) ToBuffer() Buffer

type Int16

type Int16 int16

func (Int16) ToBuffer

func (this Int16) ToBuffer() Buffer

type Int32

type Int32 int32

func (Int32) ToBuffer

func (this Int32) ToBuffer() Buffer

type Int64

type Int64 int64

func (Int64) ToBuffer

func (this Int64) ToBuffer() Buffer

type Int8

type Int8 int8

func (Int8) ToBuffer

func (this Int8) ToBuffer() Buffer

type Item

type Item interface{}

type List

type List []Item

func MakeList

func MakeList(count int) List

func MarshalList

func MarshalList(src interface{}) (List, error)

func NewList

func NewList() List

func NewListFromJson

func NewListFromJson(data Buffer) List

func (List) Append

func (this List) Append(item ...Item) List

func (List) Copy

func (this List) Copy() List

func (List) Equal

func (this List) Equal(other List) bool

func (List) GetBool

func (list List) GetBool(i int) (Bool, bool)

func (List) GetDict

func (list List) GetDict(i int) (Dict, bool)

func (List) GetFloat32

func (list List) GetFloat32(i int) (Float32, bool)

func (List) GetFloat64

func (list List) GetFloat64(i int) (Float64, bool)

func (List) GetInt16

func (list List) GetInt16(i int) (Int16, bool)

func (List) GetInt32

func (list List) GetInt32(i int) (Int32, bool)

func (List) GetInt64

func (list List) GetInt64(i int) (Int64, bool)

func (List) GetInt8

func (list List) GetInt8(i int) (Int8, bool)

func (List) GetList

func (list List) GetList(i int) (List, bool)

func (List) GetString

func (list List) GetString(i int) (String, bool)

func (List) GetUInt16

func (list List) GetUInt16(i int) (UInt16, bool)

func (List) GetUInt32

func (list List) GetUInt32(i int) (UInt32, bool)

func (List) GetUInt64

func (list List) GetUInt64(i int) (UInt64, bool)

func (List) GetUInt8

func (list List) GetUInt8(i int) (UInt8, bool)

func (List) IsNil

func (list List) IsNil(i int) bool

func (List) String

func (this List) String() string

func (List) ToColoredJson

func (this List) ToColoredJson() String

func (List) ToJson

func (this List) ToJson() Buffer

func (List) Unmarshal

func (this List) Unmarshal(src interface{}) error

type String

type String string

func ColoredJSON

func ColoredJSON(data Buffer) String

func (String) Decode

func (this String) Decode() Buffer

func (String) ToBuffer

func (this String) ToBuffer() Buffer

type UInt16

type UInt16 uint16

func (UInt16) ToBuffer

func (this UInt16) ToBuffer() Buffer

type UInt32

type UInt32 uint32

func (UInt32) ToBuffer

func (this UInt32) ToBuffer() Buffer

type UInt64

type UInt64 uint64

func (UInt64) ToBuffer

func (this UInt64) ToBuffer() Buffer

type UInt8

type UInt8 uint8

func (UInt8) ToBuffer

func (this UInt8) ToBuffer() Buffer