Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewString ¶
func NewString() string
NewString returns an ULID as a string, with the current time. It is safe for concurrent use
func NewStringWithTime ¶
NewStringWithTime returns an ULID as a string, with the given time. Panic on failure.
func SecureEntropy ¶
SecureEntropy returns a thread-safe per process monotonically increasing secure entropy source
Types ¶
type Service ¶
type Service interface {
// NewString returns an ULID as a string, with the current time. Panic on failure.
NewString() string
// NewStringWithTime returns an ULID as a string, with the given time. Panic on failure.
NewStringWithTime(t time.Time) string
// New returns an ULID with the current time
New() (ULID, error)
// MustNew returns an ULID with the current time. Panic on failure.
MustNew() ULID
// NewWithTime returns an ULID with given time
NewWithTime(t time.Time) (ULID, error)
// MustNewWithTime returns an ULID with given time. Panic on failure.
MustNewWithTime(t time.Time) ULID
}
Service represents the interface for the ULID utils
func NewService ¶
func NewService() Service
NewService returns ULID service with some handy functions
Click to show internal directories.
Click to hide internal directories.