repo

package
v0.0.0-...-890f6be Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package repo is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockStorager

type MockStorager struct {
	// contains filtered or unexported fields
}

MockStorager is a mock of Storager interface.

func NewMockStorager

func NewMockStorager(ctrl *gomock.Controller) *MockStorager

NewMockStorager creates a new mock instance.

func (*MockStorager) CreateURLRecord

func (m *MockStorager) CreateURLRecord(ctx contextx.Contextx, record *model.ShortenedUrl) error

CreateURLRecord mocks base method.

func (*MockStorager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStorager) GetURLRecordByShortURL

func (m *MockStorager) GetURLRecordByShortURL(ctx contextx.Contextx, shortURL string) (*model.ShortenedUrl, error)

GetURLRecordByShortURL mocks base method.

type MockStoragerMockRecorder

type MockStoragerMockRecorder struct {
	// contains filtered or unexported fields
}

MockStoragerMockRecorder is the mock recorder for MockStorager.

func (*MockStoragerMockRecorder) CreateURLRecord

func (mr *MockStoragerMockRecorder) CreateURLRecord(ctx, record interface{}) *gomock.Call

CreateURLRecord indicates an expected call of CreateURLRecord.

func (*MockStoragerMockRecorder) GetURLRecordByShortURL

func (mr *MockStoragerMockRecorder) GetURLRecordByShortURL(ctx, shortURL interface{}) *gomock.Call

GetURLRecordByShortURL indicates an expected call of GetURLRecordByShortURL.

type Storager

type Storager interface {
	// GetURLRecordByShortURL is used to get url record by short url
	GetURLRecordByShortURL(ctx contextx.Contextx, shortURL string) (record *model.ShortenedUrl, err error)

	// CreateURLRecord is used to create url record
	CreateURLRecord(ctx contextx.Contextx, record *model.ShortenedUrl) error
}

Storager is a shortening storage interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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