Documentation ¶
Overview ¶
Package store defines the storage interface for fakeserver.
Package store is a generated GoMock package.
Index ¶
- func SetStore(store IStore)
- type IStore
- type MockIStore
- type MockIStoreMockRecorder
- type MockOrderStore
- func (m *MockOrderStore) Create(arg0 context.Context, arg1 *model.OrderM) error
- func (m *MockOrderStore) Delete(arg0 context.Context, arg1 string) error
- func (m *MockOrderStore) EXPECT() *MockOrderStoreMockRecorder
- func (m *MockOrderStore) Get(arg0 context.Context, arg1 string) (*model.OrderM, error)
- func (m *MockOrderStore) List(arg0 context.Context, arg1 ...meta.ListOption) (int64, []*model.OrderM, error)
- func (m *MockOrderStore) Update(arg0 context.Context, arg1 *model.OrderM) error
- type MockOrderStoreMockRecorder
- func (mr *MockOrderStoreMockRecorder) Create(arg0, arg1 any) *gomock.Call
- func (mr *MockOrderStoreMockRecorder) Delete(arg0, arg1 any) *gomock.Call
- func (mr *MockOrderStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call
- func (mr *MockOrderStoreMockRecorder) List(arg0 any, arg1 ...any) *gomock.Call
- func (mr *MockOrderStoreMockRecorder) Update(arg0, arg1 any) *gomock.Call
- type OrderStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IStore ¶
type IStore interface {
Orders() OrderStore
}
IStore 定义了 Store 层需要实现的方法.
var ( // 全局变量,方便其它包直接调用已初始化好的 S 实例. S IStore )
type MockIStore ¶
type MockIStore struct {
// contains filtered or unexported fields
}
MockIStore is a mock of IStore interface.
func NewMockIStore ¶
func NewMockIStore(ctrl *gomock.Controller) *MockIStore
NewMockIStore creates a new mock instance.
func (*MockIStore) EXPECT ¶
func (m *MockIStore) EXPECT() *MockIStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockIStoreMockRecorder ¶
type MockIStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockIStoreMockRecorder is the mock recorder for MockIStore.
func (*MockIStoreMockRecorder) Orders ¶
func (mr *MockIStoreMockRecorder) Orders() *gomock.Call
Orders indicates an expected call of Orders.
type MockOrderStore ¶
type MockOrderStore struct {
// contains filtered or unexported fields
}
MockOrderStore is a mock of OrderStore interface.
func NewMockOrderStore ¶
func NewMockOrderStore(ctrl *gomock.Controller) *MockOrderStore
NewMockOrderStore creates a new mock instance.
func (*MockOrderStore) Delete ¶
func (m *MockOrderStore) Delete(arg0 context.Context, arg1 string) error
Delete mocks base method.
func (*MockOrderStore) EXPECT ¶
func (m *MockOrderStore) EXPECT() *MockOrderStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockOrderStoreMockRecorder ¶
type MockOrderStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockOrderStoreMockRecorder is the mock recorder for MockOrderStore.
func (*MockOrderStoreMockRecorder) Create ¶
func (mr *MockOrderStoreMockRecorder) Create(arg0, arg1 any) *gomock.Call
Create indicates an expected call of Create.
func (*MockOrderStoreMockRecorder) Delete ¶
func (mr *MockOrderStoreMockRecorder) Delete(arg0, arg1 any) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockOrderStoreMockRecorder) Get ¶
func (mr *MockOrderStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call
Get indicates an expected call of Get.
type OrderStore ¶
type OrderStore interface { Create(ctx context.Context, order *model.OrderM) error Get(ctx context.Context, orderID string) (*model.OrderM, error) Update(ctx context.Context, order *model.OrderM) error List(ctx context.Context, opts ...meta.ListOption) (int64, []*model.OrderM, error) Delete(ctx context.Context, orderID string) error }
OrderStore 定义了 order 模块在 store 层所实现的方法.