uuid

package
v0.0.0-...-d07fcd1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConstGenerator

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

ConstGenerator is a mocked uuid generator, which always generate a pre defined uuid

func NewConstGenerator

func NewConstGenerator(uid string) *ConstGenerator

NewConstGenerator creates a new ConstGenerator instance

func (*ConstGenerator) NewString

func (g *ConstGenerator) NewString() string

NewString implements Generator.NewString

type Generator

type Generator interface {
	NewString() string
}

Generator defines an interface that can generate a uuid

func NewGenerator

func NewGenerator() Generator

NewGenerator creates a new generatorImpl instance

type MockGenerator

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

MockGenerator is a mocked uuid generator

func NewMock

func NewMock() *MockGenerator

NewMock creates a new MockGenerator instance

func (*MockGenerator) NewString

func (g *MockGenerator) NewString() (ret string)

NewString implements Generator.NewString

func (*MockGenerator) Push

func (g *MockGenerator) Push(uuid string)

Push adds a candidate uuid in FIFO list

Jump to

Keyboard shortcuts

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