Documentation
¶
Overview ¶
Package server is a generated GoMock package.
Package server is a generated GoMock package.
Package server is a generated GoMock package.
Index ¶
- type BizError
- type Feed
- func (f Feed) All(ctx context.Context) (*RespFeedAll, error)
- func (f Feed) CheckValidity(ctx context.Context, req *ReqFeedCheckValidity) (*RespFeedCheckValidity, error)
- func (f Feed) Create(ctx context.Context, req *ReqFeedCreate) error
- func (f Feed) Delete(ctx context.Context, req *ReqFeedDelete) error
- func (f Feed) Get(ctx context.Context, req *ReqFeedGet) (*RespFeedGet, error)
- func (f Feed) Refresh(ctx context.Context, req *ReqFeedRefresh) error
- func (f Feed) Update(ctx context.Context, req *ReqFeedUpdate) error
- type FeedForm
- type FeedRepo
- type FeedinGroupRepo
- type Group
- type GroupForm
- type GroupRepo
- type Item
- func (i Item) Delete(ctx context.Context, req *ReqItemDelete) error
- func (i Item) Get(ctx context.Context, req *ReqItemGet) (*RespItemGet, error)
- func (i Item) List(ctx context.Context, req *ReqItemList) (*RespItemList, error)
- func (i Item) UpdateBookmark(ctx context.Context, req *ReqItemUpdateBookmark) error
- func (i Item) UpdateUnread(ctx context.Context, req *ReqItemUpdateUnread) error
- type ItemFeed
- type ItemForm
- type ItemInFeedRepo
- type ItemRepo
- type MockFeedRepo
- func (m *MockFeedRepo) All() ([]*model.Feed, error)
- func (m *MockFeedRepo) Create(feed []*model.Feed) error
- func (m *MockFeedRepo) Delete(id uint) error
- func (m *MockFeedRepo) EXPECT() *MockFeedRepoMockRecorder
- func (m *MockFeedRepo) Get(id uint) (*model.Feed, error)
- func (m *MockFeedRepo) Update(id uint, feed *model.Feed) error
- type MockFeedRepoMockRecorder
- func (mr *MockFeedRepoMockRecorder) All() *gomock.Call
- func (mr *MockFeedRepoMockRecorder) Create(feed any) *gomock.Call
- func (mr *MockFeedRepoMockRecorder) Delete(id any) *gomock.Call
- func (mr *MockFeedRepoMockRecorder) Get(id any) *gomock.Call
- func (mr *MockFeedRepoMockRecorder) Update(id, feed any) *gomock.Call
- type MockFeedinGroupRepo
- type MockFeedinGroupRepoMockRecorder
- type MockGroupRepo
- type MockGroupRepoMockRecorder
- type MockItemInFeedRepo
- type MockItemInFeedRepoMockRecorder
- type MockItemRepo
- func (m *MockItemRepo) Delete(id uint) error
- func (m *MockItemRepo) EXPECT() *MockItemRepoMockRecorder
- func (m *MockItemRepo) Get(id uint) (*model.Item, error)
- func (m *MockItemRepo) List(filter repo.ItemFilter, page, pageSize int) ([]*model.Item, int, error)
- func (m *MockItemRepo) UpdateBookmark(id uint, bookmark *bool) error
- func (m *MockItemRepo) UpdateUnread(ids []uint, unread *bool) error
- type MockItemRepoMockRecorder
- func (mr *MockItemRepoMockRecorder) Delete(id any) *gomock.Call
- func (mr *MockItemRepoMockRecorder) Get(id any) *gomock.Call
- func (mr *MockItemRepoMockRecorder) List(filter, page, pageSize any) *gomock.Call
- func (mr *MockItemRepoMockRecorder) UpdateBookmark(id, bookmark any) *gomock.Call
- func (mr *MockItemRepoMockRecorder) UpdateUnread(ids, unread any) *gomock.Call
- type Paginate
- type ReqFeedCheckValidity
- type ReqFeedCreate
- type ReqFeedDelete
- type ReqFeedGet
- type ReqFeedRefresh
- type ReqFeedUpdate
- type ReqGroupCreate
- type ReqGroupDelete
- type ReqGroupUpdate
- type ReqItemDelete
- type ReqItemGet
- type ReqItemList
- type ReqItemUpdateBookmark
- type ReqItemUpdateUnread
- type RespFeedAll
- type RespFeedCheckValidity
- type RespFeedGet
- type RespGroupAll
- type RespItemGet
- type RespItemList
- type ValidityItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Feed ¶
type Feed struct {
// contains filtered or unexported fields
}
func NewFeed ¶
func NewFeed(feedRepo FeedRepo, itemRepo ItemInFeedRepo) *Feed
func (Feed) CheckValidity ¶
func (f Feed) CheckValidity(ctx context.Context, req *ReqFeedCheckValidity) (*RespFeedCheckValidity, error)
func (Feed) Get ¶
func (f Feed) Get(ctx context.Context, req *ReqFeedGet) (*RespFeedGet, error)
type FeedinGroupRepo ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func NewGroup ¶
func NewGroup(groupRepo GroupRepo, feedRepo FeedinGroupRepo) *Group
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
func (Item) Get ¶
func (i Item) Get(ctx context.Context, req *ReqItemGet) (*RespItemGet, error)
func (Item) List ¶
func (i Item) List(ctx context.Context, req *ReqItemList) (*RespItemList, error)
func (Item) UpdateBookmark ¶ added in v0.4.0
func (i Item) UpdateBookmark(ctx context.Context, req *ReqItemUpdateBookmark) error
func (Item) UpdateUnread ¶ added in v0.4.0
func (i Item) UpdateUnread(ctx context.Context, req *ReqItemUpdateUnread) error
type ItemForm ¶
type ItemForm struct {
ID uint `json:"id"`
Title *string `json:"title"`
Link *string `json:"link"`
GUID *string `json:"guid"`
Content *string `json:"content"`
Unread *bool `json:"unread"`
Bookmark *bool `json:"bookmark"`
PubDate *time.Time `json:"pub_date"`
UpdatedAt *time.Time `json:"updated_at"`
Feed ItemFeed `json:"feed"`
}
type ItemInFeedRepo ¶
type MockFeedRepo ¶
type MockFeedRepo struct {
// contains filtered or unexported fields
}
MockFeedRepo is a mock of FeedRepo interface.
func NewMockFeedRepo ¶
func NewMockFeedRepo(ctrl *gomock.Controller) *MockFeedRepo
NewMockFeedRepo creates a new mock instance.
func (*MockFeedRepo) All ¶
func (m *MockFeedRepo) All() ([]*model.Feed, error)
All mocks base method.
func (*MockFeedRepo) Create ¶
func (m *MockFeedRepo) Create(feed []*model.Feed) error
Create mocks base method.
func (*MockFeedRepo) Delete ¶
func (m *MockFeedRepo) Delete(id uint) error
Delete mocks base method.
func (*MockFeedRepo) EXPECT ¶
func (m *MockFeedRepo) EXPECT() *MockFeedRepoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockFeedRepoMockRecorder ¶
type MockFeedRepoMockRecorder struct {
// contains filtered or unexported fields
}
MockFeedRepoMockRecorder is the mock recorder for MockFeedRepo.
func (*MockFeedRepoMockRecorder) All ¶
func (mr *MockFeedRepoMockRecorder) All() *gomock.Call
All indicates an expected call of All.
func (*MockFeedRepoMockRecorder) Create ¶
func (mr *MockFeedRepoMockRecorder) Create(feed any) *gomock.Call
Create indicates an expected call of Create.
func (*MockFeedRepoMockRecorder) Delete ¶
func (mr *MockFeedRepoMockRecorder) Delete(id any) *gomock.Call
Delete indicates an expected call of Delete.
type MockFeedinGroupRepo ¶
type MockFeedinGroupRepo struct {
// contains filtered or unexported fields
}
MockFeedinGroupRepo is a mock of FeedinGroupRepo interface.
func NewMockFeedinGroupRepo ¶
func NewMockFeedinGroupRepo(ctrl *gomock.Controller) *MockFeedinGroupRepo
NewMockFeedinGroupRepo creates a new mock instance.
func (*MockFeedinGroupRepo) EXPECT ¶
func (m *MockFeedinGroupRepo) EXPECT() *MockFeedinGroupRepoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockFeedinGroupRepo) UpdateGroupID ¶
func (m *MockFeedinGroupRepo) UpdateGroupID(from, to uint) error
UpdateGroupID mocks base method.
type MockFeedinGroupRepoMockRecorder ¶
type MockFeedinGroupRepoMockRecorder struct {
// contains filtered or unexported fields
}
MockFeedinGroupRepoMockRecorder is the mock recorder for MockFeedinGroupRepo.
func (*MockFeedinGroupRepoMockRecorder) UpdateGroupID ¶
func (mr *MockFeedinGroupRepoMockRecorder) UpdateGroupID(from, to any) *gomock.Call
UpdateGroupID indicates an expected call of UpdateGroupID.
type MockGroupRepo ¶
type MockGroupRepo struct {
// contains filtered or unexported fields
}
MockGroupRepo is a mock of GroupRepo interface.
func NewMockGroupRepo ¶
func NewMockGroupRepo(ctrl *gomock.Controller) *MockGroupRepo
NewMockGroupRepo creates a new mock instance.
func (*MockGroupRepo) All ¶
func (m *MockGroupRepo) All() ([]*model.Group, error)
All mocks base method.
func (*MockGroupRepo) Create ¶
func (m *MockGroupRepo) Create(group *model.Group) error
Create mocks base method.
func (*MockGroupRepo) Delete ¶
func (m *MockGroupRepo) Delete(id uint) error
Delete mocks base method.
func (*MockGroupRepo) EXPECT ¶
func (m *MockGroupRepo) EXPECT() *MockGroupRepoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockGroupRepoMockRecorder ¶
type MockGroupRepoMockRecorder struct {
// contains filtered or unexported fields
}
MockGroupRepoMockRecorder is the mock recorder for MockGroupRepo.
func (*MockGroupRepoMockRecorder) All ¶
func (mr *MockGroupRepoMockRecorder) All() *gomock.Call
All indicates an expected call of All.
func (*MockGroupRepoMockRecorder) Create ¶
func (mr *MockGroupRepoMockRecorder) Create(group any) *gomock.Call
Create indicates an expected call of Create.
type MockItemInFeedRepo ¶
type MockItemInFeedRepo struct {
// contains filtered or unexported fields
}
MockItemInFeedRepo is a mock of ItemInFeedRepo interface.
func NewMockItemInFeedRepo ¶
func NewMockItemInFeedRepo(ctrl *gomock.Controller) *MockItemInFeedRepo
NewMockItemInFeedRepo creates a new mock instance.
func (*MockItemInFeedRepo) DeleteByFeed ¶
func (m *MockItemInFeedRepo) DeleteByFeed(id uint) error
DeleteByFeed mocks base method.
func (*MockItemInFeedRepo) EXPECT ¶
func (m *MockItemInFeedRepo) EXPECT() *MockItemInFeedRepoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockItemInFeedRepoMockRecorder ¶
type MockItemInFeedRepoMockRecorder struct {
// contains filtered or unexported fields
}
MockItemInFeedRepoMockRecorder is the mock recorder for MockItemInFeedRepo.
func (*MockItemInFeedRepoMockRecorder) DeleteByFeed ¶
func (mr *MockItemInFeedRepoMockRecorder) DeleteByFeed(id any) *gomock.Call
DeleteByFeed indicates an expected call of DeleteByFeed.
type MockItemRepo ¶
type MockItemRepo struct {
// contains filtered or unexported fields
}
MockItemRepo is a mock of ItemRepo interface.
func NewMockItemRepo ¶
func NewMockItemRepo(ctrl *gomock.Controller) *MockItemRepo
NewMockItemRepo creates a new mock instance.
func (*MockItemRepo) Delete ¶
func (m *MockItemRepo) Delete(id uint) error
Delete mocks base method.
func (*MockItemRepo) EXPECT ¶
func (m *MockItemRepo) EXPECT() *MockItemRepoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockItemRepo) Get ¶
func (m *MockItemRepo) Get(id uint) (*model.Item, error)
Get mocks base method.
func (*MockItemRepo) List ¶
func (m *MockItemRepo) List(filter repo.ItemFilter, page, pageSize int) ([]*model.Item, int, error)
List mocks base method.
func (*MockItemRepo) UpdateBookmark ¶ added in v0.7.3
func (m *MockItemRepo) UpdateBookmark(id uint, bookmark *bool) error
UpdateBookmark mocks base method.
func (*MockItemRepo) UpdateUnread ¶ added in v0.7.3
func (m *MockItemRepo) UpdateUnread(ids []uint, unread *bool) error
UpdateUnread mocks base method.
type MockItemRepoMockRecorder ¶
type MockItemRepoMockRecorder struct {
// contains filtered or unexported fields
}
MockItemRepoMockRecorder is the mock recorder for MockItemRepo.
func (*MockItemRepoMockRecorder) Delete ¶
func (mr *MockItemRepoMockRecorder) Delete(id any) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockItemRepoMockRecorder) Get ¶
func (mr *MockItemRepoMockRecorder) Get(id any) *gomock.Call
Get indicates an expected call of Get.
func (*MockItemRepoMockRecorder) List ¶
func (mr *MockItemRepoMockRecorder) List(filter, page, pageSize any) *gomock.Call
List indicates an expected call of List.
func (*MockItemRepoMockRecorder) UpdateBookmark ¶ added in v0.7.3
func (mr *MockItemRepoMockRecorder) UpdateBookmark(id, bookmark any) *gomock.Call
UpdateBookmark indicates an expected call of UpdateBookmark.
func (*MockItemRepoMockRecorder) UpdateUnread ¶ added in v0.7.3
func (mr *MockItemRepoMockRecorder) UpdateUnread(ids, unread any) *gomock.Call
UpdateUnread indicates an expected call of UpdateUnread.
type ReqFeedCheckValidity ¶
type ReqFeedCheckValidity struct {
Link string `json:"link" validate:"required"`
}
type ReqFeedCreate ¶
type ReqFeedDelete ¶
type ReqFeedDelete struct {
ID uint `param:"id" validate:"required"`
}
type ReqFeedGet ¶
type ReqFeedGet struct {
ID uint `param:"id" validate:"required"`
}
type ReqFeedRefresh ¶
type ReqFeedUpdate ¶
type ReqGroupCreate ¶
type ReqGroupCreate struct {
Name *string `json:"name" validate:"required"`
}
type ReqGroupDelete ¶
type ReqGroupDelete struct {
ID uint `param:"id" validate:"required"`
}
type ReqGroupUpdate ¶
type ReqItemDelete ¶
type ReqItemDelete struct {
ID uint `param:"id" validate:"required"`
}
type ReqItemGet ¶
type ReqItemGet struct {
ID uint `param:"id" validate:"required"`
}
type ReqItemList ¶
type ReqItemUpdateBookmark ¶ added in v0.4.0
type ReqItemUpdateUnread ¶ added in v0.4.0
type RespFeedAll ¶
type RespFeedAll struct {
Feeds []*FeedForm `json:"feeds"`
}
type RespFeedCheckValidity ¶
type RespFeedCheckValidity struct {
FeedLinks []ValidityItem `json:"feed_links"`
}
type RespFeedGet ¶
type RespFeedGet FeedForm
type RespGroupAll ¶
type RespGroupAll struct {
Groups []*GroupForm `json:"groups"`
}
type RespItemGet ¶
type RespItemGet ItemForm