ports

package
v0.0.0-...-e3b22c1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterRepository

type CounterRepository struct {
	Count int64
}

func NewCounterRepository

func NewCounterRepository() *CounterRepository

func (*CounterRepository) GetCounter

func (c *CounterRepository) GetCounter(ctx context.Context) (int64, error)

func (*CounterRepository) Increase

func (c *CounterRepository) Increase(ctx context.Context) (int64, error)

type KeyGenService

type KeyGenService struct {
	mock.Mock
}

KeyGenService is an autogenerated mock type for the KeyGenService type

func NewKeyGenService

func NewKeyGenService(t interface {
	mock.TestingT
	Cleanup(func())
}) *KeyGenService

NewKeyGenService creates a new instance of KeyGenService. 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 (*KeyGenService) EXPECT

func (_m *KeyGenService) EXPECT() *KeyGenService_Expecter

func (*KeyGenService) GenerateKey

func (_m *KeyGenService) GenerateKey(ctx context.Context) (string, error)

GenerateKey provides a mock function with given fields: ctx

type KeyGenService_Expecter

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

func (*KeyGenService_Expecter) GenerateKey

func (_e *KeyGenService_Expecter) GenerateKey(ctx interface{}) *KeyGenService_GenerateKey_Call

GenerateKey is a helper method to define mock.On call

  • ctx context.Context

type KeyGenService_GenerateKey_Call

type KeyGenService_GenerateKey_Call struct {
	*mock.Call
}

KeyGenService_GenerateKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateKey'

func (*KeyGenService_GenerateKey_Call) Return

func (*KeyGenService_GenerateKey_Call) Run

func (*KeyGenService_GenerateKey_Call) RunAndReturn

type ShortenerService

type ShortenerService struct {
	mock.Mock
}

ShortenerService is an autogenerated mock type for the ShortenerService type

func NewShortenerService

func NewShortenerService(t interface {
	mock.TestingT
	Cleanup(func())
}) *ShortenerService

NewShortenerService creates a new instance of ShortenerService. 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 (*ShortenerService) EXPECT

func (*ShortenerService) GetLongURL

func (_m *ShortenerService) GetLongURL(ctx context.Context, key string) (string, error)

GetLongURL provides a mock function with given fields: ctx, key

func (*ShortenerService) Shorten

func (_m *ShortenerService) Shorten(ctx context.Context, url string) (string, error)

Shorten provides a mock function with given fields: ctx, url

type ShortenerService_Expecter

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

func (*ShortenerService_Expecter) GetLongURL

func (_e *ShortenerService_Expecter) GetLongURL(ctx interface{}, key interface{}) *ShortenerService_GetLongURL_Call

GetLongURL is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*ShortenerService_Expecter) Shorten

func (_e *ShortenerService_Expecter) Shorten(ctx interface{}, url interface{}) *ShortenerService_Shorten_Call

Shorten is a helper method to define mock.On call

  • ctx context.Context
  • url string

type ShortenerService_GetLongURL_Call

type ShortenerService_GetLongURL_Call struct {
	*mock.Call
}

ShortenerService_GetLongURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLongURL'

func (*ShortenerService_GetLongURL_Call) Return

func (*ShortenerService_GetLongURL_Call) Run

func (*ShortenerService_GetLongURL_Call) RunAndReturn

type ShortenerService_Shorten_Call

type ShortenerService_Shorten_Call struct {
	*mock.Call
}

ShortenerService_Shorten_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Shorten'

func (*ShortenerService_Shorten_Call) Return

func (*ShortenerService_Shorten_Call) Run

func (*ShortenerService_Shorten_Call) RunAndReturn

type URLRepository

type URLRepository struct {
	mock.Mock
}

URLRepository is an autogenerated mock type for the URLRepository type

func NewURLRepository

func NewURLRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *URLRepository

NewURLRepository creates a new instance of URLRepository. 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 (*URLRepository) EXPECT

func (_m *URLRepository) EXPECT() *URLRepository_Expecter

func (*URLRepository) GetKeyByLong

func (_m *URLRepository) GetKeyByLong(ctx context.Context, longURL string) (string, error)

GetKeyByLong provides a mock function with given fields: ctx, longURL

func (*URLRepository) GetLongByKey

func (_m *URLRepository) GetLongByKey(ctx context.Context, key string) (string, error)

GetLongByKey provides a mock function with given fields: ctx, key

func (*URLRepository) Save

func (_m *URLRepository) Save(ctx context.Context, url models.URL) error

Save provides a mock function with given fields: ctx, url

type URLRepository_Expecter

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

func (*URLRepository_Expecter) GetKeyByLong

func (_e *URLRepository_Expecter) GetKeyByLong(ctx interface{}, longURL interface{}) *URLRepository_GetKeyByLong_Call

GetKeyByLong is a helper method to define mock.On call

  • ctx context.Context
  • longURL string

func (*URLRepository_Expecter) GetLongByKey

func (_e *URLRepository_Expecter) GetLongByKey(ctx interface{}, key interface{}) *URLRepository_GetLongByKey_Call

GetLongByKey is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*URLRepository_Expecter) Save

func (_e *URLRepository_Expecter) Save(ctx interface{}, url interface{}) *URLRepository_Save_Call

Save is a helper method to define mock.On call

  • ctx context.Context
  • url models.URL

type URLRepository_GetKeyByLong_Call

type URLRepository_GetKeyByLong_Call struct {
	*mock.Call
}

URLRepository_GetKeyByLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKeyByLong'

func (*URLRepository_GetKeyByLong_Call) Return

func (*URLRepository_GetKeyByLong_Call) Run

func (*URLRepository_GetKeyByLong_Call) RunAndReturn

type URLRepository_GetLongByKey_Call

type URLRepository_GetLongByKey_Call struct {
	*mock.Call
}

URLRepository_GetLongByKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLongByKey'

func (*URLRepository_GetLongByKey_Call) Return

func (*URLRepository_GetLongByKey_Call) Run

func (*URLRepository_GetLongByKey_Call) RunAndReturn

type URLRepository_Save_Call

type URLRepository_Save_Call struct {
	*mock.Call
}

URLRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'

func (*URLRepository_Save_Call) Return

func (*URLRepository_Save_Call) Run

func (*URLRepository_Save_Call) RunAndReturn

Jump to

Keyboard shortcuts

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