Documentation ¶
Index ¶
- Variables
- type MockMongoDataBase
- type MockMongoMgr
- type MockOrdersDataService
- func (m *MockOrdersDataService) Create(ctx context.Context, purchaseOrder *data.Order) (string, error)
- func (m *MockOrdersDataService) DeleteByID(ctx context.Context, id primitive.ObjectID) error
- func (m *MockOrdersDataService) GetAll(ctx context.Context, limit int64) (*[]data.Order, error)
- func (m *MockOrdersDataService) GetByID(ctx context.Context, id primitive.ObjectID) (*data.Order, error)
- func (m *MockOrdersDataService) Update(ctx context.Context, purchaseOrder *data.Order) error
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 ¶
func (m *MockMongoDataBase) Collection(_ string, _ ...*options.CollectionOptions) *mongo.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) DeleteByID ¶
Click to show internal directories.
Click to hide internal directories.