ulid

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const Alphabet = "0123456789ABCDEFGHJKMNPQRSTVWXYZ"

Alphabet is the Crockford base32 alphabet used by ULID.

Variables

This section is empty.

Functions

func Decode

func Decode(id string) ([16]byte, error)

Decode parses a 26-char ULID string into its 16 raw bytes.

func New

func New(ms uint64) (string, error)

New generates a ULID for the given millisecond timestamp with random entropy.

func NewWithEntropy

func NewWithEntropy(ms uint64, entropy []byte) (string, error)

NewWithEntropy generates a ULID deterministically from ms and 10-byte entropy.

func Timestamp

func Timestamp(id string) (uint64, error)

Timestamp decodes the millisecond timestamp encoded in a ULID string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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