uuid

package
v0.3.19 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package uuid provides a UUID (Universally Unique Identifier) implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option = func(*Options)

type Options

type Options struct {
	Version   int
	Namespace uuid.UUID
	Name      []byte
	Domain    interface{}
}

type UUID

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

UUID represents a UUID generator

func New

func New(opts ...Option) *UUID

New creates a new UUID instance

func (UUID) Generate

func (u UUID) Generate() string

func (UUID) GenerateString

func (u UUID) GenerateString() string

GenerateString generates a new UUID.

func (UUID) Name

func (u UUID) Name() string

Name returns the name of the UUID generator

func (UUID) Size

func (u UUID) Size() int

Size returns the size of the UUID in bits

func (UUID) Validate

func (u UUID) Validate(id string) bool

func (UUID) ValidateString

func (u UUID) ValidateString(id string) bool

ValidateString checks if the provided ID is a valid UUID.

Jump to

Keyboard shortcuts

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