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