Documentation ¶
Overview ¶
Package redis is a generated GoMock package.
Index ¶
- Constants
- type MockShortenerCacheRepo
- func (m *MockShortenerCacheRepo) DeleteURL(arg0 string) (int64, error)
- func (m *MockShortenerCacheRepo) EXPECT() *MockShortenerCacheRepoMockRecorder
- func (m *MockShortenerCacheRepo) GetAllURL(arg0 string) ([]entity.URL, error)
- func (m *MockShortenerCacheRepo) GetURL(arg0 string) (string, error)
- func (m *MockShortenerCacheRepo) HasShortURLExpired(arg0 string) (bool, error)
- func (m *MockShortenerCacheRepo) IsCollectionURLExist(arg0 string) (bool, error)
- func (m *MockShortenerCacheRepo) IsSingleURLExist(arg0 string) (bool, error)
- func (m *MockShortenerCacheRepo) SetURL(arg0 entity.URL) error
- type MockShortenerCacheRepoMockRecorder
- func (mr *MockShortenerCacheRepoMockRecorder) DeleteURL(arg0 interface{}) *gomock.Call
- func (mr *MockShortenerCacheRepoMockRecorder) GetAllURL(arg0 interface{}) *gomock.Call
- func (mr *MockShortenerCacheRepoMockRecorder) GetURL(arg0 interface{}) *gomock.Call
- func (mr *MockShortenerCacheRepoMockRecorder) HasShortURLExpired(arg0 interface{}) *gomock.Call
- func (mr *MockShortenerCacheRepoMockRecorder) IsCollectionURLExist(arg0 interface{}) *gomock.Call
- func (mr *MockShortenerCacheRepoMockRecorder) IsSingleURLExist(arg0 interface{}) *gomock.Call
- func (mr *MockShortenerCacheRepoMockRecorder) SetURL(arg0 interface{}) *gomock.Call
- type ShortenerCacheRepo
- func (c *ShortenerCacheRepo) DeleteURL(shortURL string) (int64, error)
- func (c *ShortenerCacheRepo) GetAllURL(userID string) ([]entity.URL, error)
- func (c *ShortenerCacheRepo) GetURL(shortURL string) (string, error)
- func (c *ShortenerCacheRepo) HasShortURLExpired(shortURL string) (bool, error)
- func (c *ShortenerCacheRepo) IsCollectionURLExist(userID string) (bool, error)
- func (c *ShortenerCacheRepo) IsSingleURLExist(shortURL string) (bool, error)
- func (c *ShortenerCacheRepo) SetURL(url entity.URL) error
Constants ¶
const ( SingleURLKey = "url:single" CollectionURLKey = "url:all" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockShortenerCacheRepo ¶
type MockShortenerCacheRepo struct {
// contains filtered or unexported fields
}
MockShortenerCacheRepo is a mock of ShortenerCacheRepo interface
func NewMockShortenerCacheRepo ¶
func NewMockShortenerCacheRepo(ctrl *gomock.Controller) *MockShortenerCacheRepo
NewMockShortenerCacheRepo creates a new mock instance
func (*MockShortenerCacheRepo) DeleteURL ¶
func (m *MockShortenerCacheRepo) DeleteURL(arg0 string) (int64, error)
DeleteURL mocks base method
func (*MockShortenerCacheRepo) EXPECT ¶
func (m *MockShortenerCacheRepo) EXPECT() *MockShortenerCacheRepoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockShortenerCacheRepo) GetAllURL ¶
func (m *MockShortenerCacheRepo) GetAllURL(arg0 string) ([]entity.URL, error)
GetAllURL mocks base method
func (*MockShortenerCacheRepo) GetURL ¶
func (m *MockShortenerCacheRepo) GetURL(arg0 string) (string, error)
GetURL mocks base method
func (*MockShortenerCacheRepo) HasShortURLExpired ¶
func (m *MockShortenerCacheRepo) HasShortURLExpired(arg0 string) (bool, error)
HasShortURLExpired mocks base method
func (*MockShortenerCacheRepo) IsCollectionURLExist ¶
func (m *MockShortenerCacheRepo) IsCollectionURLExist(arg0 string) (bool, error)
IsCollectionURLExist mocks base method
func (*MockShortenerCacheRepo) IsSingleURLExist ¶
func (m *MockShortenerCacheRepo) IsSingleURLExist(arg0 string) (bool, error)
IsSingleURLExist mocks base method
type MockShortenerCacheRepoMockRecorder ¶
type MockShortenerCacheRepoMockRecorder struct {
// contains filtered or unexported fields
}
MockShortenerCacheRepoMockRecorder is the mock recorder for MockShortenerCacheRepo
func (*MockShortenerCacheRepoMockRecorder) DeleteURL ¶
func (mr *MockShortenerCacheRepoMockRecorder) DeleteURL(arg0 interface{}) *gomock.Call
DeleteURL indicates an expected call of DeleteURL
func (*MockShortenerCacheRepoMockRecorder) GetAllURL ¶
func (mr *MockShortenerCacheRepoMockRecorder) GetAllURL(arg0 interface{}) *gomock.Call
GetAllURL indicates an expected call of GetAllURL
func (*MockShortenerCacheRepoMockRecorder) GetURL ¶
func (mr *MockShortenerCacheRepoMockRecorder) GetURL(arg0 interface{}) *gomock.Call
GetURL indicates an expected call of GetURL
func (*MockShortenerCacheRepoMockRecorder) HasShortURLExpired ¶
func (mr *MockShortenerCacheRepoMockRecorder) HasShortURLExpired(arg0 interface{}) *gomock.Call
HasShortURLExpired indicates an expected call of HasShortURLExpired
func (*MockShortenerCacheRepoMockRecorder) IsCollectionURLExist ¶
func (mr *MockShortenerCacheRepoMockRecorder) IsCollectionURLExist(arg0 interface{}) *gomock.Call
IsCollectionURLExist indicates an expected call of IsCollectionURLExist
func (*MockShortenerCacheRepoMockRecorder) IsSingleURLExist ¶
func (mr *MockShortenerCacheRepoMockRecorder) IsSingleURLExist(arg0 interface{}) *gomock.Call
IsSingleURLExist indicates an expected call of IsSingleURLExist
func (*MockShortenerCacheRepoMockRecorder) SetURL ¶
func (mr *MockShortenerCacheRepoMockRecorder) SetURL(arg0 interface{}) *gomock.Call
SetURL indicates an expected call of SetURL
type ShortenerCacheRepo ¶
type ShortenerCacheRepo struct {
// contains filtered or unexported fields
}
func NewShortenerCacheRepo ¶
func NewShortenerCacheRepo(rd bridge.Redis) *ShortenerCacheRepo
func (*ShortenerCacheRepo) DeleteURL ¶
func (c *ShortenerCacheRepo) DeleteURL(shortURL string) (int64, error)
func (*ShortenerCacheRepo) GetAllURL ¶
func (c *ShortenerCacheRepo) GetAllURL(userID string) ([]entity.URL, error)
func (*ShortenerCacheRepo) GetURL ¶
func (c *ShortenerCacheRepo) GetURL(shortURL string) (string, error)
func (*ShortenerCacheRepo) HasShortURLExpired ¶
func (c *ShortenerCacheRepo) HasShortURLExpired(shortURL string) (bool, error)
func (*ShortenerCacheRepo) IsCollectionURLExist ¶
func (c *ShortenerCacheRepo) IsCollectionURLExist(userID string) (bool, error)
func (*ShortenerCacheRepo) IsSingleURLExist ¶
func (c *ShortenerCacheRepo) IsSingleURLExist(shortURL string) (bool, error)