Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultAlphabet = "23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
DefaultAlphabet is the default alphabet used.
Variables ¶
View Source
var ( NameSpaceDNS = uuid.Must(uuid.FromString("6ba7b810-9dad-11d1-80b4-00c04fd430c8")) NameSpaceURL = uuid.Must(uuid.FromString("6ba7b811-9dad-11d1-80b4-00c04fd430c8")) NameSpaceOID = uuid.Must(uuid.FromString("6ba7b812-9dad-11d1-80b4-00c04fd430c8")) NameSpaceX500 = uuid.Must(uuid.FromString("6ba7b814-9dad-11d1-80b4-00c04fd430c8")) )
View Source
var DefaultEncoder = &base57{newAlphabet(DefaultAlphabet)}
DefaultEncoder is the default encoder uses when generating new UUIDs, and is based on Base57.
Functions ¶
func IsUUIDv4 ¶ added in v1.0.4
func IsUUIDv4(u uuid.UUID) bool
IsUUIDv4 returns true if the provided uuid matches the v5 schema
func NewWithAlphabet ¶
NewWithAlphabet returns a new UUIDv4, encoded with base57 using the alternative alphabet abc.
func NewWithEncoder ¶ added in v1.0.4
NewWithEncoder returns a new UUIDv4, encoded with enc.
func NewWithNamespace ¶ added in v1.0.4
NewWithNamespace returns a new UUIDv5 (or v4 if name is empty), encoded with base57.
Types ¶
Click to show internal directories.
Click to hide internal directories.