Documentation ¶
Index ¶
- Constants
- func ReuseSequenceHasher(v *Sequence)
- type Hasher
- type Sequence
- type Value
- func BigInt(c *big.Int) Value
- func BigIntSlice(S []*big.Int) Value
- func BigRat(c *big.Rat) Value
- func BigRatSlice(S []*big.Rat) Value
- func Bool(b bool) Value
- func BoolSlice(S []bool) Value
- func Byte(b byte) Value
- func ByteSlice(S []byte) Value
- func Float32(f float32) Value
- func Float32Slice(S []float32) Value
- func Float64(f float64) Value
- func Float64Slice(S []float64) Value
- func HashSlice(S []Hasher) Value
- func Int(c int) Value
- func Int16(c int16) Value
- func Int16Slice(S []int16) Value
- func Int32(c int32) Value
- func Int32Slice(S []int32) Value
- func Int64(c int64) Value
- func Int64Slice(S []int64) Value
- func Int8(c int8) Value
- func Int8Slice(S []int8) Value
- func IntSlice(S []int) Value
- func Slice(S []Value) Value
- func String(s string) Value
- func StringSlice(S []string) Value
- func Uint(c uint) Value
- func Uint16(c uint16) Value
- func Uint16Slice(S []uint16) Value
- func Uint32(c uint32) Value
- func Uint32Slice(S []uint32) Value
- func Uint64(c uint64) Value
- func Uint64Slice(S []uint64) Value
- func Uint8(c uint8) Value
- func Uint8Slice(S []uint8) Value
- func UintSlice(S []uint) Value
Constants ¶
const Max = math.MaxUint32
Max defines the maximum size of a hash value.
Variables ¶
This section is empty.
Functions ¶
func ReuseSequenceHasher ¶
func ReuseSequenceHasher(v *Sequence)
ReuseSequenceHasher returns the given sequential hash object to a pool ready for reuse by subsequent calls to NewSequenceHasher.
Types ¶
type Hasher ¶
type Hasher interface {
Hash() Value // Hash returns a hash value for the object.
}
Hasher is the interface hashable objects should satisfy.
type Sequence ¶
type Sequence struct {
// contains filtered or unexported fields
}
Sequence is a object allowing the cumulative hash value of a sequence of objects satisfying the Hasher interface to be calculated.
func NewSequenceHasher ¶
func NewSequenceHasher() *Sequence
NewSequenceHasher returns a new sequential hash object. Once finished with this object, consider returning it to the pool for reuse.
type Value ¶
type Value uint32
Value is a hash value.
func BigIntSlice ¶
BigIntSlice returns the hash of the given slice.
func BigRatSlice ¶
BigRatSlice returns the hash of the given slice.
func Float32Slice ¶
Float32Slice returns the hash of the given slice.
func Float64Slice ¶
Float64Slice returns the hash of the given slice.
func StringSlice ¶
StringSlice returns the hash of the given slice.
func Uint16Slice ¶
Uint16Slice returns the hash of the given slice.
func Uint32Slice ¶
Uint32Slice returns the hash of the given slice.
func Uint64Slice ¶
Uint64Slice returns the hash of the given slice.