mocks

package
v0.0.0-...-95a4c08 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PingFunc func() error
)

Functions

This section is empty.

Types

type MockMongoDataBase

type MockMongoDataBase struct{}

func (*MockMongoDataBase) Collection

type MockMongoMgr

type MockMongoMgr struct{}

func (*MockMongoMgr) Database

func (m *MockMongoMgr) Database() db.MongoDatabase

func (*MockMongoMgr) Disconnect

func (m *MockMongoMgr) Disconnect() error

func (*MockMongoMgr) Ping

func (m *MockMongoMgr) Ping() error

type MockOrdersDataService

type MockOrdersDataService struct {
	CreateFunc     func(ctx context.Context, purchaseOrder *data.Order) (string, error)
	UpdateFunc     func(ctx context.Context, purchaseOrder *data.Order) error
	GetByIDFunc    func(ctx context.Context, id primitive.ObjectID) (*data.Order, error)
	GetAllFunc     func(ctx context.Context, limit int64) (*[]data.Order, error)
	DeleteByIDFunc func(ctx context.Context, id primitive.ObjectID) error
}

func (*MockOrdersDataService) Create

func (m *MockOrdersDataService) Create(ctx context.Context, purchaseOrder *data.Order) (string, error)

func (*MockOrdersDataService) DeleteByID

func (*MockOrdersDataService) GetAll

func (m *MockOrdersDataService) GetAll(ctx context.Context, limit int64) (*[]data.Order, error)

func (*MockOrdersDataService) GetByID

func (*MockOrdersDataService) Update

func (m *MockOrdersDataService) Update(ctx context.Context, purchaseOrder *data.Order) error

Jump to

Keyboard shortcuts

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