Documentation ¶
Index ¶
- type ConfigKey
- type ConfigService
- type ContentService
- func (s *ContentService) AddMany(contents []*model.Content, sources []*model.Source) error
- func (s *ContentService) Find(sourceTypes []string, sources []int, page int) (*database.Pagination, error)
- func (s *ContentService) FindOneByContentID(contentID string) (model.Content, error)
- func (s *ContentService) Get(id string) (model.Content, error)
- type LangService
- type RefreshErrors
- type RefreshService
- type SourceService
- func (s *SourceService) AddMany(sources []*model.Source) error
- func (s *SourceService) AddManyIfNotExist(data []fetchers.ChannelFetchData, sourceType string, nextOrder int) ([]*model.Source, error)
- func (s *SourceService) Create(source *model.Source) error
- func (s *SourceService) Delete(source *model.Source) error
- func (s *SourceService) FindAll(types []string) ([]*model.Source, error)
- func (s *SourceService) Get(id string) (model.Source, error)
- func (s *SourceService) GetBySourceID(sourceID string) (model.Source, error)
- func (s *SourceService) GetNextOrder() (int, error)
- func (s *SourceService) Update(source *model.Source) error
- func (s *SourceService) UpdateOrder(updates map[int]map[string]interface{}) ([]model.Source, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigService ¶
type ConfigService struct {
// contains filtered or unexported fields
}
func NewConfigService ¶
func NewConfigService(db *gorm.DB) *ConfigService
func (*ConfigService) Get ¶
func (s *ConfigService) Get(key ConfigKey) (sql.NullString, error)
func (*ConfigService) InitSetup ¶
func (s *ConfigService) InitSetup() error
Add db entry if needed for each of the config keys
type ContentService ¶
type ContentService struct {
// contains filtered or unexported fields
}
func NewContentService ¶
func NewContentService(db *gorm.DB) *ContentService
func (*ContentService) Find ¶
func (s *ContentService) Find(sourceTypes []string, sources []int, page int) (*database.Pagination, error)
func (*ContentService) FindOneByContentID ¶
func (s *ContentService) FindOneByContentID(contentID string) (model.Content, error)
type LangService ¶
type LangService struct {
// contains filtered or unexported fields
}
func NewLangService ¶
func NewLangService(db *gorm.DB) *LangService
type RefreshErrors ¶
type RefreshService ¶
type RefreshService struct {
// contains filtered or unexported fields
}
func NewRefreshService ¶
func (*RefreshService) RefreshBySource ¶
func (rs *RefreshService) RefreshBySource(source model.Source) ([]*model.Content, *RefreshErrors)
func (*RefreshService) RefreshByTypes ¶
func (rs *RefreshService) RefreshByTypes(types []string) ([]*model.Content, error)
func (*RefreshService) RefreshFeedlySource ¶
func (rs *RefreshService) RefreshFeedlySource() ([]*model.Source, error)
type SourceService ¶
type SourceService struct {
// contains filtered or unexported fields
}
func NewSourceService ¶
func NewSourceService(db *gorm.DB) *SourceService
func (*SourceService) AddManyIfNotExist ¶
func (s *SourceService) AddManyIfNotExist(data []fetchers.ChannelFetchData, sourceType string, nextOrder int) ([]*model.Source, error)
func (*SourceService) FindAll ¶
func (s *SourceService) FindAll(types []string) ([]*model.Source, error)
func (*SourceService) GetBySourceID ¶
func (s *SourceService) GetBySourceID(sourceID string) (model.Source, error)
func (*SourceService) GetNextOrder ¶
func (s *SourceService) GetNextOrder() (int, error)
func (*SourceService) UpdateOrder ¶
Click to show internal directories.
Click to hide internal directories.