Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UUIDSource ¶
type UUIDSource struct {
// contains filtered or unexported fields
}
UUIDSource represents a UUIDv7 generator. Subsequent UUIDs generated by the same UUIDSource are guaranteed to be ordered (esp. time-ordered). Most likely you need one UUIDSource per application. UUIDSource is thread-safe.
func NewUUIDSource ¶
func NewUUIDSource() *UUIDSource
NewUUIDSource initializes and returns a new UUIDSource which is ready to use.
func (*UUIDSource) NewAsV4 ¶
func (u *UUIDSource) NewAsV4() UUIDv7
NewAsV4 returns a new UUIDv7 with the version bits set to 0x4 for systems expecting only valid UUIDv4.
type UUIDv7 ¶
type UUIDv7 []byte
UUIDv7 represents a UUID version 7 as defined in the RFC4122. See: <https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis#name-uuid-version-7>.
Click to show internal directories.
Click to hide internal directories.