redis

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: 7 Imported by: 0

Documentation

Overview

Package redis is a generated GoMock package.

Index

Constants

View Source
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

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

func (*MockShortenerCacheRepo) SetURL

func (m *MockShortenerCacheRepo) SetURL(arg0 entity.URL) error

SetURL 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)

func (*ShortenerCacheRepo) SetURL

func (c *ShortenerCacheRepo) SetURL(url entity.URL) error

Jump to

Keyboard shortcuts

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