Documentation
¶
Overview ¶
Package history provides the domain of the history.
Package history is a generated GoMock package.
Index ¶
- type History
- type HistoryRepository
- type MockHistoryRepository
- func (m *MockHistoryRepository) DeleteAll(ctx context.Context) (int, error)
- func (m *MockHistoryRepository) DeleteByIdIn(ctx context.Context, ids []int) (int, error)
- func (m *MockHistoryRepository) DeleteByIdInAndIsFavoritedIs(ctx context.Context, ids []int, isFavorited int) (int, error)
- func (m *MockHistoryRepository) DeleteByIsFavoritedIs(ctx context.Context, isFavorited int) (int, error)
- func (m *MockHistoryRepository) EXPECT() *MockHistoryRepositoryMockRecorder
- func (m *MockHistoryRepository) FindAll(ctx context.Context) ([]*History, error)
- func (m *MockHistoryRepository) FindByIsFavoritedIs(ctx context.Context, isFavorited int) ([]*History, error)
- func (m *MockHistoryRepository) FindByIsFavoritedIsAndPhraseContains(ctx context.Context, keywords []string, and bool, isFavorited int) ([]*History, error)
- func (m *MockHistoryRepository) FindByPhraseContains(ctx context.Context, keywords []string, and bool) ([]*History, error)
- func (m *MockHistoryRepository) FindTopNByIsFavoritedIsAndByOrderByIdAsc(ctx context.Context, number, isFavorited int) ([]*History, error)
- func (m *MockHistoryRepository) FindTopNByIsFavoritedIsAndByPhraseContainsOrderByIdAsc(ctx context.Context, keywords []string, and bool, number, isFavorited int) ([]*History, error)
- func (m *MockHistoryRepository) FindTopNByOrderByIdAsc(ctx context.Context, number int) ([]*History, error)
- func (m *MockHistoryRepository) FindTopNByPhraseContainsOrderByIdAsc(ctx context.Context, keywords []string, and bool, number int) ([]*History, error)
- func (m *MockHistoryRepository) SaveAll(ctx context.Context, jrps []*History) ([]*History, error)
- func (m *MockHistoryRepository) UpdateIsFavoritedByIdIn(ctx context.Context, isFavorited int, ids []int) (int, error)
- func (m *MockHistoryRepository) UpdateIsFavoritedByIsFavoritedIs(ctx context.Context, isFavorited, isFavoritedIs int) (int, error)
- type MockHistoryRepositoryMockRecorder
- func (mr *MockHistoryRepositoryMockRecorder) DeleteAll(ctx any) *gomock.Call
- func (mr *MockHistoryRepositoryMockRecorder) DeleteByIdIn(ctx, ids any) *gomock.Call
- func (mr *MockHistoryRepositoryMockRecorder) DeleteByIdInAndIsFavoritedIs(ctx, ids, isFavorited any) *gomock.Call
- func (mr *MockHistoryRepositoryMockRecorder) DeleteByIsFavoritedIs(ctx, isFavorited any) *gomock.Call
- func (mr *MockHistoryRepositoryMockRecorder) FindAll(ctx any) *gomock.Call
- func (mr *MockHistoryRepositoryMockRecorder) FindByIsFavoritedIs(ctx, isFavorited any) *gomock.Call
- func (mr *MockHistoryRepositoryMockRecorder) FindByIsFavoritedIsAndPhraseContains(ctx, keywords, and, isFavorited any) *gomock.Call
- func (mr *MockHistoryRepositoryMockRecorder) FindByPhraseContains(ctx, keywords, and any) *gomock.Call
- func (mr *MockHistoryRepositoryMockRecorder) FindTopNByIsFavoritedIsAndByOrderByIdAsc(ctx, number, isFavorited any) *gomock.Call
- func (mr *MockHistoryRepositoryMockRecorder) FindTopNByIsFavoritedIsAndByPhraseContainsOrderByIdAsc(ctx, keywords, and, number, isFavorited any) *gomock.Call
- func (mr *MockHistoryRepositoryMockRecorder) FindTopNByOrderByIdAsc(ctx, number any) *gomock.Call
- func (mr *MockHistoryRepositoryMockRecorder) FindTopNByPhraseContainsOrderByIdAsc(ctx, keywords, and, number any) *gomock.Call
- func (mr *MockHistoryRepositoryMockRecorder) SaveAll(ctx, jrps any) *gomock.Call
- func (mr *MockHistoryRepositoryMockRecorder) UpdateIsFavoritedByIdIn(ctx, isFavorited, ids any) *gomock.Call
- func (mr *MockHistoryRepositoryMockRecorder) UpdateIsFavoritedByIsFavoritedIs(ctx, isFavorited, isFavoritedIs any) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type History ¶
type History struct { // ID is the primary key of the history table. ID int // Phrase is the generated phrase. Phrase string // Prefix is the prefix when the phrase is generated. Prefix sql.NullString // Suffix is the suffix when the phrase is generated. Suffix sql.NullString // IsFavorited is the flag to indicate whether the phrase is favorited. IsFavorited int // CreatedAt is the timestamp when the phrase is created. CreatedAt time.Time // UpdatedAt is the timestamp when the phrase is updated. UpdatedAt time.Time }
History is a struct that represents history table in the jrp database.
type HistoryRepository ¶
type HistoryRepository interface { DeleteAll(ctx context.Context) (int, error) DeleteByIdIn(ctx context.Context, ids []int) (int, error) DeleteByIdInAndIsFavoritedIs(ctx context.Context, ids []int, isFavorited int) (int, error) DeleteByIsFavoritedIs(ctx context.Context, isFavorited int) (int, error) FindAll(ctx context.Context) ([]*History, error) FindByIsFavoritedIs(ctx context.Context, isFavorited int) ([]*History, error) FindByIsFavoritedIsAndPhraseContains(ctx context.Context, keywords []string, and bool, isFavorited int) ([]*History, error) FindByPhraseContains(ctx context.Context, keywords []string, and bool) ([]*History, error) FindTopNByIsFavoritedIsAndByOrderByIdAsc(ctx context.Context, number int, isFavorited int) ([]*History, error) FindTopNByIsFavoritedIsAndByPhraseContainsOrderByIdAsc(ctx context.Context, keywords []string, and bool, number int, isFavorited int) ([]*History, error) FindTopNByOrderByIdAsc(ctx context.Context, number int) ([]*History, error) FindTopNByPhraseContainsOrderByIdAsc(ctx context.Context, keywords []string, and bool, number int) ([]*History, error) SaveAll(ctx context.Context, jrps []*History) ([]*History, error) UpdateIsFavoritedByIdIn(ctx context.Context, isFavorited int, ids []int) (int, error) UpdateIsFavoritedByIsFavoritedIs(ctx context.Context, isFavorited int, isFavoritedIs int) (int, error) }
HistoryRepository is an interface that provides the repository for the history table in the jrp database.
type MockHistoryRepository ¶
type MockHistoryRepository struct {
// contains filtered or unexported fields
}
MockHistoryRepository is a mock of HistoryRepository interface.
func NewMockHistoryRepository ¶
func NewMockHistoryRepository(ctrl *gomock.Controller) *MockHistoryRepository
NewMockHistoryRepository creates a new mock instance.
func (*MockHistoryRepository) DeleteAll ¶
func (m *MockHistoryRepository) DeleteAll(ctx context.Context) (int, error)
DeleteAll mocks base method.
func (*MockHistoryRepository) DeleteByIdIn ¶
DeleteByIdIn mocks base method.
func (*MockHistoryRepository) DeleteByIdInAndIsFavoritedIs ¶
func (m *MockHistoryRepository) DeleteByIdInAndIsFavoritedIs(ctx context.Context, ids []int, isFavorited int) (int, error)
DeleteByIdInAndIsFavoritedIs mocks base method.
func (*MockHistoryRepository) DeleteByIsFavoritedIs ¶
func (m *MockHistoryRepository) DeleteByIsFavoritedIs(ctx context.Context, isFavorited int) (int, error)
DeleteByIsFavoritedIs mocks base method.
func (*MockHistoryRepository) EXPECT ¶
func (m *MockHistoryRepository) EXPECT() *MockHistoryRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockHistoryRepository) FindAll ¶
func (m *MockHistoryRepository) FindAll(ctx context.Context) ([]*History, error)
FindAll mocks base method.
func (*MockHistoryRepository) FindByIsFavoritedIs ¶
func (m *MockHistoryRepository) FindByIsFavoritedIs(ctx context.Context, isFavorited int) ([]*History, error)
FindByIsFavoritedIs mocks base method.
func (*MockHistoryRepository) FindByIsFavoritedIsAndPhraseContains ¶
func (m *MockHistoryRepository) FindByIsFavoritedIsAndPhraseContains(ctx context.Context, keywords []string, and bool, isFavorited int) ([]*History, error)
FindByIsFavoritedIsAndPhraseContains mocks base method.
func (*MockHistoryRepository) FindByPhraseContains ¶
func (m *MockHistoryRepository) FindByPhraseContains(ctx context.Context, keywords []string, and bool) ([]*History, error)
FindByPhraseContains mocks base method.
func (*MockHistoryRepository) FindTopNByIsFavoritedIsAndByOrderByIdAsc ¶
func (m *MockHistoryRepository) FindTopNByIsFavoritedIsAndByOrderByIdAsc(ctx context.Context, number, isFavorited int) ([]*History, error)
FindTopNByIsFavoritedIsAndByOrderByIdAsc mocks base method.
func (*MockHistoryRepository) FindTopNByIsFavoritedIsAndByPhraseContainsOrderByIdAsc ¶
func (m *MockHistoryRepository) FindTopNByIsFavoritedIsAndByPhraseContainsOrderByIdAsc(ctx context.Context, keywords []string, and bool, number, isFavorited int) ([]*History, error)
FindTopNByIsFavoritedIsAndByPhraseContainsOrderByIdAsc mocks base method.
func (*MockHistoryRepository) FindTopNByOrderByIdAsc ¶
func (m *MockHistoryRepository) FindTopNByOrderByIdAsc(ctx context.Context, number int) ([]*History, error)
FindTopNByOrderByIdAsc mocks base method.
func (*MockHistoryRepository) FindTopNByPhraseContainsOrderByIdAsc ¶
func (m *MockHistoryRepository) FindTopNByPhraseContainsOrderByIdAsc(ctx context.Context, keywords []string, and bool, number int) ([]*History, error)
FindTopNByPhraseContainsOrderByIdAsc mocks base method.
func (*MockHistoryRepository) UpdateIsFavoritedByIdIn ¶
func (m *MockHistoryRepository) UpdateIsFavoritedByIdIn(ctx context.Context, isFavorited int, ids []int) (int, error)
UpdateIsFavoritedByIdIn mocks base method.
func (*MockHistoryRepository) UpdateIsFavoritedByIsFavoritedIs ¶
func (m *MockHistoryRepository) UpdateIsFavoritedByIsFavoritedIs(ctx context.Context, isFavorited, isFavoritedIs int) (int, error)
UpdateIsFavoritedByIsFavoritedIs mocks base method.
type MockHistoryRepositoryMockRecorder ¶
type MockHistoryRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockHistoryRepositoryMockRecorder is the mock recorder for MockHistoryRepository.
func (*MockHistoryRepositoryMockRecorder) DeleteAll ¶
func (mr *MockHistoryRepositoryMockRecorder) DeleteAll(ctx any) *gomock.Call
DeleteAll indicates an expected call of DeleteAll.
func (*MockHistoryRepositoryMockRecorder) DeleteByIdIn ¶
func (mr *MockHistoryRepositoryMockRecorder) DeleteByIdIn(ctx, ids any) *gomock.Call
DeleteByIdIn indicates an expected call of DeleteByIdIn.
func (*MockHistoryRepositoryMockRecorder) DeleteByIdInAndIsFavoritedIs ¶
func (mr *MockHistoryRepositoryMockRecorder) DeleteByIdInAndIsFavoritedIs(ctx, ids, isFavorited any) *gomock.Call
DeleteByIdInAndIsFavoritedIs indicates an expected call of DeleteByIdInAndIsFavoritedIs.
func (*MockHistoryRepositoryMockRecorder) DeleteByIsFavoritedIs ¶
func (mr *MockHistoryRepositoryMockRecorder) DeleteByIsFavoritedIs(ctx, isFavorited any) *gomock.Call
DeleteByIsFavoritedIs indicates an expected call of DeleteByIsFavoritedIs.
func (*MockHistoryRepositoryMockRecorder) FindAll ¶
func (mr *MockHistoryRepositoryMockRecorder) FindAll(ctx any) *gomock.Call
FindAll indicates an expected call of FindAll.
func (*MockHistoryRepositoryMockRecorder) FindByIsFavoritedIs ¶
func (mr *MockHistoryRepositoryMockRecorder) FindByIsFavoritedIs(ctx, isFavorited any) *gomock.Call
FindByIsFavoritedIs indicates an expected call of FindByIsFavoritedIs.
func (*MockHistoryRepositoryMockRecorder) FindByIsFavoritedIsAndPhraseContains ¶
func (mr *MockHistoryRepositoryMockRecorder) FindByIsFavoritedIsAndPhraseContains(ctx, keywords, and, isFavorited any) *gomock.Call
FindByIsFavoritedIsAndPhraseContains indicates an expected call of FindByIsFavoritedIsAndPhraseContains.
func (*MockHistoryRepositoryMockRecorder) FindByPhraseContains ¶
func (mr *MockHistoryRepositoryMockRecorder) FindByPhraseContains(ctx, keywords, and any) *gomock.Call
FindByPhraseContains indicates an expected call of FindByPhraseContains.
func (*MockHistoryRepositoryMockRecorder) FindTopNByIsFavoritedIsAndByOrderByIdAsc ¶
func (mr *MockHistoryRepositoryMockRecorder) FindTopNByIsFavoritedIsAndByOrderByIdAsc(ctx, number, isFavorited any) *gomock.Call
FindTopNByIsFavoritedIsAndByOrderByIdAsc indicates an expected call of FindTopNByIsFavoritedIsAndByOrderByIdAsc.
func (*MockHistoryRepositoryMockRecorder) FindTopNByIsFavoritedIsAndByPhraseContainsOrderByIdAsc ¶
func (mr *MockHistoryRepositoryMockRecorder) FindTopNByIsFavoritedIsAndByPhraseContainsOrderByIdAsc(ctx, keywords, and, number, isFavorited any) *gomock.Call
FindTopNByIsFavoritedIsAndByPhraseContainsOrderByIdAsc indicates an expected call of FindTopNByIsFavoritedIsAndByPhraseContainsOrderByIdAsc.
func (*MockHistoryRepositoryMockRecorder) FindTopNByOrderByIdAsc ¶
func (mr *MockHistoryRepositoryMockRecorder) FindTopNByOrderByIdAsc(ctx, number any) *gomock.Call
FindTopNByOrderByIdAsc indicates an expected call of FindTopNByOrderByIdAsc.
func (*MockHistoryRepositoryMockRecorder) FindTopNByPhraseContainsOrderByIdAsc ¶
func (mr *MockHistoryRepositoryMockRecorder) FindTopNByPhraseContainsOrderByIdAsc(ctx, keywords, and, number any) *gomock.Call
FindTopNByPhraseContainsOrderByIdAsc indicates an expected call of FindTopNByPhraseContainsOrderByIdAsc.
func (*MockHistoryRepositoryMockRecorder) SaveAll ¶
func (mr *MockHistoryRepositoryMockRecorder) SaveAll(ctx, jrps any) *gomock.Call
SaveAll indicates an expected call of SaveAll.
func (*MockHistoryRepositoryMockRecorder) UpdateIsFavoritedByIdIn ¶
func (mr *MockHistoryRepositoryMockRecorder) UpdateIsFavoritedByIdIn(ctx, isFavorited, ids any) *gomock.Call
UpdateIsFavoritedByIdIn indicates an expected call of UpdateIsFavoritedByIdIn.
func (*MockHistoryRepositoryMockRecorder) UpdateIsFavoritedByIsFavoritedIs ¶
func (mr *MockHistoryRepositoryMockRecorder) UpdateIsFavoritedByIsFavoritedIs(ctx, isFavorited, isFavoritedIs any) *gomock.Call
UpdateIsFavoritedByIsFavoritedIs indicates an expected call of UpdateIsFavoritedByIsFavoritedIs.