Documentation ¶
Overview ¶
Package store defines the storage interface for Gd-Blog.
Package store is a generated GoMock package.
Index ¶
- type IStore
- type MockIStore
- type MockIStoreMockRecorder
- type MockPostStore
- func (m *MockPostStore) Create(arg0 context.Context, arg1 *model.PostM) error
- func (m *MockPostStore) Delete(arg0 context.Context, arg1 string, arg2 []string) error
- func (m *MockPostStore) EXPECT() *MockPostStoreMockRecorder
- func (m *MockPostStore) Get(arg0 context.Context, arg1, arg2 string) (*model.PostM, error)
- func (m *MockPostStore) List(arg0 context.Context, arg1 string, arg2, arg3 int) (int64, []*model.PostM, error)
- func (m *MockPostStore) Update(arg0 context.Context, arg1 *model.PostM) error
- type MockPostStoreMockRecorder
- func (mr *MockPostStoreMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockPostStoreMockRecorder) Delete(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockPostStoreMockRecorder) Get(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockPostStoreMockRecorder) List(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
- func (mr *MockPostStoreMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call
- type MockUserStore
- func (m *MockUserStore) Create(arg0 context.Context, arg1 *model.UserM) error
- func (m *MockUserStore) Delete(arg0 context.Context, arg1 string) error
- func (m *MockUserStore) EXPECT() *MockUserStoreMockRecorder
- func (m *MockUserStore) Get(arg0 context.Context, arg1 string) (*model.UserM, error)
- func (m *MockUserStore) List(arg0 context.Context, arg1, arg2 int) (int64, []*model.UserM, error)
- func (m *MockUserStore) Update(arg0 context.Context, arg1 *model.UserM) error
- type MockUserStoreMockRecorder
- func (mr *MockUserStoreMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockUserStoreMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockUserStoreMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockUserStoreMockRecorder) List(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockUserStoreMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call
- type PostStore
- type UserStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) DB ¶
func (mr *MockIStoreMockRecorder) DB() *gomock.Call
DB indicates an expected call of DB.
func (*MockIStoreMockRecorder) Posts ¶
func (mr *MockIStoreMockRecorder) Posts() *gomock.Call
Posts indicates an expected call of Posts.
func (*MockIStoreMockRecorder) Users ¶
func (mr *MockIStoreMockRecorder) Users() *gomock.Call
Users indicates an expected call of Users.
type MockPostStore ¶
type MockPostStore struct {
// contains filtered or unexported fields
}
MockPostStore is a mock of PostStore interface.
func NewMockPostStore ¶
func NewMockPostStore(ctrl *gomock.Controller) *MockPostStore
NewMockPostStore creates a new mock instance.
func (*MockPostStore) EXPECT ¶
func (m *MockPostStore) EXPECT() *MockPostStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockPostStoreMockRecorder ¶
type MockPostStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockPostStoreMockRecorder is the mock recorder for MockPostStore.
func (*MockPostStoreMockRecorder) Create ¶
func (mr *MockPostStoreMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call
Create indicates an expected call of Create.
func (*MockPostStoreMockRecorder) Delete ¶
func (mr *MockPostStoreMockRecorder) Delete(arg0, arg1, arg2 interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockPostStoreMockRecorder) Get ¶
func (mr *MockPostStoreMockRecorder) Get(arg0, arg1, arg2 interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockPostStoreMockRecorder) List ¶
func (mr *MockPostStoreMockRecorder) List(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
List indicates an expected call of List.
func (*MockPostStoreMockRecorder) Update ¶
func (mr *MockPostStoreMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call
Update indicates an expected call of Update.
type MockUserStore ¶
type MockUserStore struct {
// contains filtered or unexported fields
}
MockUserStore is a mock of UserStore interface.
func NewMockUserStore ¶
func NewMockUserStore(ctrl *gomock.Controller) *MockUserStore
NewMockUserStore creates a new mock instance.
func (*MockUserStore) Delete ¶
func (m *MockUserStore) Delete(arg0 context.Context, arg1 string) error
Delete mocks base method.
func (*MockUserStore) EXPECT ¶
func (m *MockUserStore) EXPECT() *MockUserStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockUserStoreMockRecorder ¶
type MockUserStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockUserStoreMockRecorder is the mock recorder for MockUserStore.
func (*MockUserStoreMockRecorder) Create ¶
func (mr *MockUserStoreMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call
Create indicates an expected call of Create.
func (*MockUserStoreMockRecorder) Delete ¶
func (mr *MockUserStoreMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockUserStoreMockRecorder) Get ¶
func (mr *MockUserStoreMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockUserStoreMockRecorder) List ¶
func (mr *MockUserStoreMockRecorder) List(arg0, arg1, arg2 interface{}) *gomock.Call
List indicates an expected call of List.
func (*MockUserStoreMockRecorder) Update ¶
func (mr *MockUserStoreMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call
Update indicates an expected call of Update.
type PostStore ¶
type PostStore interface { Create(ctx context.Context, post *model.PostM) error Get(ctx context.Context, username, postID string) (*model.PostM, error) Update(ctx context.Context, post *model.PostM) error List(ctx context.Context, username string, offset, limit int) (int64, []*model.PostM, error) Delete(ctx context.Context, username string, postIDs []string) error }
PostStore 定义了 post 模块在 store 层所实现的方法.
type UserStore ¶
type UserStore interface { Get(ctx context.Context, username string) (*model.UserM, error) Update(ctx context.Context, user *model.UserM) error Create(ctx context.Context, user *model.UserM) error List(ctx context.Context, offset, limit int) (int64, []*model.UserM, error) Delete(ctx context.Context, username string) error }
UserStore 定义了 user 模块在 store 层所实现的方法.