model

package
v0.0.0-...-29acfd5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package model is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
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

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPageModel) FindOne

func (m *MockPageModel) FindOne(arg0 context.Context, arg1 int64) (*Page, error)

FindOne mocks base method.

func (*MockPageModel) FindOneByBlogUuidAndPageUuid

func (m *MockPageModel) FindOneByBlogUuidAndPageUuid(arg0 context.Context, arg1, arg2 string) (*Page, error)

FindOneByBlogUuidAndPageUuid mocks base method.

func (*MockPageModel) FindOneByUuid

func (m *MockPageModel) FindOneByUuid(arg0 context.Context, arg1 string) (*Page, error)

FindOneByUuid mocks base method.

func (*MockPageModel) Insert

func (m *MockPageModel) Insert(arg0 context.Context, arg1 *Page) (sql.Result, error)

Insert mocks base method.

func (*MockPageModel) ListByBlogUuid

func (m *MockPageModel) ListByBlogUuid(arg0 context.Context, arg1 string) ([]*Page, error)

ListByBlogUuid mocks base method.

func (*MockPageModel) Update

func (m *MockPageModel) Update(arg0 context.Context, arg1 *Page) error

Update 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.

func (*MockPageModelMockRecorder) Update

func (mr *MockPageModelMockRecorder) Update(arg0, arg1 any) *gomock.Call

Update indicates an expected call of Update.

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.

func NewPageModel

func NewPageModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) PageModel

NewPageModel returns a model for the database table.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL