hasher

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Type reflect.Type
	Err  error
}

Error represents an error from calling a Hash method.

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

Unwrap returns the underlying error.

type Hasher

type Hasher interface {
	Hash(any) (string, error)
}

Hasher is the interface implemented by types that can hash any value into string.

type MsgpackHasher

type MsgpackHasher struct{}

MsgpackHasher is a default hasher that uses msgpack marshaling and hashing algorithm for create a hash of value.

func (*MsgpackHasher) Hash

func (*MsgpackHasher) Hash(v any) (string, error)

Hash creates a hash string of any value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL