service

package
v0.0.0-...-b856168 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package service is a generated GoMock package.

Index

Constants

View Source
const (
	ErrCountSmallerThanOne = err.Const("count is smaller than 1")
	ErrFailedGetAllSources = err.Const("failed to retrieve all records")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MediumSourceStorer

type MediumSourceStorer interface {
	GetAllSourceData(ctx context.Context, userID string, page int) ([]store.Medium, error)
	UpdateSource(ctx context.Context, userID string, source store.Medium) error
}

MediumSourceStorer interface to retrieve medium sources

type MockMediumSourceStorer

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

MockMediumSourceStorer is a mock of MediumSourceStorer interface

func NewMockMediumSourceStorer

func NewMockMediumSourceStorer(ctrl *gomock.Controller) *MockMediumSourceStorer

NewMockMediumSourceStorer creates a new mock instance

func (*MockMediumSourceStorer) EXPECT

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

func (*MockMediumSourceStorer) GetAllSourceData

func (m *MockMediumSourceStorer) GetAllSourceData(arg0 context.Context, arg1 string, arg2 int) ([]store.Medium, error)

GetAllSourceData mocks base method

func (*MockMediumSourceStorer) UpdateSource

func (m *MockMediumSourceStorer) UpdateSource(arg0 context.Context, arg1 string, arg2 store.Medium) error

UpdateSource mocks base method

type MockMediumSourceStorerMockRecorder

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

MockMediumSourceStorerMockRecorder is the mock recorder for MockMediumSourceStorer

func (*MockMediumSourceStorerMockRecorder) GetAllSourceData

func (mr *MockMediumSourceStorerMockRecorder) GetAllSourceData(arg0, arg1, arg2 interface{}) *gomock.Call

GetAllSourceData indicates an expected call of GetAllSourceData

func (*MockMediumSourceStorerMockRecorder) UpdateSource

func (mr *MockMediumSourceStorerMockRecorder) UpdateSource(arg0, arg1, arg2 interface{}) *gomock.Call

UpdateSource indicates an expected call of UpdateSource

type Picker

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

Picker is where the main business logic of picking a source(s) to read for the user

func NewPicker

func NewPicker(store MediumSourceStorer) *Picker

NewPicker will create a new instance of Picker

func (*Picker) Pick

func (p *Picker) Pick(ctx context.Context, userID string, count int) ([]store.Source, error)

Pick will pick the source(s) for the user to read

Jump to

Keyboard shortcuts

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