Versions in this module Expand all Collapse all v1 v1.0.0 Jan 25, 2022 Changes in this version + const VariantFuture + const VariantMicrosoft + const VariantNCS + const VariantRFC4122 + func Compare(pId, pId2 Implementation) int + func Equal(p1, p2 Implementation) bool + func Formatter(id Implementation, form Format) string + func IsNil(uuid Implementation) bool + func ReadV1(ids []UUID) + func ReadV4(ids []UUID) + func RegisterGenerator(config *GeneratorConfig) (err error) + func RegisterSaver(saver Saver) (err error) + func SwitchFormat(form Format) + func SwitchFormatToUpper(form Format) + type Format string + const FormatCanonical + const FormatCanonicalBracket + const FormatCanonicalCurly + const FormatHex + const FormatHexBracket + const FormatHexCurly + const FormatUrn + type Generator struct + func NewGenerator(config *GeneratorConfig) (*Generator, error) + func (o *Generator) BulkV1(amount int) []UUID + func (o *Generator) BulkV4(amount int) []UUID + func (o *Generator) NewHash(hash hash.Hash, names ...interface{}) UUID + func (o *Generator) NewV1() UUID + func (o *Generator) NewV2(idType SystemId) UUID + func (o *Generator) NewV3(namespace Implementation, names ...interface{}) UUID + func (o *Generator) NewV4() (id UUID) + func (o *Generator) NewV5(namespace Implementation, names ...interface{}) UUID + func (o *Generator) ReadV1(ids []UUID) + func (o *Generator) ReadV4(ids []UUID) + type GeneratorConfig struct + Resolution uint + type HandleRandomError func([]byte, int, error) error + type Identifier func() Node + type Immutable string + const NameSpaceDNS + const NameSpaceOID + const NameSpaceURL + const NameSpaceX500 + const Nil + func (o Immutable) Bytes() []byte + func (o Immutable) Size() int + func (o Immutable) String() string + func (o Immutable) UUID() UUID + func (o Immutable) Variant() uint8 + func (o Immutable) Version() Version + type Implementation interface + Bytes func() []byte + Size func() int + String func() string + Variant func() uint8 + Version func() Version + type Next func() Timestamp + type Node []byte + type Random func([]byte) (int, error) + type Saver interface + Init func() Saver + Read func() (Store, error) + Save func(Store) + type Sequence uint16 + type Store struct + func (o Store) String() string + type SystemId uint8 + const SystemIdCallerProcess + const SystemIdCallerProcessParent + const SystemIdEffectiveGroup + const SystemIdEffectiveUser + const SystemIdGroup + const SystemIdUser + type Timestamp uint64 + func Now() Timestamp + func (o Timestamp) Add(duration time.Duration) Timestamp + func (o Timestamp) String() string + func (o Timestamp) Sub(duration time.Duration) Timestamp + func (o Timestamp) Time() time.Time + type UUID [length]byte + func BulkV1(amount int) []UUID + func BulkV4(amount int) []UUID + func New(data []byte) UUID + func NewHash(hash hash.Hash, names ...interface{}) UUID + func NewHex(uuid string) UUID + func NewV1() UUID + func NewV2(pDomain SystemId) UUID + func NewV3(namespace Implementation, names ...interface{}) UUID + func NewV4() UUID + func NewV5(namespace Implementation, names ...interface{}) UUID + func Parse(uuid string) (*UUID, error) + func (o *UUID) Scan(src interface{}) error + func (o *UUID) UnmarshalBinary(bytes []byte) error + func (o *UUID) UnmarshalText(uuid []byte) error + func (o UUID) Bytes() []byte + func (o UUID) MarshalBinary() ([]byte, error) + func (o UUID) MarshalText() ([]byte, error) + func (o UUID) Size() int + func (o UUID) String() string + func (o UUID) Value() (value driver.Value, err error) + func (o UUID) Variant() uint8 + func (o UUID) Version() Version + type Version int + const VersionFive + const VersionFour + const VersionOne + const VersionThree + const VersionTwo + const VersionUnknown + func (o Version) String() string