Documentation ¶
Index ¶
- Variables
- type MockLinkRepo
- type MockRedisCache
- type MockStatsRepo
- func (m *MockStatsRepo) All(ctx context.Context) ([]domain.Stats, error)
- func (m *MockStatsRepo) Create(ctx context.Context, stats domain.Stats) error
- func (m *MockStatsRepo) Delete(ctx context.Context, id string) error
- func (m *MockStatsRepo) Get(ctx context.Context, id string) (domain.Stats, error)
- func (m *MockStatsRepo) GetStatsByLinkID(ctx context.Context, linkID string) ([]domain.Stats, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var MockLinkData []domain.Link = []domain.Link{
{Id: "testid1", OriginalURL: "https://example.com/link1"},
{Id: "testid2", OriginalURL: "https://example.com/link2"},
{Id: "testid3", OriginalURL: "https://example.com/link3"},
}
View Source
var MockStatsData []domain.Stats = []domain.Stats{ {Id: "abcdefg1", Platform: domain.PlatformUnknown, LinkID: "testid1"}, {Id: "abcdefg2", Platform: domain.PlatformInstagram, LinkID: "testid2"}, {Id: "abcdefg3", Platform: domain.PlatformTwitter, LinkID: "testid3"}, }
Functions ¶
This section is empty.
Types ¶
type MockLinkRepo ¶
func NewMockLinkRepo ¶
func NewMockLinkRepo() *MockLinkRepo
type MockRedisCache ¶
func NewMockRedisCache ¶
func NewMockRedisCache() *MockRedisCache
func (*MockRedisCache) Delete ¶
func (m *MockRedisCache) Delete(ctx context.Context, key string) error
type MockStatsRepo ¶
func NewMockStatsRepo ¶
func NewMockStatsRepo() *MockStatsRepo
func (*MockStatsRepo) GetStatsByLinkID ¶
Click to show internal directories.
Click to hide internal directories.