Documentation ¶
Index ¶
- func Compare(a, b Sortable) int
- type BinaryString
- type Bool
- func (v Bool) Compare(b Sortable) int
- func (v Bool) MarshalBinary() ([]byte, error)
- func (v Bool) MarshalSortable() ([]byte, error)
- func (v Bool) Native() interface{}
- func (v *Bool) NativePtr() interface{}
- func (v *Bool) Primitive() Primitive
- func (Bool) PrimitiveType() PrimitiveType
- func (v *Bool) Sortable() Sortable
- func (Bool) SortableType() SortableType
- func (Bool) Type() Type
- func (v *Bool) UnmarshalBinary(p []byte) error
- func (v *Bool) UnmarshalSortable(p []byte) error
- func (v *Bool) Value() Value
- type BoolType
- type Bytes
- func (v Bytes) Compare(b Sortable) int
- func (v Bytes) MarshalBinary() ([]byte, error)
- func (v Bytes) MarshalSortable() ([]byte, error)
- func (v Bytes) Native() interface{}
- func (v *Bytes) NativePtr() interface{}
- func (v Bytes) PrefixEnd() BinaryString
- func (v *Bytes) Primitive() Primitive
- func (Bytes) PrimitiveType() PrimitiveType
- func (v *Bytes) Sortable() Sortable
- func (Bytes) SortableType() SortableType
- func (Bytes) Type() Type
- func (v *Bytes) UnmarshalBinary(p []byte) error
- func (v *Bytes) UnmarshalSortable(p []byte) error
- func (v *Bytes) Value() Value
- type BytesType
- type Float
- func (v Float) MarshalBinary() ([]byte, error)
- func (v Float) Native() interface{}
- func (v *Float) NativePtr() interface{}
- func (v *Float) Primitive() Primitive
- func (Float) PrimitiveType() PrimitiveType
- func (Float) Type() Type
- func (v *Float) UnmarshalBinary(p []byte) error
- func (v *Float) Value() Value
- type FloatType
- type Int
- func (v Int) Compare(b Sortable) int
- func (v Int) MarshalBinary() ([]byte, error)
- func (v Int) MarshalSortable() ([]byte, error)
- func (v Int) Native() interface{}
- func (v *Int) NativePtr() interface{}
- func (v *Int) Primitive() Primitive
- func (Int) PrimitiveType() PrimitiveType
- func (v *Int) Sortable() Sortable
- func (Int) SortableType() SortableType
- func (Int) Type() Type
- func (v *Int) UnmarshalBinary(p []byte) error
- func (v *Int) UnmarshalSortable(p []byte) error
- func (v *Int) Value() Value
- type IntType
- type Primitive
- type PrimitiveDest
- type PrimitiveType
- type Sortable
- type SortableDest
- type SortableType
- type String
- func (v String) Compare(b Sortable) int
- func (v String) MarshalBinary() ([]byte, error)
- func (v String) MarshalSortable() ([]byte, error)
- func (v String) Native() interface{}
- func (v *String) NativePtr() interface{}
- func (v String) PrefixEnd() BinaryString
- func (v *String) Primitive() Primitive
- func (String) PrimitiveType() PrimitiveType
- func (v *String) Sortable() Sortable
- func (String) SortableType() SortableType
- func (String) Type() Type
- func (v *String) UnmarshalBinary(p []byte) error
- func (v *String) UnmarshalSortable(p []byte) error
- func (v *String) Value() Value
- type StringType
- type Time
- func (v Time) Compare(b Sortable) int
- func (v Time) MarshalBinary() ([]byte, error)
- func (v Time) MarshalSortable() ([]byte, error)
- func (v Time) Native() interface{}
- func (v *Time) NativePtr() interface{}
- func (v *Time) Sortable() Sortable
- func (Time) SortableType() SortableType
- func (v Time) String() string
- func (Time) Type() Type
- func (v *Time) UnmarshalBinary(p []byte) error
- func (v *Time) UnmarshalSortable(p []byte) error
- func (v *Time) Value() Value
- type TimeType
- type Type
- type UInt
- func (v UInt) Compare(b Sortable) int
- func (v UInt) MarshalBinary() ([]byte, error)
- func (v UInt) MarshalSortable() ([]byte, error)
- func (v UInt) Native() interface{}
- func (v *UInt) NativePtr() interface{}
- func (v *UInt) Primitive() Primitive
- func (UInt) PrimitiveType() PrimitiveType
- func (v *UInt) Sortable() Sortable
- func (UInt) SortableType() SortableType
- func (UInt) Type() Type
- func (v *UInt) UnmarshalBinary(p []byte) error
- func (v *UInt) UnmarshalSortable(p []byte) error
- func (v *UInt) Value() Value
- type UIntType
- type Value
- type ValueDest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BinaryString ¶
type BinaryString interface { Sortable // PrefixEnd returns the next binary key that ends this prefix. PrefixEnd() BinaryString }
type Bool ¶
type Bool bool
func (Bool) MarshalBinary ¶
func (Bool) MarshalSortable ¶
func (Bool) PrimitiveType ¶
func (Bool) PrimitiveType() PrimitiveType
func (Bool) SortableType ¶
func (Bool) SortableType() SortableType
func (*Bool) UnmarshalBinary ¶
func (*Bool) UnmarshalSortable ¶
type BoolType ¶
type BoolType struct{}
func (BoolType) NewPrimitive ¶
func (BoolType) NewPrimitive() PrimitiveDest
func (BoolType) NewSortable ¶
func (BoolType) NewSortable() SortableDest
type Bytes ¶
type Bytes []byte
func (Bytes) MarshalBinary ¶
func (Bytes) MarshalSortable ¶
func (Bytes) PrefixEnd ¶
func (v Bytes) PrefixEnd() BinaryString
PrefixEnd returns the next binary key that ends the prefix.
func (Bytes) PrimitiveType ¶
func (Bytes) PrimitiveType() PrimitiveType
func (Bytes) SortableType ¶
func (Bytes) SortableType() SortableType
func (*Bytes) UnmarshalBinary ¶
func (*Bytes) UnmarshalSortable ¶
type BytesType ¶
type BytesType struct{}
func (BytesType) NewPrimitive ¶
func (BytesType) NewPrimitive() PrimitiveDest
func (BytesType) NewSortable ¶
func (BytesType) NewSortable() SortableDest
type Float ¶
type Float float64
func (Float) MarshalBinary ¶
func (Float) PrimitiveType ¶
func (Float) PrimitiveType() PrimitiveType
func (*Float) UnmarshalBinary ¶
type FloatType ¶
type FloatType struct{}
func (FloatType) NewPrimitive ¶
func (FloatType) NewPrimitive() PrimitiveDest
type Int ¶
type Int int64
func (Int) MarshalBinary ¶
func (Int) MarshalSortable ¶
func (Int) PrimitiveType ¶
func (Int) PrimitiveType() PrimitiveType
func (Int) SortableType ¶
func (Int) SortableType() SortableType
func (*Int) UnmarshalBinary ¶
func (*Int) UnmarshalSortable ¶
type IntType ¶
type IntType struct{}
func (IntType) NewPrimitive ¶
func (IntType) NewPrimitive() PrimitiveDest
func (IntType) NewSortable ¶
func (IntType) NewSortable() SortableDest
type Primitive ¶
type Primitive interface { Value // PrimitiveType returns a type associated with this value. PrimitiveType() PrimitiveType // contains filtered or unexported methods }
Primitive is a private interface implemented only by following types:
- String
- Bytes
- Int
- UInt
- Float
- Bool
type PrimitiveDest ¶
type PrimitiveType ¶
type PrimitiveType interface { Type // NewPrimitive creates a new zero value of this type. NewPrimitive() PrimitiveDest }
type Sortable ¶
type Sortable interface { Value // Compare returns 0 if x == v, -1 if x < v and +1 if x > v Compare(v Sortable) int // SortableType returns a type associated with this value. SortableType() SortableType // MarshalSortable encodes the value into sortable encoding: v1 < v2, marshal(v1) < marshal(v2). MarshalSortable() ([]byte, error) }
Sortable is an extension of Value interface that allows to use it in building low-level indexes.
type SortableDest ¶
type SortableType ¶
type SortableType interface { Type // NewSortable creates a new zero value of this type. NewSortable() SortableDest }
type String ¶
type String string
func (String) MarshalBinary ¶
func (String) MarshalSortable ¶
func (String) PrefixEnd ¶
func (v String) PrefixEnd() BinaryString
PrefixEnd returns the next binary key that ends the prefix.
func (String) PrimitiveType ¶
func (String) PrimitiveType() PrimitiveType
func (String) SortableType ¶
func (String) SortableType() SortableType
func (*String) UnmarshalBinary ¶
func (*String) UnmarshalSortable ¶
type StringType ¶
type StringType struct{}
func (StringType) New ¶
func (tp StringType) New() ValueDest
func (StringType) NewPrimitive ¶
func (StringType) NewPrimitive() PrimitiveDest
func (StringType) NewSortable ¶
func (StringType) NewSortable() SortableDest
type Time ¶
func (Time) MarshalBinary ¶
func (Time) MarshalSortable ¶
func (Time) SortableType ¶
func (Time) SortableType() SortableType
func (*Time) UnmarshalBinary ¶
func (*Time) UnmarshalSortable ¶
type TimeType ¶
type TimeType struct{}
func (TimeType) NewSortable ¶
func (TimeType) NewSortable() SortableDest
type UInt ¶
type UInt uint64
func (UInt) MarshalBinary ¶
func (UInt) MarshalSortable ¶
func (UInt) PrimitiveType ¶
func (UInt) PrimitiveType() PrimitiveType
func (UInt) SortableType ¶
func (UInt) SortableType() SortableType
func (*UInt) UnmarshalBinary ¶
func (*UInt) UnmarshalSortable ¶
type UIntType ¶
type UIntType struct{}
func (UIntType) NewPrimitive ¶
func (UIntType) NewPrimitive() PrimitiveDest
func (UIntType) NewSortable ¶
func (UIntType) NewSortable() SortableDest
type Value ¶
type Value interface { // Native returns a native Go value represented by this type. Native() interface{} // Type returns a type associated with this value. Type() Type // Marshal implementations should not include the length of the value. encoding.BinaryMarshaler }
type ValueDest ¶
type ValueDest interface { Value() Value NativePtr() interface{} encoding.BinaryUnmarshaler }
Click to show internal directories.
Click to hide internal directories.