Help us shape the future of Go! Take the 2026 Go Developer Survey

ids

package
v0.1.0-alpha.3 Latest Latest
Warning

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

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

Documentation

Overview

Package ids generates and checks entity ids (ULIDs).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Valid

func Valid(id model.ID) bool

Valid reports whether id is a canonical upper-case ULID.

Types

type Source

type Source struct {
	// contains filtered or unexported fields
}

Source generates monotonically increasing ULIDs. It is safe for concurrent use.

func NewSource

func NewSource(now func() time.Time, entropy io.Reader) *Source

NewSource returns a Source reading time from now and randomness from entropy.

func (*Source) New

func (s *Source) New() model.ID

New returns a fresh id.

Jump to

Keyboard shortcuts

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