Documentation
¶
Index ¶
Constants ¶
View Source
const HexUuidSize = RawUuidSize * 2
View Source
const RawUuidSize = 16
RawUuidSize of a UUID in bytes.
Variables ¶
This section is empty.
Functions ¶
func GenerateSnowFlakeId ¶
func GenerateSnowFlakeId() [8]byte
func GenerateUUIDFromEntropy ¶
func GenerateUUIDFromEntropy() string
GenerateBytesUUID returns a UUID based on RFC 4122 returning the generated bytes
func ReadAtLeast ¶
func StringWithCharset ¶
BenchmarkGenerateUUID/random-str-charset-4 2000000 888 ns/op 1.13 MB/s 64 B/op 2 allocs/op
Types ¶
type UniqueIdHex ¶
type UniqueIdHex [32]byte
func GenerateIDString ¶
func GenerateIDString() UniqueIdHex
GenerateIDString returns a UUID based on RFC 4122 returning the generated bytes
func (UniqueIdHex) Bytes ¶
func (uid UniqueIdHex) Bytes() [32]byte
func (UniqueIdHex) Slice ¶
func (uid UniqueIdHex) Slice() []byte
func (UniqueIdHex) String ¶
func (uid UniqueIdHex) String() string
func (UniqueIdHex) UnsafeString ¶
func (uid UniqueIdHex) UnsafeString() string
type UniqueIdRaw ¶
type UniqueIdRaw [16]byte
func GenerateIDRaw ¶
func GenerateIDRaw() UniqueIdRaw
GenerateIDRaw returns a UUID based on RFC 4122 returning the generated bytes
func (UniqueIdRaw) Bytes ¶
func (uid UniqueIdRaw) Bytes() [16]byte
func (UniqueIdRaw) Slice ¶
func (uid UniqueIdRaw) Slice() []byte
func (UniqueIdRaw) String ¶
func (uid UniqueIdRaw) String() string
Click to show internal directories.
Click to hide internal directories.