id

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRandomULID

func NewRandomULID() (string, error)

NewRandomULID returns a new ULID string using a random time in an ~80 year range around the current datetime, or an error if something goes wrong.

func NewULID

func NewULID() (string, error)

NewULID returns a new ULID string using the current time, or an error if something goes wrong.

func NewULIDFromTime

func NewULIDFromTime(t time.Time) (string, error)

NewULIDFromTime returns a new ULID string using the given time, or an error if something goes wrong.

Types

type ULID

type ULID string

ULID represents a Universally Unique Lexicographically Sortable Identifier of 26 characters. See https://github.com/oklog/ulid

Jump to

Keyboard shortcuts

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