ulid

package
v0.0.0-...-d22e7c3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ulid

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

Ulid struct

func New

func New(workernumber int) *Ulid

New ulid

func (*Ulid) Ulid

func (u *Ulid) Ulid() string

Ulid return ulid string

type UlidIface

type UlidIface interface {
	Ulid() string
}

UlidIface interface, best to use instead of Ulid struct

type UlidMock

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

UlidMock for mocking ulid

func NewMock

func NewMock(ulid ...string) *UlidMock

NewMock return new mock object

func (*UlidMock) DefaultValue

func (u *UlidMock) DefaultValue() string

DefaultValue return default value of mock

func (*UlidMock) Ulid

func (u *UlidMock) Ulid() string

Ulid return mock ulid value

type Worker

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

Worker of ulid

func (*Worker) Work

func (w *Worker) Work(source rand.Source)

Jump to

Keyboard shortcuts

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