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.

Package model is a generated GoMock package.

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 Blog

type Blog struct {
	Id             int64          `db:"id"`
	Uuid           string         `db:"uuid"`
	AppUserUuid    sql.NullString `db:"app_user_uuid"`
	Name           sql.NullString `db:"name"`
	Description    sql.NullString `db:"description"`
	Published      sql.NullTime   `db:"published"`
	Updated        sql.NullTime   `db:"updated"`
	Url            sql.NullString `db:"url"`
	SelfLink       sql.NullString `db:"self_link"`
	CustomMetaData sql.NullString `db:"custom_meta_data"`
}

type BlogModel

type BlogModel interface {
	FindOneByUrl(ctx context.Context, url string) (*Blog, error)
	ListByAppUserUuid(ctx context.Context, appUserUuid string) ([]*Blog, error)
	// contains filtered or unexported methods
}

BlogModel is an interface to be customized, add more methods here, and implement the added methods in customBlogModel.

func NewBlogModel

func NewBlogModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) BlogModel

NewBlogModel returns a model for the database table.

type BlogUserInfo

type BlogUserInfo struct {
	Id             int64          `db:"id"`
	Uuid           string         `db:"uuid"`
	UserUuid       sql.NullString `db:"user_uuid"`
	BlogUuid       sql.NullString `db:"blog_uuid"`
	PhotosAlbumKey sql.NullString `db:"photos_album_key"`
	HasAdminAccess sql.NullBool   `db:"has_admin_access"`
}

type BlogUserInfoModel

type BlogUserInfoModel interface {
	FindOneByUserUuidAndBlogUuid(ctx context.Context, userUuid string, blogUuid string) (*BlogUserInfo, error)
	// contains filtered or unexported methods
}

BlogUserInfoModel is an interface to be customized, add more methods here, and implement the added methods in customBlogUserInfoModel.

func NewBlogUserInfoModel

func NewBlogUserInfoModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) BlogUserInfoModel

NewBlogUserInfoModel returns a model for the database table.

type MockBlogModel

type MockBlogModel struct {
	// contains filtered or unexported fields
}

MockBlogModel is a mock of BlogModel interface.

func NewMockBlogModel

func NewMockBlogModel(ctrl *gomock.Controller) *MockBlogModel

NewMockBlogModel creates a new mock instance.

func (*MockBlogModel) Delete

func (m *MockBlogModel) Delete(arg0 context.Context, arg1 int64) error

Delete mocks base method.

func (*MockBlogModel) EXPECT

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

func (*MockBlogModel) FindOne

func (m *MockBlogModel) FindOne(arg0 context.Context, arg1 int64) (*Blog, error)

FindOne mocks base method.

func (*MockBlogModel) FindOneByUrl

func (m *MockBlogModel) FindOneByUrl(arg0 context.Context, arg1 string) (*Blog, error)

FindOneByUrl mocks base method.

func (*MockBlogModel) FindOneByUuid

func (m *MockBlogModel) FindOneByUuid(arg0 context.Context, arg1 string) (*Blog, error)

FindOneByUuid mocks base method.

func (*MockBlogModel) Insert

func (m *MockBlogModel) Insert(arg0 context.Context, arg1 *Blog) (sql.Result, error)

Insert mocks base method.

func (*MockBlogModel) ListByAppUserUuid

func (m *MockBlogModel) ListByAppUserUuid(arg0 context.Context, arg1 string) ([]*Blog, error)

ListByAppUserUuid mocks base method.

func (*MockBlogModel) Update

func (m *MockBlogModel) Update(arg0 context.Context, arg1 *Blog) error

Update mocks base method.

type MockBlogModelMockRecorder

type MockBlogModelMockRecorder struct {
	// contains filtered or unexported fields
}

MockBlogModelMockRecorder is the mock recorder for MockBlogModel.

func (*MockBlogModelMockRecorder) Delete

func (mr *MockBlogModelMockRecorder) Delete(arg0, arg1 any) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockBlogModelMockRecorder) FindOne

func (mr *MockBlogModelMockRecorder) FindOne(arg0, arg1 any) *gomock.Call

FindOne indicates an expected call of FindOne.

func (*MockBlogModelMockRecorder) FindOneByUrl

func (mr *MockBlogModelMockRecorder) FindOneByUrl(arg0, arg1 any) *gomock.Call

FindOneByUrl indicates an expected call of FindOneByUrl.

func (*MockBlogModelMockRecorder) FindOneByUuid

func (mr *MockBlogModelMockRecorder) FindOneByUuid(arg0, arg1 any) *gomock.Call

FindOneByUuid indicates an expected call of FindOneByUuid.

func (*MockBlogModelMockRecorder) Insert

func (mr *MockBlogModelMockRecorder) Insert(arg0, arg1 any) *gomock.Call

Insert indicates an expected call of Insert.

func (*MockBlogModelMockRecorder) ListByAppUserUuid

func (mr *MockBlogModelMockRecorder) ListByAppUserUuid(arg0, arg1 any) *gomock.Call

ListByAppUserUuid indicates an expected call of ListByAppUserUuid.

func (*MockBlogModelMockRecorder) Update

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

Update indicates an expected call of Update.

type MockBlogUserInfoModel

type MockBlogUserInfoModel struct {
	// contains filtered or unexported fields
}

MockBlogUserInfoModel is a mock of BlogUserInfoModel interface.

func NewMockBlogUserInfoModel

func NewMockBlogUserInfoModel(ctrl *gomock.Controller) *MockBlogUserInfoModel

NewMockBlogUserInfoModel creates a new mock instance.

func (*MockBlogUserInfoModel) Delete

func (m *MockBlogUserInfoModel) Delete(arg0 context.Context, arg1 int64) error

Delete mocks base method.

func (*MockBlogUserInfoModel) EXPECT

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

func (*MockBlogUserInfoModel) FindOne

func (m *MockBlogUserInfoModel) FindOne(arg0 context.Context, arg1 int64) (*BlogUserInfo, error)

FindOne mocks base method.

func (*MockBlogUserInfoModel) FindOneByUserUuidAndBlogUuid

func (m *MockBlogUserInfoModel) FindOneByUserUuidAndBlogUuid(arg0 context.Context, arg1, arg2 string) (*BlogUserInfo, error)

FindOneByUserUuidAndBlogUuid mocks base method.

func (*MockBlogUserInfoModel) FindOneByUuid

func (m *MockBlogUserInfoModel) FindOneByUuid(arg0 context.Context, arg1 string) (*BlogUserInfo, error)

FindOneByUuid mocks base method.

func (*MockBlogUserInfoModel) Insert

func (m *MockBlogUserInfoModel) Insert(arg0 context.Context, arg1 *BlogUserInfo) (sql.Result, error)

Insert mocks base method.

func (*MockBlogUserInfoModel) Update

func (m *MockBlogUserInfoModel) Update(arg0 context.Context, arg1 *BlogUserInfo) error

Update mocks base method.

type MockBlogUserInfoModelMockRecorder

type MockBlogUserInfoModelMockRecorder struct {
	// contains filtered or unexported fields
}

MockBlogUserInfoModelMockRecorder is the mock recorder for MockBlogUserInfoModel.

func (*MockBlogUserInfoModelMockRecorder) Delete

func (mr *MockBlogUserInfoModelMockRecorder) Delete(arg0, arg1 any) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockBlogUserInfoModelMockRecorder) FindOne

func (mr *MockBlogUserInfoModelMockRecorder) FindOne(arg0, arg1 any) *gomock.Call

FindOne indicates an expected call of FindOne.

func (*MockBlogUserInfoModelMockRecorder) FindOneByUserUuidAndBlogUuid

func (mr *MockBlogUserInfoModelMockRecorder) FindOneByUserUuidAndBlogUuid(arg0, arg1, arg2 any) *gomock.Call

FindOneByUserUuidAndBlogUuid indicates an expected call of FindOneByUserUuidAndBlogUuid.

func (*MockBlogUserInfoModelMockRecorder) FindOneByUuid

func (mr *MockBlogUserInfoModelMockRecorder) FindOneByUuid(arg0, arg1 any) *gomock.Call

FindOneByUuid indicates an expected call of FindOneByUuid.

func (*MockBlogUserInfoModelMockRecorder) Insert

func (mr *MockBlogUserInfoModelMockRecorder) Insert(arg0, arg1 any) *gomock.Call

Insert indicates an expected call of Insert.

func (*MockBlogUserInfoModelMockRecorder) Update

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

Update indicates an expected call of Update.

type MockPageViewsModel

type MockPageViewsModel struct {
	// contains filtered or unexported fields
}

MockPageViewsModel is a mock of PageViewsModel interface.

func NewMockPageViewsModel

func NewMockPageViewsModel(ctrl *gomock.Controller) *MockPageViewsModel

NewMockPageViewsModel creates a new mock instance.

func (*MockPageViewsModel) Delete

func (m *MockPageViewsModel) Delete(arg0 context.Context, arg1 int64) error

Delete mocks base method.

func (*MockPageViewsModel) EXPECT

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

func (*MockPageViewsModel) FindOne

func (m *MockPageViewsModel) FindOne(arg0 context.Context, arg1 int64) (*PageViews, error)

FindOne mocks base method.

func (*MockPageViewsModel) FindOneByBlogUuid

func (m *MockPageViewsModel) FindOneByBlogUuid(arg0 context.Context, arg1 string) (*PageViews, error)

FindOneByBlogUuid mocks base method.

func (*MockPageViewsModel) FindOneByUuid

func (m *MockPageViewsModel) FindOneByUuid(arg0 context.Context, arg1 string) (*PageViews, error)

FindOneByUuid mocks base method.

func (*MockPageViewsModel) Insert

func (m *MockPageViewsModel) Insert(arg0 context.Context, arg1 *PageViews) (sql.Result, error)

Insert mocks base method.

func (*MockPageViewsModel) Update

func (m *MockPageViewsModel) Update(arg0 context.Context, arg1 *PageViews) error

Update mocks base method.

type MockPageViewsModelMockRecorder

type MockPageViewsModelMockRecorder struct {
	// contains filtered or unexported fields
}

MockPageViewsModelMockRecorder is the mock recorder for MockPageViewsModel.

func (*MockPageViewsModelMockRecorder) Delete

func (mr *MockPageViewsModelMockRecorder) Delete(arg0, arg1 any) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockPageViewsModelMockRecorder) FindOne

func (mr *MockPageViewsModelMockRecorder) FindOne(arg0, arg1 any) *gomock.Call

FindOne indicates an expected call of FindOne.

func (*MockPageViewsModelMockRecorder) FindOneByBlogUuid

func (mr *MockPageViewsModelMockRecorder) FindOneByBlogUuid(arg0, arg1 any) *gomock.Call

FindOneByBlogUuid indicates an expected call of FindOneByBlogUuid.

func (*MockPageViewsModelMockRecorder) FindOneByUuid

func (mr *MockPageViewsModelMockRecorder) FindOneByUuid(arg0, arg1 any) *gomock.Call

FindOneByUuid indicates an expected call of FindOneByUuid.

func (*MockPageViewsModelMockRecorder) Insert

func (mr *MockPageViewsModelMockRecorder) Insert(arg0, arg1 any) *gomock.Call

Insert indicates an expected call of Insert.

func (*MockPageViewsModelMockRecorder) Update

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

Update indicates an expected call of Update.

type PageViews

type PageViews struct {
	Id       int64         `db:"id"`
	Uuid     string        `db:"uuid"`
	BlogUuid string        `db:"blog_uuid"`
	Count    sql.NullInt64 `db:"count"`
}

type PageViewsModel

type PageViewsModel interface {
	// contains filtered or unexported methods
}

PageViewsModel is an interface to be customized, add more methods here, and implement the added methods in customPageViewsModel.

func NewPageViewsModel

func NewPageViewsModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) PageViewsModel

NewPageViewsModel 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