rfc4122

package
v0.5.16 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//UUIDV1 is generated by using a combination the host computers MAC address and the current date and time
	UUIDV1 = 1
	//UUIDV4 The bits that comprise a UUID v4 are generated randomly and with no inherent logic.
	UUIDV4 = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security Services. A UUID is a 16 byte (128 bit) array. UUIDs may be used as keys to maps or compared directly.

func NewRFC4122Generator

func NewRFC4122Generator(opts ...Option) *Generator

func (*Generator) New

func (g *Generator) New() [16]byte

func (*Generator) New32UUID

func (g *Generator) New32UUID() uint32

func (*Generator) New64UUID

func (g *Generator) New64UUID() uint64

func (*Generator) NewStringUUID

func (g *Generator) NewStringUUID() string

func (*Generator) ParseFromByte

func (g *Generator) ParseFromByte(bytes []byte) string

type Option

type Option func(options *Options)

func WithUUIDVersion

func WithUUIDVersion(version int) Option

type Options

type Options struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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