Documentation ¶
Overview ¶
Package model is a generated GoMock package.
Index ¶
- Variables
- type Comment
- type CommentModel
- type MockCommentModel
- func (m *MockCommentModel) Delete(arg0 context.Context, arg1 int64) error
- func (m *MockCommentModel) EXPECT() *MockCommentModelMockRecorder
- func (m *MockCommentModel) FindOne(arg0 context.Context, arg1 int64) (*Comment, error)
- func (m *MockCommentModel) FindOneByUuid(arg0 context.Context, arg1 string) (*Comment, error)
- func (m *MockCommentModel) Insert(arg0 context.Context, arg1 *Comment) (sql.Result, error)
- func (m *MockCommentModel) ListByBlogUuid(arg0 context.Context, arg1 string) ([]*Comment, error)
- func (m *MockCommentModel) ListByBlogUuidAndPostUuid(arg0 context.Context, arg1, arg2 string) ([]*Comment, error)
- func (m *MockCommentModel) Update(arg0 context.Context, arg1 *Comment) error
- type MockCommentModelMockRecorder
- func (mr *MockCommentModelMockRecorder) Delete(arg0, arg1 any) *gomock.Call
- func (mr *MockCommentModelMockRecorder) FindOne(arg0, arg1 any) *gomock.Call
- func (mr *MockCommentModelMockRecorder) FindOneByUuid(arg0, arg1 any) *gomock.Call
- func (mr *MockCommentModelMockRecorder) Insert(arg0, arg1 any) *gomock.Call
- func (mr *MockCommentModelMockRecorder) ListByBlogUuid(arg0, arg1 any) *gomock.Call
- func (mr *MockCommentModelMockRecorder) ListByBlogUuidAndPostUuid(arg0, arg1, arg2 any) *gomock.Call
- func (mr *MockCommentModelMockRecorder) Update(arg0, arg1 any) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = sqlx.ErrNotFound
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct { Id int64 `db:"id"` Uuid string `db:"uuid"` BlogUuid sql.NullString `db:"blog_uuid"` PostUuid sql.NullString `db:"post_uuid"` Status sql.NullString `db:"status"` Published sql.NullTime `db:"published"` Updated sql.NullTime `db:"updated"` SelfLink sql.NullString `db:"self_link"` Content sql.NullString `db:"content"` }
type CommentModel ¶
type CommentModel interface { ListByBlogUuidAndPostUuid(ctx context.Context, blogUuid, postUuid string) ([]*Comment, error) ListByBlogUuid(ctx context.Context, blogUuid string) ([]*Comment, error) // contains filtered or unexported methods }
CommentModel is an interface to be customized, add more methods here, and implement the added methods in customCommentModel.
func NewCommentModel ¶
NewCommentModel returns a model for the database table.
type MockCommentModel ¶
type MockCommentModel struct {
// contains filtered or unexported fields
}
MockCommentModel is a mock of CommentModel interface.
func NewMockCommentModel ¶
func NewMockCommentModel(ctrl *gomock.Controller) *MockCommentModel
NewMockCommentModel creates a new mock instance.
func (*MockCommentModel) Delete ¶
func (m *MockCommentModel) Delete(arg0 context.Context, arg1 int64) error
Delete mocks base method.
func (*MockCommentModel) EXPECT ¶
func (m *MockCommentModel) EXPECT() *MockCommentModelMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCommentModel) FindOneByUuid ¶
FindOneByUuid mocks base method.
func (*MockCommentModel) ListByBlogUuid ¶
ListByBlogUuid mocks base method.
func (*MockCommentModel) ListByBlogUuidAndPostUuid ¶
func (m *MockCommentModel) ListByBlogUuidAndPostUuid(arg0 context.Context, arg1, arg2 string) ([]*Comment, error)
ListByBlogUuidAndPostUuid mocks base method.
type MockCommentModelMockRecorder ¶
type MockCommentModelMockRecorder struct {
// contains filtered or unexported fields
}
MockCommentModelMockRecorder is the mock recorder for MockCommentModel.
func (*MockCommentModelMockRecorder) Delete ¶
func (mr *MockCommentModelMockRecorder) Delete(arg0, arg1 any) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockCommentModelMockRecorder) FindOne ¶
func (mr *MockCommentModelMockRecorder) FindOne(arg0, arg1 any) *gomock.Call
FindOne indicates an expected call of FindOne.
func (*MockCommentModelMockRecorder) FindOneByUuid ¶
func (mr *MockCommentModelMockRecorder) FindOneByUuid(arg0, arg1 any) *gomock.Call
FindOneByUuid indicates an expected call of FindOneByUuid.
func (*MockCommentModelMockRecorder) Insert ¶
func (mr *MockCommentModelMockRecorder) Insert(arg0, arg1 any) *gomock.Call
Insert indicates an expected call of Insert.
func (*MockCommentModelMockRecorder) ListByBlogUuid ¶
func (mr *MockCommentModelMockRecorder) ListByBlogUuid(arg0, arg1 any) *gomock.Call
ListByBlogUuid indicates an expected call of ListByBlogUuid.
func (*MockCommentModelMockRecorder) ListByBlogUuidAndPostUuid ¶
func (mr *MockCommentModelMockRecorder) ListByBlogUuidAndPostUuid(arg0, arg1, arg2 any) *gomock.Call
ListByBlogUuidAndPostUuid indicates an expected call of ListByBlogUuidAndPostUuid.