idutil

package
v0.0.0-...-157c77b Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package idutil is a tool set used to generate multiple id string.

Index

Constants

View Source
const (
	Alphabet62 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
	Alphabet36 = "abcdefghijklmnopqrstuvwxyz1234567890"
)

Defiens alphabet.

Variables

This section is empty.

Functions

func GetInstanceID

func GetInstanceID(uid uint64, prefix string) string

GetInstanceID returns id format like: secret-2v69o5

func GetIntID

func GetIntID() uint64

GetIntID returns uint64 uniq id.

func GetUUID36

func GetUUID36(prefix string) string

GetUUID36 returns id format like: 300m50zn91nwz5.

func NewSecretID

func NewSecretID() string

NewSecretID returns a secretID.

func NewSecretKey

func NewSecretKey() string

NewSecretKey returns a secretKey or password.

Types

This section is empty.

Jump to

Keyboard shortcuts

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