Documentation
¶
Index ¶
- Variables
- type Favorite
- type Service
- func (s *Service) Add(ctx context.Context, itemKey string) (Favorite, error)
- func (s *Service) List(ctx context.Context) ([]Favorite, error)
- func (s *Service) ListEnabled(ctx context.Context) ([]Favorite, error)
- func (s *Service) Remove(ctx context.Context, favID int64) error
- func (s *Service) Reorder(ctx context.Context, favIDs []int64) error
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrItemNotFound = errors.New("playlist item not found") ErrNotFound = errors.New("favorite not found") )
Functions ¶
This section is empty.
Types ¶
type Favorite ¶
type Favorite struct {
FavID int64 `json:"fav_id"`
ItemKey string `json:"item_key"`
OrderIndex int `json:"order_index"`
GuideNumber string `json:"guide_number"`
GuideName string `json:"guide_name"`
Enabled bool `json:"enabled"`
StreamURL string `json:"stream_url,omitempty"`
TVGLogo string `json:"tvg_logo,omitempty"`
GroupName string `json:"group_name,omitempty"`
}
Favorite is a curated channel exposed in HDHomeRun lineup responses.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides business operations for favorites CRUD + reorder.
func NewService ¶
func (*Service) ListEnabled ¶
type Store ¶
type Store interface {
AddFavorite(ctx context.Context, itemKey string, startGuideNumber int) (Favorite, error)
RemoveFavorite(ctx context.Context, favID int64, startGuideNumber int) error
ListFavorites(ctx context.Context, enabledOnly bool) ([]Favorite, error)
ReorderFavorites(ctx context.Context, favIDs []int64, startGuideNumber int) error
}
Store captures persistence operations required by favorites service.
Click to show internal directories.
Click to hide internal directories.