encoding

package
v0.0.0-...-87faeab Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(id string) (uuid.UUID, error)

Decode decodes a base64 string to a raw uuid.

func Encode

func Encode(id uuid.UUID) string

Encode encodes the uuid to a base64 string that is url-safe.

func GenHexKey

func GenHexKey(len int) string

GenHexKey generates a crypto-random key with byte length len and hex-encodes it to a string.

func GenUniqueID

func GenUniqueID() uuid.UUID

GenUniqueID returns a random but unique id.

func GenUniqueParam

func GenUniqueParam(alphanumeric string, len int) (string, error)

GenUniqueParam returns a random param but unique key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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