idgen

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gen

func Gen(prefix string) string

func GenAdminToken added in v0.3.1

func GenAdminToken() string

GenAdminToken generates a cryptographically secure admin token. Uses 32 bytes of randomness encoded as base58 for URL-safe, compact representation.

func GenNS

func GenNS(ns string) string

func IsULID added in v0.16.0

func IsULID(s string) bool

IsULID reports whether s is a ULID as ULID would mint one.

func ULID added in v0.16.0

func ULID() string

ULID mints a 26-character Crockford base32 ULID. Unlike Gen's base58 output, ULIDs sort by creation time as plain strings, so they suit names that a directory listing or a key range has to return in order. Within a process the order is strict; across restarts it is millisecond-granular.

Types

This section is empty.

Jump to

Keyboard shortcuts

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