idutil

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more 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