secretid

package
v0.0.0-...-64046f9 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(long bool) string

func IsLong

func IsLong(id string) bool

Types

type HashIDs

type HashIDs struct {
	// contains filtered or unexported fields
}

func NewHashIDs

func NewHashIDs(salt string) (*HashIDs, error)

func (*HashIDs) Decode

func (hids *HashIDs) Decode(hash string) (int, error)

func (*HashIDs) Encode

func (hids *HashIDs) Encode(id int) string

type SecretID

type SecretID interface {
	Encode(id int) string
	Decode(hash string) (int, error)
}

Jump to

Keyboard shortcuts

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