hashid

package
v0.0.0-...-2ba808a Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitIDHasher

func InitIDHasher(minLength int, salt string) error

InitIDHasher initials an ID hasher

Types

type IDHasher

type IDHasher interface {
	Encode(id uint32) string
	EncodeUint64(id uint64) string
	Decode(hashed string) (uint32, error)
	DecodeUint64(hashed string) (uint64, error)
}

func GetIDHasher

func GetIDHasher() IDHasher

GetIDHasher Get returns the singleton instance of ID hasher

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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