demo_id_generator

package
v0.0.0-...-184aab5 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IdGenerator

type IdGenerator interface {
	Generate() string
}

IdGenerator used to generate random IDs

type IdGeneratorV1

type IdGeneratorV1 struct {
	*zap.Logger
}

func NewIdGeneratorV1

func NewIdGeneratorV1(logger *zap.Logger) *IdGeneratorV1

func (*IdGeneratorV1) Generate

func (g *IdGeneratorV1) Generate() string

type LogTraceGenerator

type LogTraceGenerator interface {
	IdGenerator
	Log()
}

type RandomGenerator

type RandomGenerator struct {
	*zap.Logger
}

func NewRandomGenerator

func NewRandomGenerator(logger *zap.Logger) *RandomGenerator

func (*RandomGenerator) Generate

func (g *RandomGenerator) Generate() string

Generate an random ID

func (*RandomGenerator) Log

func (g *RandomGenerator) Log()

Jump to

Keyboard shortcuts

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