storage

package
v0.0.0-...-f217533 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

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

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

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

func NewPGURLReport(db *bun.DB) URLReport

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

Directories

Path Synopsis
cache
persist

Jump to

Keyboard shortcuts

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