Documentation
¶
Index ¶
- type CatalogStore
- type Fetcher
- type Group
- type Item
- type ItemStream
- type Manager
- func (m *Manager) FetchAndParse(ctx context.Context, playlistURL string) ([]Item, error)
- func (m *Manager) FetchAndParseEach(ctx context.Context, playlistURL string, onItem func(Item) error) (int, error)
- func (m *Manager) Parse(r io.Reader) ([]Item, error)
- func (m *Manager) ParseEach(r io.Reader, onItem func(Item) error) (int, error)
- type Query
- type Refresher
- type StreamingCatalogStore
- type StreamingFetcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CatalogStore ¶
CatalogStore persists playlist catalog items.
type Item ¶
type Item struct {
ItemKey string
ChannelKey string
Name string
Group string
StreamURL string
TVGID string
TVGLogo string
Attrs map[string]string
FirstSeenAt int64
LastSeenAt int64
Active bool
}
Item is a normalized playlist entry used by catalog and favorites workflows.
type ItemStream ¶
ItemStream incrementally emits playlist items to a callback.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager fetches and parses remote playlists.
func NewManager ¶
func (*Manager) FetchAndParse ¶
type Query ¶
type Query struct {
Group string
GroupNames []string
Search string
SearchRegex bool
Limit int
Offset int
}
Query controls catalog filtering and pagination.
type Refresher ¶
type Refresher struct {
// contains filtered or unexported fields
}
Refresher coordinates fetch + persist operations with a single refresh lock.
func NewRefresher ¶
func NewRefresher(fetcher Fetcher, store CatalogStore, logger ...*slog.Logger) *Refresher
type StreamingCatalogStore ¶
type StreamingCatalogStore interface {
UpsertPlaylistItemsStream(ctx context.Context, stream ItemStream) (int, error)
}
StreamingCatalogStore persists playlist items from a streaming source.
Click to show internal directories.
Click to hide internal directories.