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.

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 Author

type Author struct {
	Id          int64          `db:"id"`
	Uuid        string         `db:"uuid"`
	PostUuid    string         `db:"post_uuid"`
	PageUuid    string         `db:"page_uuid"`
	CommentUuid string         `db:"comment_uuid"`
	DisplayName sql.NullString `db:"display_name"`
	Url         sql.NullString `db:"url"`
}

type AuthorModel

type AuthorModel interface {
	ListByPostUuid(ctx context.Context, postUuid string) ([]*Author, error)
	// contains filtered or unexported methods
}

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

func NewAuthorModel

func NewAuthorModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) AuthorModel

NewAuthorModel returns a model for the database table.

type Image

type Image struct {
	Id         int64          `db:"id"`
	Uuid       string         `db:"uuid"`
	PostUuid   sql.NullString `db:"post_uuid"`
	AuthorUuid string         `db:"author_uuid"`
	Url        sql.NullString `db:"url"`
}

type ImageModel

type ImageModel interface {
	ListByPostUuid(ctx context.Context, postUuid string) ([]*Image, error)
	// contains filtered or unexported methods
}

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

func NewImageModel

func NewImageModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) ImageModel

NewImageModel returns a model for the database table.

type Label

type Label struct {
	Id         int64          `db:"id"`
	Uuid       string         `db:"uuid"`
	PostUuid   sql.NullString `db:"post_uuid"`
	LabelValue sql.NullString `db:"label_value"`
}

type LabelModel

type LabelModel interface {
	ListByPostUuid(ctx context.Context, postUuid string) ([]*Label, error)
	// contains filtered or unexported methods
}

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

func NewLabelModel

func NewLabelModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) LabelModel

NewLabelModel returns a model for the database table.

type Location

type Location struct {
	Id       int64           `db:"id"`
	Uuid     string          `db:"uuid"`
	PostUuid string          `db:"post_uuid"`
	Name     sql.NullString  `db:"name"`
	Lat      sql.NullFloat64 `db:"lat"`
	Lng      sql.NullFloat64 `db:"lng"`
	Span     sql.NullString  `db:"span"`
}

type LocationModel

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

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

func NewLocationModel

func NewLocationModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) LocationModel

NewLocationModel returns a model for the database table.

type MockAuthorModel

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

MockAuthorModel is a mock of AuthorModel interface.

func NewMockAuthorModel

func NewMockAuthorModel(ctrl *gomock.Controller) *MockAuthorModel

NewMockAuthorModel creates a new mock instance.

func (*MockAuthorModel) Delete

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

Delete mocks base method.

func (*MockAuthorModel) EXPECT

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

func (*MockAuthorModel) FindOne

func (m *MockAuthorModel) FindOne(arg0 context.Context, arg1 int64) (*Author, error)

FindOne mocks base method.

func (*MockAuthorModel) FindOneByCommentUuid

func (m *MockAuthorModel) FindOneByCommentUuid(arg0 context.Context, arg1 string) (*Author, error)

FindOneByCommentUuid mocks base method.

func (*MockAuthorModel) FindOneByPageUuid

func (m *MockAuthorModel) FindOneByPageUuid(arg0 context.Context, arg1 string) (*Author, error)

FindOneByPageUuid mocks base method.

func (*MockAuthorModel) FindOneByPostUuid

func (m *MockAuthorModel) FindOneByPostUuid(arg0 context.Context, arg1 string) (*Author, error)

FindOneByPostUuid mocks base method.

func (*MockAuthorModel) FindOneByUuid

func (m *MockAuthorModel) FindOneByUuid(arg0 context.Context, arg1 string) (*Author, error)

FindOneByUuid mocks base method.

func (*MockAuthorModel) Insert

func (m *MockAuthorModel) Insert(arg0 context.Context, arg1 *Author) (sql.Result, error)

Insert mocks base method.

func (*MockAuthorModel) ListByPostUuid

func (m *MockAuthorModel) ListByPostUuid(arg0 context.Context, arg1 string) ([]*Author, error)

ListByPostUuid mocks base method.

func (*MockAuthorModel) Update

func (m *MockAuthorModel) Update(arg0 context.Context, arg1 *Author) error

Update mocks base method.

type MockAuthorModelMockRecorder

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

MockAuthorModelMockRecorder is the mock recorder for MockAuthorModel.

func (*MockAuthorModelMockRecorder) Delete

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

Delete indicates an expected call of Delete.

func (*MockAuthorModelMockRecorder) FindOne

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

FindOne indicates an expected call of FindOne.

func (*MockAuthorModelMockRecorder) FindOneByCommentUuid

func (mr *MockAuthorModelMockRecorder) FindOneByCommentUuid(arg0, arg1 any) *gomock.Call

FindOneByCommentUuid indicates an expected call of FindOneByCommentUuid.

func (*MockAuthorModelMockRecorder) FindOneByPageUuid

func (mr *MockAuthorModelMockRecorder) FindOneByPageUuid(arg0, arg1 any) *gomock.Call

FindOneByPageUuid indicates an expected call of FindOneByPageUuid.

func (*MockAuthorModelMockRecorder) FindOneByPostUuid

func (mr *MockAuthorModelMockRecorder) FindOneByPostUuid(arg0, arg1 any) *gomock.Call

FindOneByPostUuid indicates an expected call of FindOneByPostUuid.

func (*MockAuthorModelMockRecorder) FindOneByUuid

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

FindOneByUuid indicates an expected call of FindOneByUuid.

func (*MockAuthorModelMockRecorder) Insert

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

Insert indicates an expected call of Insert.

func (*MockAuthorModelMockRecorder) ListByPostUuid

func (mr *MockAuthorModelMockRecorder) ListByPostUuid(arg0, arg1 any) *gomock.Call

ListByPostUuid indicates an expected call of ListByPostUuid.

func (*MockAuthorModelMockRecorder) Update

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

Update indicates an expected call of Update.

type MockImageModel

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

MockImageModel is a mock of ImageModel interface.

func NewMockImageModel

func NewMockImageModel(ctrl *gomock.Controller) *MockImageModel

NewMockImageModel creates a new mock instance.

func (*MockImageModel) Delete

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

Delete mocks base method.

func (*MockImageModel) EXPECT

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

func (*MockImageModel) FindOne

func (m *MockImageModel) FindOne(arg0 context.Context, arg1 int64) (*Image, error)

FindOne mocks base method.

func (*MockImageModel) FindOneByAuthorUuid

func (m *MockImageModel) FindOneByAuthorUuid(arg0 context.Context, arg1 string) (*Image, error)

FindOneByAuthorUuid mocks base method.

func (*MockImageModel) FindOneByUuid

func (m *MockImageModel) FindOneByUuid(arg0 context.Context, arg1 string) (*Image, error)

FindOneByUuid mocks base method.

func (*MockImageModel) Insert

func (m *MockImageModel) Insert(arg0 context.Context, arg1 *Image) (sql.Result, error)

Insert mocks base method.

func (*MockImageModel) ListByPostUuid

func (m *MockImageModel) ListByPostUuid(arg0 context.Context, arg1 string) ([]*Image, error)

ListByPostUuid mocks base method.

func (*MockImageModel) Update

func (m *MockImageModel) Update(arg0 context.Context, arg1 *Image) error

Update mocks base method.

type MockImageModelMockRecorder

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

MockImageModelMockRecorder is the mock recorder for MockImageModel.

func (*MockImageModelMockRecorder) Delete

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

Delete indicates an expected call of Delete.

func (*MockImageModelMockRecorder) FindOne

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

FindOne indicates an expected call of FindOne.

func (*MockImageModelMockRecorder) FindOneByAuthorUuid

func (mr *MockImageModelMockRecorder) FindOneByAuthorUuid(arg0, arg1 any) *gomock.Call

FindOneByAuthorUuid indicates an expected call of FindOneByAuthorUuid.

func (*MockImageModelMockRecorder) FindOneByUuid

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

FindOneByUuid indicates an expected call of FindOneByUuid.

func (*MockImageModelMockRecorder) Insert

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

Insert indicates an expected call of Insert.

func (*MockImageModelMockRecorder) ListByPostUuid

func (mr *MockImageModelMockRecorder) ListByPostUuid(arg0, arg1 any) *gomock.Call

ListByPostUuid indicates an expected call of ListByPostUuid.

func (*MockImageModelMockRecorder) Update

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

Update indicates an expected call of Update.

type MockLabelModel

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

MockLabelModel is a mock of LabelModel interface.

func NewMockLabelModel

func NewMockLabelModel(ctrl *gomock.Controller) *MockLabelModel

NewMockLabelModel creates a new mock instance.

func (*MockLabelModel) Delete

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

Delete mocks base method.

func (*MockLabelModel) EXPECT

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

func (*MockLabelModel) FindOne

func (m *MockLabelModel) FindOne(arg0 context.Context, arg1 int64) (*Label, error)

FindOne mocks base method.

func (*MockLabelModel) FindOneByUuid

func (m *MockLabelModel) FindOneByUuid(arg0 context.Context, arg1 string) (*Label, error)

FindOneByUuid mocks base method.

func (*MockLabelModel) Insert

func (m *MockLabelModel) Insert(arg0 context.Context, arg1 *Label) (sql.Result, error)

Insert mocks base method.

func (*MockLabelModel) ListByPostUuid

func (m *MockLabelModel) ListByPostUuid(arg0 context.Context, arg1 string) ([]*Label, error)

ListByPostUuid mocks base method.

func (*MockLabelModel) Update

func (m *MockLabelModel) Update(arg0 context.Context, arg1 *Label) error

Update mocks base method.

type MockLabelModelMockRecorder

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

MockLabelModelMockRecorder is the mock recorder for MockLabelModel.

func (*MockLabelModelMockRecorder) Delete

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

Delete indicates an expected call of Delete.

func (*MockLabelModelMockRecorder) FindOne

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

FindOne indicates an expected call of FindOne.

func (*MockLabelModelMockRecorder) FindOneByUuid

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

FindOneByUuid indicates an expected call of FindOneByUuid.

func (*MockLabelModelMockRecorder) Insert

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

Insert indicates an expected call of Insert.

func (*MockLabelModelMockRecorder) ListByPostUuid

func (mr *MockLabelModelMockRecorder) ListByPostUuid(arg0, arg1 any) *gomock.Call

ListByPostUuid indicates an expected call of ListByPostUuid.

func (*MockLabelModelMockRecorder) Update

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

Update indicates an expected call of Update.

type MockLocationModel

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

MockLocationModel is a mock of LocationModel interface.

func NewMockLocationModel

func NewMockLocationModel(ctrl *gomock.Controller) *MockLocationModel

NewMockLocationModel creates a new mock instance.

func (*MockLocationModel) Delete

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

Delete mocks base method.

func (*MockLocationModel) EXPECT

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

func (*MockLocationModel) FindOne

func (m *MockLocationModel) FindOne(arg0 context.Context, arg1 int64) (*Location, error)

FindOne mocks base method.

func (*MockLocationModel) FindOneByPostUuid

func (m *MockLocationModel) FindOneByPostUuid(arg0 context.Context, arg1 string) (*Location, error)

FindOneByPostUuid mocks base method.

func (*MockLocationModel) FindOneByUuid

func (m *MockLocationModel) FindOneByUuid(arg0 context.Context, arg1 string) (*Location, error)

FindOneByUuid mocks base method.

func (*MockLocationModel) Insert

func (m *MockLocationModel) Insert(arg0 context.Context, arg1 *Location) (sql.Result, error)

Insert mocks base method.

func (*MockLocationModel) Update

func (m *MockLocationModel) Update(arg0 context.Context, arg1 *Location) error

Update mocks base method.

type MockLocationModelMockRecorder

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

MockLocationModelMockRecorder is the mock recorder for MockLocationModel.

func (*MockLocationModelMockRecorder) Delete

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

Delete indicates an expected call of Delete.

func (*MockLocationModelMockRecorder) FindOne

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

FindOne indicates an expected call of FindOne.

func (*MockLocationModelMockRecorder) FindOneByPostUuid

func (mr *MockLocationModelMockRecorder) FindOneByPostUuid(arg0, arg1 any) *gomock.Call

FindOneByPostUuid indicates an expected call of FindOneByPostUuid.

func (*MockLocationModelMockRecorder) FindOneByUuid

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

FindOneByUuid indicates an expected call of FindOneByUuid.

func (*MockLocationModelMockRecorder) Insert

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

Insert indicates an expected call of Insert.

func (*MockLocationModelMockRecorder) Update

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

Update indicates an expected call of Update.

type MockPostModel

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

MockPostModel is a mock of PostModel interface.

func NewMockPostModel

func NewMockPostModel(ctrl *gomock.Controller) *MockPostModel

NewMockPostModel creates a new mock instance.

func (*MockPostModel) Delete

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

Delete mocks base method.

func (*MockPostModel) EXPECT

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

func (*MockPostModel) FindOne

func (m *MockPostModel) FindOne(arg0 context.Context, arg1 int64) (*Post, error)

FindOne mocks base method.

func (*MockPostModel) FindOneByBlogUuidAndPostUuid

func (m *MockPostModel) FindOneByBlogUuidAndPostUuid(arg0 context.Context, arg1, arg2 string) (*Post, error)

FindOneByBlogUuidAndPostUuid mocks base method.

func (*MockPostModel) FindOneByUrl

func (m *MockPostModel) FindOneByUrl(arg0 context.Context, arg1 string) (*Post, error)

FindOneByUrl mocks base method.

func (*MockPostModel) FindOneByUuid

func (m *MockPostModel) FindOneByUuid(arg0 context.Context, arg1 string) (*Post, error)

FindOneByUuid mocks base method.

func (*MockPostModel) Insert

func (m *MockPostModel) Insert(arg0 context.Context, arg1 *Post) (sql.Result, error)

Insert mocks base method.

func (*MockPostModel) ListByBlogUuid

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

ListByBlogUuid mocks base method.

func (*MockPostModel) SearchByTitle

func (m *MockPostModel) SearchByTitle(arg0 context.Context, arg1, arg2 string) ([]*Post, error)

SearchByTitle mocks base method.

func (*MockPostModel) Update

func (m *MockPostModel) Update(arg0 context.Context, arg1 *Post) error

Update mocks base method.

type MockPostModelMockRecorder

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

MockPostModelMockRecorder is the mock recorder for MockPostModel.

func (*MockPostModelMockRecorder) Delete

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

Delete indicates an expected call of Delete.

func (*MockPostModelMockRecorder) FindOne

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

FindOne indicates an expected call of FindOne.

func (*MockPostModelMockRecorder) FindOneByBlogUuidAndPostUuid

func (mr *MockPostModelMockRecorder) FindOneByBlogUuidAndPostUuid(arg0, arg1, arg2 any) *gomock.Call

FindOneByBlogUuidAndPostUuid indicates an expected call of FindOneByBlogUuidAndPostUuid.

func (*MockPostModelMockRecorder) FindOneByUrl

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

FindOneByUrl indicates an expected call of FindOneByUrl.

func (*MockPostModelMockRecorder) FindOneByUuid

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

FindOneByUuid indicates an expected call of FindOneByUuid.

func (*MockPostModelMockRecorder) Insert

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

Insert indicates an expected call of Insert.

func (*MockPostModelMockRecorder) ListByBlogUuid

func (mr *MockPostModelMockRecorder) ListByBlogUuid(arg0, arg1 any) *gomock.Call

ListByBlogUuid indicates an expected call of ListByBlogUuid.

func (*MockPostModelMockRecorder) SearchByTitle

func (mr *MockPostModelMockRecorder) SearchByTitle(arg0, arg1, arg2 any) *gomock.Call

SearchByTitle indicates an expected call of SearchByTitle.

func (*MockPostModelMockRecorder) Update

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

Update indicates an expected call of Update.

type MockPostUserInfoModel

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

MockPostUserInfoModel is a mock of PostUserInfoModel interface.

func NewMockPostUserInfoModel

func NewMockPostUserInfoModel(ctrl *gomock.Controller) *MockPostUserInfoModel

NewMockPostUserInfoModel creates a new mock instance.

func (*MockPostUserInfoModel) Delete

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

Delete mocks base method.

func (*MockPostUserInfoModel) EXPECT

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

func (*MockPostUserInfoModel) FindOne

func (m *MockPostUserInfoModel) FindOne(arg0 context.Context, arg1 int64) (*PostUserInfo, error)

FindOne mocks base method.

func (*MockPostUserInfoModel) FindOneByUserUuidAndBlogUuidAndPostUuid

func (m *MockPostUserInfoModel) FindOneByUserUuidAndBlogUuidAndPostUuid(arg0 context.Context, arg1, arg2, arg3 string) (*PostUserInfo, error)

FindOneByUserUuidAndBlogUuidAndPostUuid mocks base method.

func (*MockPostUserInfoModel) FindOneByUuid

func (m *MockPostUserInfoModel) FindOneByUuid(arg0 context.Context, arg1 string) (*PostUserInfo, error)

FindOneByUuid mocks base method.

func (*MockPostUserInfoModel) Insert

func (m *MockPostUserInfoModel) Insert(arg0 context.Context, arg1 *PostUserInfo) (sql.Result, error)

Insert mocks base method.

func (*MockPostUserInfoModel) ListByUserUuidAndBlogUuid

func (m *MockPostUserInfoModel) ListByUserUuidAndBlogUuid(arg0 context.Context, arg1, arg2 string) ([]*PostUserInfo, error)

ListByUserUuidAndBlogUuid mocks base method.

func (*MockPostUserInfoModel) Update

func (m *MockPostUserInfoModel) Update(arg0 context.Context, arg1 *PostUserInfo) error

Update mocks base method.

type MockPostUserInfoModelMockRecorder

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

MockPostUserInfoModelMockRecorder is the mock recorder for MockPostUserInfoModel.

func (*MockPostUserInfoModelMockRecorder) Delete

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

Delete indicates an expected call of Delete.

func (*MockPostUserInfoModelMockRecorder) FindOne

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

FindOne indicates an expected call of FindOne.

func (*MockPostUserInfoModelMockRecorder) FindOneByUserUuidAndBlogUuidAndPostUuid

func (mr *MockPostUserInfoModelMockRecorder) FindOneByUserUuidAndBlogUuidAndPostUuid(arg0, arg1, arg2, arg3 any) *gomock.Call

FindOneByUserUuidAndBlogUuidAndPostUuid indicates an expected call of FindOneByUserUuidAndBlogUuidAndPostUuid.

func (*MockPostUserInfoModelMockRecorder) FindOneByUuid

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

FindOneByUuid indicates an expected call of FindOneByUuid.

func (*MockPostUserInfoModelMockRecorder) Insert

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

Insert indicates an expected call of Insert.

func (*MockPostUserInfoModelMockRecorder) ListByUserUuidAndBlogUuid

func (mr *MockPostUserInfoModelMockRecorder) ListByUserUuidAndBlogUuid(arg0, arg1, arg2 any) *gomock.Call

ListByUserUuidAndBlogUuid indicates an expected call of ListByUserUuidAndBlogUuid.

func (*MockPostUserInfoModelMockRecorder) Update

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

Update indicates an expected call of Update.

type Post

type Post struct {
	Id             int64          `db:"id"`
	Uuid           string         `db:"uuid"`
	BlogUuid       sql.NullString `db:"blog_uuid"`
	Published      sql.NullTime   `db:"published"`
	Updated        sql.NullTime   `db:"updated"`
	Url            string         `db:"url"`
	SelfLink       sql.NullString `db:"self_link"`
	Title          sql.NullString `db:"title"`
	TitleLink      sql.NullString `db:"title_link"`
	Content        sql.NullString `db:"content"`
	CustomMetaData sql.NullString `db:"custom_meta_data"`
	Status         sql.NullString `db:"status"`
}

type PostModel

type PostModel interface {
	FindOneByBlogUuidAndPostUuid(ctx context.Context, blogUuid, postUuid string) (*Post, error)
	ListByBlogUuid(ctx context.Context, blogUuid string) ([]*Post, error)
	SearchByTitle(ctx context.Context, blogUuid, title string) ([]*Post, error)
	// contains filtered or unexported methods
}

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

func NewPostModel

func NewPostModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) PostModel

NewPostModel returns a model for the database table.

type PostUserInfo

type PostUserInfo struct {
	Id            int64          `db:"id"`
	Uuid          string         `db:"uuid"`
	UserUuid      sql.NullString `db:"user_uuid"`
	BlogUuid      sql.NullString `db:"blog_uuid"`
	PostUuid      sql.NullString `db:"post_uuid"`
	HasEditAccess sql.NullBool   `db:"has_edit_access"`
}

type PostUserInfoModel

type PostUserInfoModel interface {
	FindOneByUserUuidAndBlogUuidAndPostUuid(ctx context.Context, userUuid, blogUuid, postUuid string) (*PostUserInfo, error)
	ListByUserUuidAndBlogUuid(ctx context.Context, userUuid, blogUuid string) ([]*PostUserInfo, error)
	// contains filtered or unexported methods
}

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

func NewPostUserInfoModel

func NewPostUserInfoModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) PostUserInfoModel

NewPostUserInfoModel 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