Documentation ¶
Index ¶
- func FromBoolArray(s BoolArray) []bool
- func FromDataArray(s DataArray) [][]byte
- func FromDigestArray(s DigestArray) [][]byte
- func FromFloatArray(s FloatArray) []float64
- func FromIntArray(s IntArray) []int64
- func FromStringArray(s StringArray) []string
- func FromUintArray(s UintArray) []uint64
- type ArrayValue
- type Bool
- type BoolArray
- type Data
- type DataArray
- type Digest
- type DigestArray
- type Float
- type FloatArray
- type Hint
- type Int
- type IntArray
- type Map
- type MapArray
- type Slice
- type String
- type StringArray
- type Uint
- type UintArray
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromBoolArray ¶
func FromDataArray ¶
func FromDigestArray ¶
func FromDigestArray(s DigestArray) [][]byte
func FromFloatArray ¶
func FromFloatArray(s FloatArray) []float64
func FromIntArray ¶
func FromStringArray ¶
func FromStringArray(s StringArray) []string
func FromUintArray ¶
Types ¶
type ArrayValue ¶
type ArrayValue interface { Value Len() int Range(func(int, Value) (stop bool)) // contains filtered or unexported methods }
TODO switch Range's stop?
type Digest ¶
type Digest string
Note(geoah): Digest should probably have been bytes, but it has been defined as a string simply cause comparing bytes in go is annoying.
const (
EmptyDigest Digest = ""
)
func SortDigests ¶
SortDigests sorts a slice of Digestes in increasing order, and returns it. The return part is mostly for allowing this to be used as a helper method in tests.
type DigestArray ¶
type DigestArray []Digest
func ToDigestArray ¶
func ToDigestArray(s [][]byte) DigestArray
func (DigestArray) Hash ¶
func (v DigestArray) Hash() Digest
func (DigestArray) Hint ¶
func (v DigestArray) Hint() Hint
func (DigestArray) Len ¶
func (v DigestArray) Len() int
type FloatArray ¶
type FloatArray []Float
func ToFloatArray ¶
func ToFloatArray(s []float64) FloatArray
func (FloatArray) Hash ¶
func (v FloatArray) Hash() Digest
func (FloatArray) Hint ¶
func (v FloatArray) Hint() Hint
func (FloatArray) Len ¶
func (v FloatArray) Len() int
type Hint ¶
type Hint string
const ( // basic hints BoolHint Hint = "b" DataHint Hint = "d" FloatHint Hint = "f" IntHint Hint = "i" MapHint Hint = "m" StringHint Hint = "s" UintHint Hint = "u" DigestHint Hint = "r" // array hints BoolArrayHint Hint = "ab" DataArrayHint Hint = "ad" FloatArrayHint Hint = "af" IntArrayHint Hint = "ai" MapArrayHint Hint = "am" ObjectArrayHint Hint = "ao" StringArrayHint Hint = "as" UintArrayHint Hint = "au" DigestArrayHint Hint = "ar" )
type StringArray ¶
type StringArray []String
func ToStringArray ¶
func ToStringArray(s []string) StringArray
func (StringArray) Hash ¶
func (v StringArray) Hash() Digest
func (StringArray) Hint ¶
func (v StringArray) Hint() Hint
func (StringArray) Len ¶
func (v StringArray) Len() int
Source Files ¶
- hash.go
- hint.go
- utils.go
- value.go
- value_bool.go
- value_bool_array.go
- value_data.go
- value_data_array.go
- value_float.go
- value_float_array.go
- value_hash.go
- value_hash_array.go
- value_int.go
- value_int_array.go
- value_map.go
- value_map_array.go
- value_string.go
- value_string_array.go
- value_uint.go
- value_uint_array.go
Click to show internal directories.
Click to hide internal directories.