ulidutils

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ZeroULID   = ulid.ULID{}
	MaxULID, _ = ulid.Parse("7ZZZZZZZZZZZZZZZZZZZZZZZZZ")
)

Functions

func New

func New() ulid.ULID

New returns new ulid.ULID.

func NewID

func NewID() string

NewID returns new ulid.ULID in string format. The returned ID can be compared to any other result returned by the function. An ID returned earlier is less lexicographically to the ID returned after the first one.

func NewUUID

func NewUUID() uuid.UUID

NewUUID returns new ulid.ULID converted to uuid.UUID.

func NextID

func NextID(ulidID string) string

NextID returns theoretical next ulid, which may follow by the ulidID. The returned value may be used for search records that with IDs followed by ulidID

The value must never be used for generating new ID. Use NewID() instead

func PrevID

func PrevID(ulidID string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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