repo

package
v0.0.0-...-fefde71 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: GPL-3.0 Imports: 5 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 IOrderRepo

type IOrderRepo interface {
	Create(c context.Context, order *model.Order) error
	GetByID(c context.Context, id string) (item *model.Order, err error)
	List(c context.Context, condition ListCondition) (items []*model.Order, total int, err error)
	Update(c context.Context, order *model.Order) error
}

IOrderRepo is an interface that defines the methods that the order repository should implement

type ListCondition

type ListCondition struct {
	UserID       string
	RestaurantID string

	Limit  int
	Offset int
}

ListCondition is a struct that defines the conditions for listing orders

type MockIOrderRepo

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

MockIOrderRepo is a mock of IOrderRepo interface.

func NewMockIOrderRepo

func NewMockIOrderRepo(ctrl *gomock.Controller) *MockIOrderRepo

NewMockIOrderRepo creates a new mock instance.

func (*MockIOrderRepo) Create

func (m *MockIOrderRepo) Create(ctx contextx.Contextx, order *model.Order) error

Create mocks base method.

func (*MockIOrderRepo) EXPECT

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

func (*MockIOrderRepo) GetByID

func (m *MockIOrderRepo) GetByID(ctx contextx.Contextx, id string) (*model.Order, error)

GetByID mocks base method.

func (*MockIOrderRepo) List

func (m *MockIOrderRepo) List(ctx contextx.Contextx, condition ListCondition) ([]*model.Order, int, error)

List mocks base method.

func (*MockIOrderRepo) Update

func (m *MockIOrderRepo) Update(ctx contextx.Contextx, order *model.Order) error

Update mocks base method.

type MockIOrderRepoMockRecorder

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

MockIOrderRepoMockRecorder is the mock recorder for MockIOrderRepo.

func (*MockIOrderRepoMockRecorder) Create

func (mr *MockIOrderRepoMockRecorder) Create(ctx, order any) *gomock.Call

Create indicates an expected call of Create.

func (*MockIOrderRepoMockRecorder) GetByID

func (mr *MockIOrderRepoMockRecorder) GetByID(ctx, id any) *gomock.Call

GetByID indicates an expected call of GetByID.

func (*MockIOrderRepoMockRecorder) List

func (mr *MockIOrderRepoMockRecorder) List(ctx, condition any) *gomock.Call

List indicates an expected call of List.

func (*MockIOrderRepoMockRecorder) Update

func (mr *MockIOrderRepoMockRecorder) Update(ctx, order any) *gomock.Call

Update indicates an expected call of Update.

Jump to

Keyboard shortcuts

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