usecase

package
v0.0.0-...-a6ef0dd Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package usecase is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockShortenerUC

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

MockShortenerUC is a mock of ShortenerUC interface

func NewMockShortenerUC

func NewMockShortenerUC(ctrl *gomock.Controller) *MockShortenerUC

NewMockShortenerUC creates a new mock instance

func (*MockShortenerUC) CreateNewCustomShortURL

func (m *MockShortenerUC) CreateNewCustomShortURL(arg0, arg1 string) (entity.URL, error)

CreateNewCustomShortURL mocks base method

func (*MockShortenerUC) CreateNewShortURL

func (m *MockShortenerUC) CreateNewShortURL(arg0 string) (entity.URL, error)

CreateNewShortURL mocks base method

func (*MockShortenerUC) DeleteURL

func (m *MockShortenerUC) DeleteURL(arg0 string) error

DeleteURL mocks base method

func (*MockShortenerUC) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockShortenerUC) GenerateShortURL

func (m *MockShortenerUC) GenerateShortURL(arg0 int) string

GenerateShortURL mocks base method

func (*MockShortenerUC) GetAllURL

func (m *MockShortenerUC) GetAllURL(arg0 string) ([]entity.URL, error)

GetAllURL mocks base method

func (*MockShortenerUC) GetLongURL

func (m *MockShortenerUC) GetLongURL(arg0 string) (string, error)

GetLongURL mocks base method

func (*MockShortenerUC) IsValidURL

func (m *MockShortenerUC) IsValidURL(arg0 string) (string, error)

IsValidURL mocks base method

func (*MockShortenerUC) UpdateShortURL

func (m *MockShortenerUC) UpdateShortURL(arg0, arg1 string) error

UpdateShortURL mocks base method

type MockShortenerUCMockRecorder

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

MockShortenerUCMockRecorder is the mock recorder for MockShortenerUC

func (*MockShortenerUCMockRecorder) CreateNewCustomShortURL

func (mr *MockShortenerUCMockRecorder) CreateNewCustomShortURL(arg0, arg1 interface{}) *gomock.Call

CreateNewCustomShortURL indicates an expected call of CreateNewCustomShortURL

func (*MockShortenerUCMockRecorder) CreateNewShortURL

func (mr *MockShortenerUCMockRecorder) CreateNewShortURL(arg0 interface{}) *gomock.Call

CreateNewShortURL indicates an expected call of CreateNewShortURL

func (*MockShortenerUCMockRecorder) DeleteURL

func (mr *MockShortenerUCMockRecorder) DeleteURL(arg0 interface{}) *gomock.Call

DeleteURL indicates an expected call of DeleteURL

func (*MockShortenerUCMockRecorder) GenerateShortURL

func (mr *MockShortenerUCMockRecorder) GenerateShortURL(arg0 interface{}) *gomock.Call

GenerateShortURL indicates an expected call of GenerateShortURL

func (*MockShortenerUCMockRecorder) GetAllURL

func (mr *MockShortenerUCMockRecorder) GetAllURL(arg0 interface{}) *gomock.Call

GetAllURL indicates an expected call of GetAllURL

func (*MockShortenerUCMockRecorder) GetLongURL

func (mr *MockShortenerUCMockRecorder) GetLongURL(arg0 interface{}) *gomock.Call

GetLongURL indicates an expected call of GetLongURL

func (*MockShortenerUCMockRecorder) IsValidURL

func (mr *MockShortenerUCMockRecorder) IsValidURL(arg0 interface{}) *gomock.Call

IsValidURL indicates an expected call of IsValidURL

func (*MockShortenerUCMockRecorder) UpdateShortURL

func (mr *MockShortenerUCMockRecorder) UpdateShortURL(arg0, arg1 interface{}) *gomock.Call

UpdateShortURL indicates an expected call of UpdateShortURL

type ShortenerUsecase

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

func NewShortenerUsecase

func NewShortenerUsecase(db internal.ShortenerDBRepo, cache internal.ShortenerCacheRepo, shortUrlLength int, expireDuration int) *ShortenerUsecase

func (*ShortenerUsecase) CreateNewCustomShortURL

func (u *ShortenerUsecase) CreateNewCustomShortURL(shortURL string, longURL string) (entity.URL, error)

func (*ShortenerUsecase) CreateNewShortURL

func (u *ShortenerUsecase) CreateNewShortURL(longURL string) (entity.URL, error)

func (*ShortenerUsecase) DeleteURL

func (u *ShortenerUsecase) DeleteURL(shortURL string) error

func (*ShortenerUsecase) GenerateShortURL

func (u *ShortenerUsecase) GenerateShortURL(length int) string

func (*ShortenerUsecase) GetAllURL

func (u *ShortenerUsecase) GetAllURL(userID string) ([]entity.URL, error)

func (*ShortenerUsecase) GetLongURL

func (u *ShortenerUsecase) GetLongURL(shortURL string) (string, error)

func (*ShortenerUsecase) IsValidURL

func (u *ShortenerUsecase) IsValidURL(input string) (string, error)

func (*ShortenerUsecase) UpdateShortURL

func (u *ShortenerUsecase) UpdateShortURL(shortURL string, longURL string) error

Jump to

Keyboard shortcuts

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