Documentation ¶
Overview ¶
Package storage is a generated GoMock package.
Package storage is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockURLReport ¶
type MockURLReport struct {
// contains filtered or unexported fields
}
MockURLReport is a mock of URLReport interface.
func NewMockURLReport ¶
func NewMockURLReport(ctrl *gomock.Controller) *MockURLReport
NewMockURLReport creates a new mock instance.
func (*MockURLReport) EXPECT ¶
func (m *MockURLReport) EXPECT() *MockURLReportMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockURLReport) ReportTopDomains ¶
func (m *MockURLReport) ReportTopDomains(ctx context.Context, n int) ([]*models.JSONDomainReport, error)
ReportTopDomains mocks base method.
type MockURLReportMockRecorder ¶
type MockURLReportMockRecorder struct {
// contains filtered or unexported fields
}
MockURLReportMockRecorder is the mock recorder for MockURLReport.
func (*MockURLReportMockRecorder) ReportTopDomains ¶
func (mr *MockURLReportMockRecorder) ReportTopDomains(ctx, n interface{}) *gomock.Call
ReportTopDomains indicates an expected call of ReportTopDomains.
type MockURLStorage ¶
type MockURLStorage struct {
// contains filtered or unexported fields
}
MockURLStorage is a mock of URLStorage interface.
func NewMockURLStorage ¶
func NewMockURLStorage(ctrl *gomock.Controller) *MockURLStorage
NewMockURLStorage creates a new mock instance.
func (*MockURLStorage) EXPECT ¶
func (m *MockURLStorage) EXPECT() *MockURLStorageMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockURLStorage) GetOriginalURL ¶
func (m *MockURLStorage) GetOriginalURL(ctx context.Context, shortURL string) (*models.ShortenedURL, error)
GetOriginalURL mocks base method.
func (*MockURLStorage) StoreShortURL ¶
func (m *MockURLStorage) StoreShortURL(ctx context.Context, shortUrl *models.ShortenedURL) error
StoreShortURL mocks base method.
type MockURLStorageMockRecorder ¶
type MockURLStorageMockRecorder struct {
// contains filtered or unexported fields
}
MockURLStorageMockRecorder is the mock recorder for MockURLStorage.
func (*MockURLStorageMockRecorder) GetOriginalURL ¶
func (mr *MockURLStorageMockRecorder) GetOriginalURL(ctx, shortURL interface{}) *gomock.Call
GetOriginalURL indicates an expected call of GetOriginalURL.
func (*MockURLStorageMockRecorder) StoreShortURL ¶
func (mr *MockURLStorageMockRecorder) StoreShortURL(ctx, shortUrl interface{}) *gomock.Call
StoreShortURL indicates an expected call of StoreShortURL.
type URLReport ¶
type URLReport interface {
ReportTopDomains(ctx context.Context, n int) ([]*models.JSONDomainReport, error)
}
func NewPGURLReport ¶
type URLStorage ¶
type URLStorage interface { StoreShortURL(ctx context.Context, shortUrl *models.ShortenedURL) error GetOriginalURL(ctx context.Context, shortURL string) (*models.ShortenedURL, error) }
func NewPGShortenedURLStorage ¶
func NewPGShortenedURLStorage(db *bun.DB) URLStorage
func NewRedisShortenedURLStorage ¶
func NewRedisShortenedURLStorage(db *redis.Client) URLStorage