Documentation ¶
Overview ¶
Package services is a generated GoMock package.
Package services is a generated GoMock package.
Package services is a generated GoMock package.
Package services is a generated GoMock package.
Package services is a generated GoMock package.
Package services is a generated GoMock package.
Package services is a generated GoMock package.
Package services is a generated GoMock package.
Index ¶
- Variables
- type Auth
- type AuthService
- type Categories
- type CategoriesService
- func (c CategoriesService) AddFeeds(userID, ctgID string, feeds []string)
- func (c CategoriesService) Categories(userID string, page models.Page) (categories []models.Category, next string)
- func (c CategoriesService) Category(userID, id string) (models.Category, bool)
- func (c CategoriesService) Delete(userID, id string) error
- func (c CategoriesService) Entries(userID string, page models.Page) ([]models.Entry, string, error)
- func (c CategoriesService) Feeds(userID string, page models.Page) (feeds []models.Feed, next string)
- func (c CategoriesService) Mark(userID, id string, marker models.Marker) error
- func (c CategoriesService) New(userID, name string) (models.Category, error)
- func (c CategoriesService) Stats(userID, id string) (models.Stats, error)
- func (c CategoriesService) Uncategorized(userID string, page models.Page) (feeds []models.Feed, next string)
- func (c CategoriesService) Update(userID, ctgID, newName string) (models.Category, error)
- type Entries
- type EntriesService
- func (e EntriesService) Entries(userID string, page models.Page) (entries []models.Entry, next string)
- func (e EntriesService) Entry(userID, id string) (models.Entry, error)
- func (e EntriesService) Mark(userID, id string, marker models.Marker) error
- func (e EntriesService) MarkAll(userID string, marker models.Marker)
- func (e EntriesService) Stats(userID string) models.Stats
- type Exporter
- type FeedService
- func (f FeedService) Delete(userID, id string) error
- func (f FeedService) Entries(userID string, page models.Page) (entries []models.Entry, next string)
- func (f FeedService) Feed(userID, id string) (models.Feed, bool)
- func (f FeedService) Feeds(userID string, page models.Page) (feeds []models.Feed, next string)
- func (f FeedService) Mark(userID, id string, marker models.Marker) error
- func (f FeedService) New(title, subscription, ctgID, userID string) (models.Feed, error)
- func (f FeedService) Stats(userID, id string) (models.Stats, error)
- func (f FeedService) Update(userID string, feed *models.Feed) error
- type Feeds
- type Importer
- type MockAuth
- type MockAuthMockRecorder
- type MockCategories
- func (m *MockCategories) AddFeeds(userID, ctgID string, feeds []string)
- func (m *MockCategories) Categories(userID string, page models.Page) ([]models.Category, string)
- func (m *MockCategories) Category(userID, id string) (models.Category, bool)
- func (m *MockCategories) Delete(userID, id string) error
- func (m *MockCategories) EXPECT() *MockCategoriesMockRecorder
- func (m *MockCategories) Entries(userID string, page models.Page) ([]models.Entry, string, error)
- func (m *MockCategories) Feeds(userID string, page models.Page) ([]models.Feed, string)
- func (m *MockCategories) Mark(userID, id string, marker models.Marker) error
- func (m *MockCategories) New(userID, name string) (models.Category, error)
- func (m *MockCategories) Stats(userID, id string) (models.Stats, error)
- func (m *MockCategories) Uncategorized(userID string, page models.Page) ([]models.Feed, string)
- func (m *MockCategories) Update(userID, ctgID, newName string) (models.Category, error)
- type MockCategoriesMockRecorder
- func (mr *MockCategoriesMockRecorder) AddFeeds(userID, ctgID, feeds interface{}) *gomock.Call
- func (mr *MockCategoriesMockRecorder) Categories(userID, page interface{}) *gomock.Call
- func (mr *MockCategoriesMockRecorder) Category(userID, id interface{}) *gomock.Call
- func (mr *MockCategoriesMockRecorder) Delete(userID, id interface{}) *gomock.Call
- func (mr *MockCategoriesMockRecorder) Entries(userID, page interface{}) *gomock.Call
- func (mr *MockCategoriesMockRecorder) Feeds(userID, page interface{}) *gomock.Call
- func (mr *MockCategoriesMockRecorder) Mark(userID, id, marker interface{}) *gomock.Call
- func (mr *MockCategoriesMockRecorder) New(userID, name interface{}) *gomock.Call
- func (mr *MockCategoriesMockRecorder) Stats(userID, id interface{}) *gomock.Call
- func (mr *MockCategoriesMockRecorder) Uncategorized(userID, page interface{}) *gomock.Call
- func (mr *MockCategoriesMockRecorder) Update(userID, ctgID, newName interface{}) *gomock.Call
- type MockEntries
- func (m *MockEntries) EXPECT() *MockEntriesMockRecorder
- func (m *MockEntries) Entries(userID string, page models.Page) ([]models.Entry, string)
- func (m *MockEntries) Entry(userID, id string) (models.Entry, error)
- func (m *MockEntries) Mark(userID, id string, marker models.Marker) error
- func (m *MockEntries) MarkAll(userID string, marker models.Marker)
- func (m *MockEntries) Stats(userID string) models.Stats
- type MockEntriesMockRecorder
- func (mr *MockEntriesMockRecorder) Entries(userID, page interface{}) *gomock.Call
- func (mr *MockEntriesMockRecorder) Entry(userID, id interface{}) *gomock.Call
- func (mr *MockEntriesMockRecorder) Mark(userID, id, marker interface{}) *gomock.Call
- func (mr *MockEntriesMockRecorder) MarkAll(userID, marker interface{}) *gomock.Call
- func (mr *MockEntriesMockRecorder) Stats(userID interface{}) *gomock.Call
- type MockExporter
- type MockExporterMockRecorder
- type MockFeeds
- func (m *MockFeeds) Delete(userID, id string) error
- func (m *MockFeeds) EXPECT() *MockFeedsMockRecorder
- func (m *MockFeeds) Entries(userID string, page models.Page) ([]models.Entry, string)
- func (m *MockFeeds) Feed(userID, id string) (models.Feed, bool)
- func (m *MockFeeds) Feeds(userID string, page models.Page) ([]models.Feed, string)
- func (m *MockFeeds) Mark(userID, id string, marker models.Marker) error
- func (m *MockFeeds) New(title, subscription, ctgID, userID string) (models.Feed, error)
- func (m *MockFeeds) Stats(userID, id string) (models.Stats, error)
- func (m *MockFeeds) Update(userID string, feed *models.Feed) error
- type MockFeedsMockRecorder
- func (mr *MockFeedsMockRecorder) Delete(userID, id interface{}) *gomock.Call
- func (mr *MockFeedsMockRecorder) Entries(userID, page interface{}) *gomock.Call
- func (mr *MockFeedsMockRecorder) Feed(userID, id interface{}) *gomock.Call
- func (mr *MockFeedsMockRecorder) Feeds(userID, page interface{}) *gomock.Call
- func (mr *MockFeedsMockRecorder) Mark(userID, id, marker interface{}) *gomock.Call
- func (mr *MockFeedsMockRecorder) New(title, subscription, ctgID, userID interface{}) *gomock.Call
- func (mr *MockFeedsMockRecorder) Stats(userID, id interface{}) *gomock.Call
- func (mr *MockFeedsMockRecorder) Update(userID, feed interface{}) *gomock.Call
- type MockImporter
- type MockImporterMockRecorder
- type MockTags
- func (m *MockTags) Apply(userID, id string, entries []string) error
- func (m *MockTags) Delete(userID, id string) error
- func (m *MockTags) EXPECT() *MockTagsMockRecorder
- func (m *MockTags) Entries(userID string, page models.Page) ([]models.Entry, string)
- func (m *MockTags) List(userID string, page models.Page) ([]models.Tag, string)
- func (m *MockTags) New(userID, name string) (models.Tag, error)
- func (m *MockTags) Tag(userID, id string) (models.Tag, bool)
- func (m *MockTags) Update(userID, id, newName string) (models.Tag, error)
- type MockTagsMockRecorder
- func (mr *MockTagsMockRecorder) Apply(userID, id, entries interface{}) *gomock.Call
- func (mr *MockTagsMockRecorder) Delete(userID, id interface{}) *gomock.Call
- func (mr *MockTagsMockRecorder) Entries(userID, page interface{}) *gomock.Call
- func (mr *MockTagsMockRecorder) List(userID, page interface{}) *gomock.Call
- func (mr *MockTagsMockRecorder) New(userID, name interface{}) *gomock.Call
- func (mr *MockTagsMockRecorder) Tag(userID, id interface{}) *gomock.Call
- func (mr *MockTagsMockRecorder) Update(userID, id, newName interface{}) *gomock.Call
- type MockUsers
- type MockUsersMockRecorder
- type OPMLExporter
- type OPMLImporter
- type Tags
- type TagsService
- func (t TagsService) Apply(userID, id string, entries []string) error
- func (t TagsService) Delete(userID, id string) error
- func (t TagsService) Entries(userID string, page models.Page) (entries []models.Entry, next string)
- func (t TagsService) List(userID string, page models.Page) (tags []models.Tag, next string)
- func (t TagsService) New(userID, name string) (models.Tag, error)
- func (t TagsService) Tag(userID, id string) (models.Tag, bool)
- func (t TagsService) Update(userID, id, newName string) (models.Tag, error)
- type Users
- type UsersService
Constants ¶
This section is empty.
Variables ¶
var ( errors.New("unauthorized Request") // ErrUserConflicts signals that a new user name conflicts with an existing one ErrUserConflicts = errors.New("username already used") )ErrUserUnauthorized =
var ( // ErrCategoryNotFound signals that a category model could not be found ErrCategoryNotFound = errors.New("categories not found") // ErrCategoryConflicts signals that a category model conflicts with an existing category ErrCategoryConflicts = errors.New("categories conflicts") )
var ( // ErrFeedCategoryNotFound signals that a request category for a given feed // was not found ErrFeedCategoryNotFound = errors.New("cannot find requested category for feed") // ErrFeedNotFound signals that a feed could not be found ErrFeedNotFound = errors.New("feed not found") // ErrFetchingFeed Signals that an error occurred while fetching // a RSS or Atom feed ErrFetchingFeed = errors.New("could not fetch feed") )
var ( // ErrTagNotFound signals that a tag could not be found ErrTagNotFound = errors.New("tag not found") // ErrTagConflicts signals that a tag conflicts with an existing tag ErrTagConflicts = errors.New("model conflicts") )
var ( // ErrUsernameConflicts signals that a username exists in the tagsRepo ErrUsernameConflicts = errors.New("username already exists") // ErrUserNotFound signals that a user could not be found ErrUserNotFound = errors.New("user not found") )
var ( // ErrEntryNotFound signals that an entry model could not be found ErrEntryNotFound = errors.New("entry not found") )
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth interface { // Login a user with username and password Login(username, password string) (models.APIKeyPair, error) // Register a user with username and password Register(username, password string) error // Renew access tokens using a refresh token Renew(token string) (models.APIKey, error) }
Auth service interface
type AuthService ¶
type AuthService struct { AuthSecret string // contains filtered or unexported fields }
AuthService implements Auth service for end users
func NewAuthService ¶
func NewAuthService(authSecret string, userRepo repo.Users) AuthService
func (AuthService) Login ¶
func (a AuthService) Login(username, password string) (models.APIKeyPair, error)
Login a user
func (AuthService) Register ¶
func (a AuthService) Register(username, password string) error
Register a user
type Categories ¶
type Categories interface { // New creates a new category. If the category conflicts with an existing category, // this errors New(userID, name string) (models.Category, error) // Category returns a category with ID that belongs to user Category(userID, id string) (models.Category, bool) // Categories returns a page of categories owned by user Categories(userID string, page models.Page) ([]models.Category, string) // Feeds returns all feeds associated to a category Feeds(userID string, page models.Page) ([]models.Feed, string) // Uncategorized returns all feeds associated to a category Uncategorized(userID string, page models.Page) ([]models.Feed, string) // Update a category with ID that belongs to user Update(userID, ctgID, newName string) (models.Category, error) // AddFeeds to a category AddFeeds(userID, ctgID string, feeds []string) // Delete a category with ID that belongs to a user Delete(userID, id string) error // Mark a category Mark(userID, id string, marker models.Marker) error // Entries returns all entries associated to a category Entries(userID string, page models.Page) ([]models.Entry, string, error) // Stats returns statistics on a category items Stats(userID, id string) (models.Stats, error) }
Categories interface defines the Categories service
type CategoriesService ¶
type CategoriesService struct {
// contains filtered or unexported fields
}
CategoriesService implements the Categories interface
func NewCategoriesService ¶
func NewCategoriesService(ctgsRepo repo.Categories, entriesRepo repo.Entries) CategoriesService
func (CategoriesService) AddFeeds ¶
func (c CategoriesService) AddFeeds(userID, ctgID string, feeds []string)
AddFeeds to a category with ctgID
func (CategoriesService) Categories ¶
func (c CategoriesService) Categories(userID string, page models.Page) (categories []models.Category, next string)
Categories returns all categories owned by user
func (CategoriesService) Category ¶
func (c CategoriesService) Category(userID, id string) (models.Category, bool)
Category returns a category with ID that belongs to user
func (CategoriesService) Delete ¶
func (c CategoriesService) Delete(userID, id string) error
Delete a category with ID that belongs to a user
func (CategoriesService) Feeds ¶
func (c CategoriesService) Feeds(userID string, page models.Page) (feeds []models.Feed, next string)
Feeds returns all feeds associated to a category
func (CategoriesService) Mark ¶
func (c CategoriesService) Mark(userID, id string, marker models.Marker) error
Mark a category
func (CategoriesService) New ¶
func (c CategoriesService) New(userID, name string) (models.Category, error)
New creates a new category. If the category conflicts with an existing category, this errors
func (CategoriesService) Stats ¶
func (c CategoriesService) Stats(userID, id string) (models.Stats, error)
Stats returns statistics on a category items
func (CategoriesService) Uncategorized ¶
func (c CategoriesService) Uncategorized(userID string, page models.Page) (feeds []models.Feed, next string)
Uncategorized returns all feeds associated to a category
type Entries ¶
type Entries interface { // Entry returns an entry with id that belongs to user Entry(userID, id string) (models.Entry, error) // Entries returns all entries belong to a user with a marker Entries(userID string, page models.Page) ([]models.Entry, string) // Mark entry with id Mark(userID string, id string, marker models.Marker) error // MarkAll entries MarkAll(userID string, marker models.Marker) // Stats returns statistics for all entries Stats(userID string) models.Stats }
Entries interface defines the Entries service
type EntriesService ¶
type EntriesService struct {
// contains filtered or unexported fields
}
EntriesService implements Entries service
func NewEntriesService ¶
func NewEntriesService(entriesRepo repo.Entries) EntriesService
func (EntriesService) Entries ¶
func (e EntriesService) Entries(userID string, page models.Page) (entries []models.Entry, next string)
Entries returns all entries belong to a user with a marker
func (EntriesService) Entry ¶
func (e EntriesService) Entry(userID, id string) (models.Entry, error)
Entry returns an entry with ID that belongs to user
func (EntriesService) Mark ¶
func (e EntriesService) Mark(userID, id string, marker models.Marker) error
Mark entry with id
type FeedService ¶
type FeedService struct {
// contains filtered or unexported fields
}
FeedService implementation
func NewFeedsService ¶
func NewFeedsService(feedsRepo repo.Feeds, ctgsRepo repo.Categories, entriesRepo repo.Entries) FeedService
func (FeedService) Delete ¶
func (f FeedService) Delete(userID, id string) error
Delete a feed with id
func (FeedService) Feed ¶
func (f FeedService) Feed(userID, id string) (models.Feed, bool)
Feed returns a feed with id owned by user
func (FeedService) Mark ¶
func (f FeedService) Mark(userID, id string, marker models.Marker) error
Mark a feed with id
func (FeedService) New ¶
func (f FeedService) New(title, subscription, ctgID, userID string) (models.Feed, error)
New creates a new Feed
type Feeds ¶
type Feeds interface { // New creates a new Feed New(title, subscription string, ctgID string, userID string) (models.Feed, error) // Feeds returns all feeds owned by user Feeds(userID string, page models.Page) ([]models.Feed, string) // Feed returns a feed with id owned by user Feed(userID string, id string) (models.Feed, bool) // Update feed owned by user Update(userID string, feed *models.Feed) error // Delete a feed with id Delete(userID string, id string) error // Mark a feed with id Mark(userID string, id string, marker models.Marker) error // Entries returns all entry items associated to a feed Entries(userID string, page models.Page) ([]models.Entry, string) // Stats returns statistics of a feed Stats(userID string, id string) (models.Stats, error) }
Feeds defines the Feeds service interface
type MockAuth ¶
type MockAuth struct {
// contains filtered or unexported fields
}
MockAuth is a mock of Auth interface.
func NewMockAuth ¶
func NewMockAuth(ctrl *gomock.Controller) *MockAuth
NewMockAuth creates a new mock instance.
func (*MockAuth) EXPECT ¶
func (m *MockAuth) EXPECT() *MockAuthMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAuth) Login ¶
func (m *MockAuth) Login(username, password string) (models.APIKeyPair, error)
Login mocks base method.
type MockAuthMockRecorder ¶
type MockAuthMockRecorder struct {
// contains filtered or unexported fields
}
MockAuthMockRecorder is the mock recorder for MockAuth.
func (*MockAuthMockRecorder) Login ¶
func (mr *MockAuthMockRecorder) Login(username, password interface{}) *gomock.Call
Login indicates an expected call of Login.
func (*MockAuthMockRecorder) Register ¶
func (mr *MockAuthMockRecorder) Register(username, password interface{}) *gomock.Call
Register indicates an expected call of Register.
func (*MockAuthMockRecorder) Renew ¶
func (mr *MockAuthMockRecorder) Renew(token interface{}) *gomock.Call
Renew indicates an expected call of Renew.
type MockCategories ¶
type MockCategories struct {
// contains filtered or unexported fields
}
MockCategories is a mock of Categories interface.
func NewMockCategories ¶
func NewMockCategories(ctrl *gomock.Controller) *MockCategories
NewMockCategories creates a new mock instance.
func (*MockCategories) AddFeeds ¶
func (m *MockCategories) AddFeeds(userID, ctgID string, feeds []string)
AddFeeds mocks base method.
func (*MockCategories) Categories ¶
Categories mocks base method.
func (*MockCategories) Category ¶
func (m *MockCategories) Category(userID, id string) (models.Category, bool)
Category mocks base method.
func (*MockCategories) Delete ¶
func (m *MockCategories) Delete(userID, id string) error
Delete mocks base method.
func (*MockCategories) EXPECT ¶
func (m *MockCategories) EXPECT() *MockCategoriesMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCategories) Mark ¶
func (m *MockCategories) Mark(userID, id string, marker models.Marker) error
Mark mocks base method.
func (*MockCategories) New ¶
func (m *MockCategories) New(userID, name string) (models.Category, error)
New mocks base method.
func (*MockCategories) Stats ¶
func (m *MockCategories) Stats(userID, id string) (models.Stats, error)
Stats mocks base method.
func (*MockCategories) Uncategorized ¶
Uncategorized mocks base method.
type MockCategoriesMockRecorder ¶
type MockCategoriesMockRecorder struct {
// contains filtered or unexported fields
}
MockCategoriesMockRecorder is the mock recorder for MockCategories.
func (*MockCategoriesMockRecorder) AddFeeds ¶
func (mr *MockCategoriesMockRecorder) AddFeeds(userID, ctgID, feeds interface{}) *gomock.Call
AddFeeds indicates an expected call of AddFeeds.
func (*MockCategoriesMockRecorder) Categories ¶
func (mr *MockCategoriesMockRecorder) Categories(userID, page interface{}) *gomock.Call
Categories indicates an expected call of Categories.
func (*MockCategoriesMockRecorder) Category ¶
func (mr *MockCategoriesMockRecorder) Category(userID, id interface{}) *gomock.Call
Category indicates an expected call of Category.
func (*MockCategoriesMockRecorder) Delete ¶
func (mr *MockCategoriesMockRecorder) Delete(userID, id interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockCategoriesMockRecorder) Entries ¶
func (mr *MockCategoriesMockRecorder) Entries(userID, page interface{}) *gomock.Call
Entries indicates an expected call of Entries.
func (*MockCategoriesMockRecorder) Feeds ¶
func (mr *MockCategoriesMockRecorder) Feeds(userID, page interface{}) *gomock.Call
Feeds indicates an expected call of Feeds.
func (*MockCategoriesMockRecorder) Mark ¶
func (mr *MockCategoriesMockRecorder) Mark(userID, id, marker interface{}) *gomock.Call
Mark indicates an expected call of Mark.
func (*MockCategoriesMockRecorder) New ¶
func (mr *MockCategoriesMockRecorder) New(userID, name interface{}) *gomock.Call
New indicates an expected call of New.
func (*MockCategoriesMockRecorder) Stats ¶
func (mr *MockCategoriesMockRecorder) Stats(userID, id interface{}) *gomock.Call
Stats indicates an expected call of Stats.
func (*MockCategoriesMockRecorder) Uncategorized ¶
func (mr *MockCategoriesMockRecorder) Uncategorized(userID, page interface{}) *gomock.Call
Uncategorized indicates an expected call of Uncategorized.
func (*MockCategoriesMockRecorder) Update ¶
func (mr *MockCategoriesMockRecorder) Update(userID, ctgID, newName interface{}) *gomock.Call
Update indicates an expected call of Update.
type MockEntries ¶
type MockEntries struct {
// contains filtered or unexported fields
}
MockEntries is a mock of Entries interface.
func NewMockEntries ¶
func NewMockEntries(ctrl *gomock.Controller) *MockEntries
NewMockEntries creates a new mock instance.
func (*MockEntries) EXPECT ¶
func (m *MockEntries) EXPECT() *MockEntriesMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockEntries) Entry ¶
func (m *MockEntries) Entry(userID, id string) (models.Entry, error)
Entry mocks base method.
func (*MockEntries) Mark ¶
func (m *MockEntries) Mark(userID, id string, marker models.Marker) error
Mark mocks base method.
type MockEntriesMockRecorder ¶
type MockEntriesMockRecorder struct {
// contains filtered or unexported fields
}
MockEntriesMockRecorder is the mock recorder for MockEntries.
func (*MockEntriesMockRecorder) Entries ¶
func (mr *MockEntriesMockRecorder) Entries(userID, page interface{}) *gomock.Call
Entries indicates an expected call of Entries.
func (*MockEntriesMockRecorder) Entry ¶
func (mr *MockEntriesMockRecorder) Entry(userID, id interface{}) *gomock.Call
Entry indicates an expected call of Entry.
func (*MockEntriesMockRecorder) Mark ¶
func (mr *MockEntriesMockRecorder) Mark(userID, id, marker interface{}) *gomock.Call
Mark indicates an expected call of Mark.
func (*MockEntriesMockRecorder) MarkAll ¶
func (mr *MockEntriesMockRecorder) MarkAll(userID, marker interface{}) *gomock.Call
MarkAll indicates an expected call of MarkAll.
func (*MockEntriesMockRecorder) Stats ¶
func (mr *MockEntriesMockRecorder) Stats(userID interface{}) *gomock.Call
Stats indicates an expected call of Stats.
type MockExporter ¶
type MockExporter struct {
// contains filtered or unexported fields
}
MockExporter is a mock of Exporter interface.
func NewMockExporter ¶
func NewMockExporter(ctrl *gomock.Controller) *MockExporter
NewMockExporter creates a new mock instance.
func (*MockExporter) EXPECT ¶
func (m *MockExporter) EXPECT() *MockExporterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockExporterMockRecorder ¶
type MockExporterMockRecorder struct {
// contains filtered or unexported fields
}
MockExporterMockRecorder is the mock recorder for MockExporter.
func (*MockExporterMockRecorder) Export ¶
func (mr *MockExporterMockRecorder) Export(userID interface{}) *gomock.Call
Export indicates an expected call of Export.
type MockFeeds ¶
type MockFeeds struct {
// contains filtered or unexported fields
}
MockFeeds is a mock of Feeds interface.
func NewMockFeeds ¶
func NewMockFeeds(ctrl *gomock.Controller) *MockFeeds
NewMockFeeds creates a new mock instance.
func (*MockFeeds) EXPECT ¶
func (m *MockFeeds) EXPECT() *MockFeedsMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockFeedsMockRecorder ¶
type MockFeedsMockRecorder struct {
// contains filtered or unexported fields
}
MockFeedsMockRecorder is the mock recorder for MockFeeds.
func (*MockFeedsMockRecorder) Delete ¶
func (mr *MockFeedsMockRecorder) Delete(userID, id interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockFeedsMockRecorder) Entries ¶
func (mr *MockFeedsMockRecorder) Entries(userID, page interface{}) *gomock.Call
Entries indicates an expected call of Entries.
func (*MockFeedsMockRecorder) Feed ¶
func (mr *MockFeedsMockRecorder) Feed(userID, id interface{}) *gomock.Call
Feed indicates an expected call of Feed.
func (*MockFeedsMockRecorder) Feeds ¶
func (mr *MockFeedsMockRecorder) Feeds(userID, page interface{}) *gomock.Call
Feeds indicates an expected call of Feeds.
func (*MockFeedsMockRecorder) Mark ¶
func (mr *MockFeedsMockRecorder) Mark(userID, id, marker interface{}) *gomock.Call
Mark indicates an expected call of Mark.
func (*MockFeedsMockRecorder) New ¶
func (mr *MockFeedsMockRecorder) New(title, subscription, ctgID, userID interface{}) *gomock.Call
New indicates an expected call of New.
func (*MockFeedsMockRecorder) Stats ¶
func (mr *MockFeedsMockRecorder) Stats(userID, id interface{}) *gomock.Call
Stats indicates an expected call of Stats.
func (*MockFeedsMockRecorder) Update ¶
func (mr *MockFeedsMockRecorder) Update(userID, feed interface{}) *gomock.Call
Update indicates an expected call of Update.
type MockImporter ¶
type MockImporter struct {
// contains filtered or unexported fields
}
MockImporter is a mock of Importer interface.
func NewMockImporter ¶
func NewMockImporter(ctrl *gomock.Controller) *MockImporter
NewMockImporter creates a new mock instance.
func (*MockImporter) EXPECT ¶
func (m *MockImporter) EXPECT() *MockImporterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockImporterMockRecorder ¶
type MockImporterMockRecorder struct {
// contains filtered or unexported fields
}
MockImporterMockRecorder is the mock recorder for MockImporter.
func (*MockImporterMockRecorder) Import ¶
func (mr *MockImporterMockRecorder) Import(arg0, arg1 interface{}) *gomock.Call
Import indicates an expected call of Import.
type MockTags ¶
type MockTags struct {
// contains filtered or unexported fields
}
MockTags is a mock of Tags interface.
func NewMockTags ¶
func NewMockTags(ctrl *gomock.Controller) *MockTags
NewMockTags creates a new mock instance.
func (*MockTags) EXPECT ¶
func (m *MockTags) EXPECT() *MockTagsMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockTagsMockRecorder ¶
type MockTagsMockRecorder struct {
// contains filtered or unexported fields
}
MockTagsMockRecorder is the mock recorder for MockTags.
func (*MockTagsMockRecorder) Apply ¶
func (mr *MockTagsMockRecorder) Apply(userID, id, entries interface{}) *gomock.Call
Apply indicates an expected call of Apply.
func (*MockTagsMockRecorder) Delete ¶
func (mr *MockTagsMockRecorder) Delete(userID, id interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockTagsMockRecorder) Entries ¶
func (mr *MockTagsMockRecorder) Entries(userID, page interface{}) *gomock.Call
Entries indicates an expected call of Entries.
func (*MockTagsMockRecorder) List ¶
func (mr *MockTagsMockRecorder) List(userID, page interface{}) *gomock.Call
List indicates an expected call of List.
func (*MockTagsMockRecorder) New ¶
func (mr *MockTagsMockRecorder) New(userID, name interface{}) *gomock.Call
New indicates an expected call of New.
func (*MockTagsMockRecorder) Tag ¶
func (mr *MockTagsMockRecorder) Tag(userID, id interface{}) *gomock.Call
Tag indicates an expected call of Tag.
func (*MockTagsMockRecorder) Update ¶
func (mr *MockTagsMockRecorder) Update(userID, id, newName interface{}) *gomock.Call
Update indicates an expected call of Update.
type MockUsers ¶
type MockUsers struct {
// contains filtered or unexported fields
}
MockUsers is a mock of Users interface.
func NewMockUsers ¶
func NewMockUsers(ctrl *gomock.Controller) *MockUsers
NewMockUsers creates a new mock instance.
func (*MockUsers) DeleteUser ¶
DeleteUser mocks base method.
func (*MockUsers) EXPECT ¶
func (m *MockUsers) EXPECT() *MockUsersMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockUsersMockRecorder ¶
type MockUsersMockRecorder struct {
// contains filtered or unexported fields
}
MockUsersMockRecorder is the mock recorder for MockUsers.
func (*MockUsersMockRecorder) DeleteUser ¶
func (mr *MockUsersMockRecorder) DeleteUser(id interface{}) *gomock.Call
DeleteUser indicates an expected call of DeleteUser.
func (*MockUsersMockRecorder) NewUser ¶
func (mr *MockUsersMockRecorder) NewUser(username, password interface{}) *gomock.Call
NewUser indicates an expected call of NewUser.
func (*MockUsersMockRecorder) User ¶
func (mr *MockUsersMockRecorder) User(id interface{}) *gomock.Call
User indicates an expected call of User.
func (*MockUsersMockRecorder) Users ¶
func (mr *MockUsersMockRecorder) Users(page interface{}) *gomock.Call
Users indicates an expected call of Users.
type OPMLExporter ¶
type OPMLExporter struct {
// contains filtered or unexported fields
}
An OPMLExporter represents an exporter for the OPML 2.0 format define by http://dev.opml.org/spec2.html.
func NewOPMLExporter ¶
func NewOPMLExporter(ctgsRepo repo.Categories) OPMLExporter
type OPMLImporter ¶
type OPMLImporter struct {
// contains filtered or unexported fields
}
An OPMLImporter represents an importer for the OPML 2.0 format define by http://dev.opml.org/spec2.html.
func NewOPMLImporter ¶
func NewOPMLImporter(ctgsRepo repo.Categories, feedsRepo repo.Feeds) OPMLImporter
type Tags ¶
type Tags interface { // New creates a new tag New(userID, name string) (models.Tag, error) // List returns all tags owned by user List(userID string, page models.Page) ([]models.Tag, string) // Delete a tag id Delete(userID, id string) error // Update a tag with id Update(userID, id, newName string) (models.Tag, error) // Apply associates a tag with an entry Apply(userID, id string, entries []string) error // Tag returns a tag with id Tag(userID, id string) (models.Tag, bool) // Entries returns all entries associated with a tag with id Entries(userID string, page models.Page) ([]models.Entry, string) }
Tags defines the Tags service interface
type TagsService ¶
type TagsService struct {
// contains filtered or unexported fields
}
TagsService implementation
func NewTagsService ¶
func NewTagsService(tagsRepo repo.Tags, entriesRepo repo.Entries) TagsService
func (TagsService) Apply ¶
func (t TagsService) Apply(userID, id string, entries []string) error
Apply associates a tag with an entry
func (TagsService) New ¶
func (t TagsService) New(userID, name string) (models.Tag, error)
New creates a new tag
type Users ¶
type Users interface { // NewUser creates a new user with user name and password NewUser(username, password string) (models.User, error) // DeleteUser with id DeleteUser(id string) error // User with id User(id string) (models.User, bool) // Users gets a list of users Users(page models.Page) ([]models.User, string) }
Users interface defines the Users services
type UsersService ¶
type UsersService struct {
// contains filtered or unexported fields
}
UsersService implement the Users interface
func NewUsersService ¶
func NewUsersService(usersRepo repo.Users) UsersService
func (UsersService) DeleteUser ¶
func (a UsersService) DeleteUser(id string) error
DeleteUser deletes a user with userID
func (UsersService) NewUser ¶
func (a UsersService) NewUser(username, password string) (models.User, error)
NewUser creates a new user