package uuid
import uuid "github.com/Diarkis/diarkis/uuid/v4"
Index
- func GenUUIDBytes() ([]byte, error)
- func GenUUIDString() (string, error)
- func ToUUIDBytes(uuid string) ([]byte, error)
- func ToUUIDString(uuid []byte) (string, error)
- type UUID
Functions
func GenUUIDBytes
func GenUUIDBytes() ([]byte, error)
GenUUIDBytes returns a UUID v4 byte array.
func GenUUIDString
func GenUUIDString() (string, error)
GenUUIDString returns a UUID v4 string.
func ToUUIDBytes
func ToUUIDBytes(uuid string) ([]byte, error)
ToUUIDBytes converts UUID string to UUID bytes.
func ToUUIDString
func ToUUIDString(uuid []byte) (string, error)
ToUUIDString converts UUID bytes to UUID string.
Types
type UUID
type UUID struct { Bytes []byte String string }
UUID Data structure of UUID
func FromBytes
func FromBytes(uuidBytes []byte) (*UUID, error)
FromBytes Converts []byte to UUID struct
func FromString
func FromString(uuidString string) (*UUID, error)
FromString Converts string to UUID struct
func New
func New() (*UUID, error)
New Creates a new UUID struct
func (*UUID) Clear
func (uuid *UUID) Clear()
Clear Resets internal values of UUID struct