Documentation ¶
Overview ¶
Package uuid defines functionality for creating UUIDs as defined in RFC 4122.
Currently only Version 5 (SHA1) and Version 3 (MD5) are supported.
Index ¶
- func FromInt(i *big.Int) (string, error)
- func MD5(space string, data []byte) (string, error)
- func Parse(s string) (string, error)
- func SHA1(space string, data []byte) (string, error)
- func ToInt(x string) *big.Int
- func ToString(x string) string
- func URN(x string) (string, error)
- func Valid(s string) error
- func Variant(x string) (int, error)
- func Version(x string) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromInt ¶
FromInt creates a UUID from an integer.
DNS: uuid.FromInt(0x6ba7b810_9dad_11d1_80b4_00c04fd430c8)
func MD5 ¶
MD5 generates a version 3 UUID based on the supplied name space and data. Use SHA1 instead if you can.
func Parse ¶
Parse decodes s into a UUID or returns an error. Both the standard UUID forms of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx are decoded as well as the Microsoft encoding {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} and the raw hex encoding: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.