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

func NewCommentModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) CommentModel

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

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

func (*MockCommentModel) FindOne

func (m *MockCommentModel) FindOne(arg0 context.Context, arg1 int64) (*Comment, error)

FindOne mocks base method.

func (*MockCommentModel) FindOneByUuid

func (m *MockCommentModel) FindOneByUuid(arg0 context.Context, arg1 string) (*Comment, error)

FindOneByUuid mocks base method.

func (*MockCommentModel) Insert

func (m *MockCommentModel) Insert(arg0 context.Context, arg1 *Comment) (sql.Result, error)

Insert mocks base method.

func (*MockCommentModel) ListByBlogUuid

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

ListByBlogUuid mocks base method.

func (*MockCommentModel) ListByBlogUuidAndPostUuid

func (m *MockCommentModel) ListByBlogUuidAndPostUuid(arg0 context.Context, arg1, arg2 string) ([]*Comment, error)

ListByBlogUuidAndPostUuid mocks base method.

func (*MockCommentModel) Update

func (m *MockCommentModel) Update(arg0 context.Context, arg1 *Comment) error

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

func (*MockCommentModelMockRecorder) Update

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

Update indicates an expected call of Update.

Jump to

Keyboard shortcuts

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