Documentation ¶
Index ¶
- type MockService
- func (_m *MockService) CountRedirects(ctx context.Context, url string) (int64, *errors.Error)
- func (_m *MockService) DeleteUrl(ctx context.Context, url string) *errors.Error
- func (_m *MockService) EXPECT() *MockServiceMockRecorder
- func (_m *MockService) IncrementRedirect(ctx context.Context, id string) (string, *errors.Error)
- func (_m *MockService) RetrieveUrl(ctx context.Context, url string) (string, *errors.Error)
- func (_m *MockService) ShortenUrl(ctx context.Context, url string) (string, *errors.Error)
- type MockServiceMockRecorder
- func (_mr *MockServiceMockRecorder) CountRedirects(arg0, arg1 interface{}) *gomock.Call
- func (_mr *MockServiceMockRecorder) DeleteUrl(arg0, arg1 interface{}) *gomock.Call
- func (_mr *MockServiceMockRecorder) IncrementRedirect(arg0, arg1 interface{}) *gomock.Call
- func (_mr *MockServiceMockRecorder) RetrieveUrl(arg0, arg1 interface{}) *gomock.Call
- func (_mr *MockServiceMockRecorder) ShortenUrl(arg0, arg1 interface{}) *gomock.Call
- type MockStore
- func (_m *MockStore) DeleteById(ctx context.Context, id string) error
- func (_m *MockStore) EXPECT() *MockStoreMockRecorder
- func (_m *MockStore) FindById(ctx context.Context, id string) (*ModelShorten, error)
- func (_m *MockStore) FindUrl(ctx context.Context, url string) (*ModelShorten, error)
- func (_m *MockStore) IncrementCount(ctx context.Context, id string) (*ModelShorten, error)
- func (_m *MockStore) StoreUrl(ctx context.Context, document interface{}) error
- type MockStoreMockRecorder
- func (_mr *MockStoreMockRecorder) DeleteById(arg0, arg1 interface{}) *gomock.Call
- func (_mr *MockStoreMockRecorder) FindById(arg0, arg1 interface{}) *gomock.Call
- func (_mr *MockStoreMockRecorder) FindUrl(arg0, arg1 interface{}) *gomock.Call
- func (_mr *MockStoreMockRecorder) IncrementCount(arg0, arg1 interface{}) *gomock.Call
- func (_mr *MockStoreMockRecorder) StoreUrl(arg0, arg1 interface{}) *gomock.Call
- type ModelShorten
- type Service
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockService ¶
type MockService struct {
// contains filtered or unexported fields
}
MockService is a mock of Service interface
func NewMockService ¶
func NewMockService(ctrl *gomock.Controller) *MockService
NewMockService creates a new mock instance
func (*MockService) CountRedirects ¶
CountRedirects mocks base method
func (*MockService) EXPECT ¶
func (_m *MockService) EXPECT() *MockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockService) IncrementRedirect ¶
IncrementRedirect mocks base method
func (*MockService) RetrieveUrl ¶
RetrieveUrl mocks base method
func (*MockService) ShortenUrl ¶
ShortenUrl mocks base method
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService
func (*MockServiceMockRecorder) CountRedirects ¶
func (_mr *MockServiceMockRecorder) CountRedirects(arg0, arg1 interface{}) *gomock.Call
CountRedirects indicates an expected call of CountRedirects
func (*MockServiceMockRecorder) DeleteUrl ¶
func (_mr *MockServiceMockRecorder) DeleteUrl(arg0, arg1 interface{}) *gomock.Call
DeleteUrl indicates an expected call of DeleteUrl
func (*MockServiceMockRecorder) IncrementRedirect ¶
func (_mr *MockServiceMockRecorder) IncrementRedirect(arg0, arg1 interface{}) *gomock.Call
IncrementRedirect indicates an expected call of IncrementRedirect
func (*MockServiceMockRecorder) RetrieveUrl ¶
func (_mr *MockServiceMockRecorder) RetrieveUrl(arg0, arg1 interface{}) *gomock.Call
RetrieveUrl indicates an expected call of RetrieveUrl
func (*MockServiceMockRecorder) ShortenUrl ¶
func (_mr *MockServiceMockRecorder) ShortenUrl(arg0, arg1 interface{}) *gomock.Call
ShortenUrl indicates an expected call of ShortenUrl
type MockStore ¶
type MockStore struct {
// contains filtered or unexported fields
}
MockStore is a mock of Store interface
func NewMockStore ¶
func NewMockStore(ctrl *gomock.Controller) *MockStore
NewMockStore creates a new mock instance
func (*MockStore) DeleteById ¶
DeleteById mocks base method
func (*MockStore) EXPECT ¶
func (_m *MockStore) EXPECT() *MockStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockStore) IncrementCount ¶
IncrementCount mocks base method
type MockStoreMockRecorder ¶
type MockStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockStoreMockRecorder is the mock recorder for MockStore
func (*MockStoreMockRecorder) DeleteById ¶
func (_mr *MockStoreMockRecorder) DeleteById(arg0, arg1 interface{}) *gomock.Call
DeleteById indicates an expected call of DeleteById
func (*MockStoreMockRecorder) FindById ¶
func (_mr *MockStoreMockRecorder) FindById(arg0, arg1 interface{}) *gomock.Call
FindById indicates an expected call of FindById
func (*MockStoreMockRecorder) FindUrl ¶
func (_mr *MockStoreMockRecorder) FindUrl(arg0, arg1 interface{}) *gomock.Call
FindUrl indicates an expected call of FindUrl
func (*MockStoreMockRecorder) IncrementCount ¶
func (_mr *MockStoreMockRecorder) IncrementCount(arg0, arg1 interface{}) *gomock.Call
IncrementCount indicates an expected call of IncrementCount
func (*MockStoreMockRecorder) StoreUrl ¶
func (_mr *MockStoreMockRecorder) StoreUrl(arg0, arg1 interface{}) *gomock.Call
StoreUrl indicates an expected call of StoreUrl
type ModelShorten ¶
type Service ¶
type Service interface { ShortenUrl(ctx context.Context, url string) (string, *errors.Error) RetrieveUrl(ctx context.Context, url string) (string, *errors.Error) DeleteUrl(ctx context.Context, url string) *errors.Error CountRedirects(ctx context.Context, url string) (int64, *errors.Error) IncrementRedirect(ctx context.Context, id string) (string, *errors.Error) }
type Store ¶
type Store interface { StoreUrl(ctx context.Context, document interface{}) error FindUrl(ctx context.Context, url string) (*ModelShorten, error) FindById(ctx context.Context, id string) (*ModelShorten, error) DeleteById(ctx context.Context, id string) error IncrementCount(ctx context.Context, id string) (*ModelShorten, error) }