Documentation ¶
Index ¶
- Variables
- func AnyToHash(h hash.Hash64, v any) error
- func AnyToIndex(v any) (uint64, error)
- func BooleanToIndex(b bool) uint64
- func BytesToIndex(bs []byte) (uint64, error)
- func DoubleToIndex(v float64) uint64
- func FloatToIndex(v float32) uint64
- func IntegerToIndex[T Integer](v T) uint64
- func ListEqual[T any](a, b []T, fun func(a, b T) bool) bool
- func ListToHash[T any](h hash.Hash64, l []T) error
- func ListToIndex[T any](l []T) (uint64, error)
- func LoadTableFromBinaryData(tab proto.Message, data []byte) error
- func LoadTableFromBinaryFile(tab proto.Message, path string) error
- func LoadTableFromJsonData(tab proto.Message, data []byte) error
- func LoadTableFromJsonFile(tab proto.Message, path string) error
- func MapEqual[K cmp.Ordered, V any](a, b map[K]V, fun func(a, b V) bool) bool
- func MapToHash[K cmp.Ordered, V any](h hash.Hash64, m map[K]V) error
- func MapToIndex[K cmp.Ordered, V any](m map[K]V) (uint64, error)
- func ProtoMessageFieldNeedHashIndex(field protoreflect.FieldDescriptor) bool
- func ProtoMessageFieldToIndex(msg protoreflect.Message, field protoreflect.FieldDescriptor) (uint64, error)
- func StringToIndex(s string) (uint64, error)
- type Integer
Constants ¶
This section is empty.
Variables ¶
View Source
var (
NewHash = fnv.New64a
)
Functions ¶
func AnyToIndex ¶
func BooleanToIndex ¶
func BytesToIndex ¶
func DoubleToIndex ¶
func FloatToIndex ¶
func IntegerToIndex ¶
func ListToIndex ¶
func LoadTableFromBinaryData ¶ added in v0.1.1
func LoadTableFromBinaryFile ¶ added in v0.1.1
func LoadTableFromJsonData ¶ added in v0.1.1
func LoadTableFromJsonFile ¶ added in v0.1.1
func ProtoMessageFieldNeedHashIndex ¶
func ProtoMessageFieldNeedHashIndex(field protoreflect.FieldDescriptor) bool
func ProtoMessageFieldToIndex ¶
func ProtoMessageFieldToIndex(msg protoreflect.Message, field protoreflect.FieldDescriptor) (uint64, error)
func StringToIndex ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.