uuid

package
v0.0.202 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Format

type Format int
const (
	FORMAT_UNKNOWN Format = iota
	FORMAT_LONG
	FORMAT_SHORT
)

func GetFormat

func GetFormat(value string) Format

type UUID

type UUID [16]byte

UUID is an entirely random identifier created by the standard PRNG

func New

func New() *UUID

New generates a new UUID

func NewFromBytes

func NewFromBytes(bytes []byte) *UUID

NewFromBytes converts a byte array to an UUID

func (*UUID) Bytes

func (u *UUID) Bytes() []byte

Bytes converts UUID to a byte array

func (*UUID) Long

func (u *UUID) Long() string

Long formats UUID as a sequence of hex digits separated into 5 groups

func (*UUID) LongEx

func (u *UUID) LongEx(sep string) string

func (*UUID) Short

func (u *UUID) Short() string

Short converts UUID to lowercase base32 representation without padding (aka 1Password client-side UUIDs)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL