Documentation ¶
Overview ¶
Package ulidgen generates ULIDs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator generates a ULID.
func NewGenerator ¶
NewGenerator returns a new ULID generator.
type Option ¶ added in v0.3.0
type Option interface {
// contains filtered or unexported methods
}
Option configures a Generator using the functional options paradigm popularized by Rob Pike and Dave Cheney. If you're unfamiliar with this style, see https://commandcenter.blogspot.com/2014/01/self-referential-functions-and-design.html and https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis.
func EntropySource ¶ added in v0.3.0
EntropySource configures an entropy source of a generator.
func TimeSource ¶ added in v0.3.0
TimeSource configures a time source of a generator.
Click to show internal directories.
Click to hide internal directories.