uuid

package
v0.0.0-...-46baba5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Default

type Default struct{}

Default implementation of UUIDProvider

func NewProvider

func NewProvider() *Default

NewProvider return a new Default uuid provider.

func (Default) New

func (t Default) New() UUID

New implementation of uuid.Provider

func (Default) Parse

func (t Default) Parse(s string) (UUID, error)

Parse implementation of uuid.Provider

type MockService

type MockService struct {
	mock.Mock
}

MockService is an autogenerated mock type for the Service type

func NewMockService

func NewMockService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockService

NewMockService creates a new instance of MockService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockService) New

func (_m *MockService) New() UUID

New provides a mock function with given fields:

func (*MockService) Parse

func (_m *MockService) Parse(_a0 string) (UUID, error)

Parse provides a mock function with given fields: _a0

type Service

type Service interface {
	// New create a new UUID V4
	New() UUID
	Parse(string) (UUID, error)
}

type Stub

type Stub struct {
	UUID string
}

Stub implementation of uuid.Provider.

func (*Stub) New

func (t *Stub) New() UUID

New stub method.

func (*Stub) Parse

func (t *Stub) Parse(s string) (UUID, error)

Parse stub method.

This method really parse the input.

type UUID

type UUID string

UUID custome type

Jump to

Keyboard shortcuts

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