services

package
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container added in v1.0.0

type Container struct {
	Feed    *FeedService
	Episode *EpisodeService
}

Container holds all service instances.

func New added in v1.0.0

func New(cfg config.Settings, log *slog.Logger, store domain.Store, platforms ...domain.Platform) *Container

New creates a new service Container instance.

func (Container) Init added in v1.0.0

func (c Container) Init(ctx context.Context) error

Init initializes all services

type EpisodeService

type EpisodeService struct {
	// contains filtered or unexported fields
}

func NewEpisodeService

func NewEpisodeService(cfg config.Settings, log *slog.Logger, s domain.Store, p ...domain.Platform) *EpisodeService

NewEpisodeService creates a new EpisodeService instance.

func (*EpisodeService) Download

Download downloads an Episode from the given URL using the appropriate platform.

func (*EpisodeService) Init

func (s *EpisodeService) Init(ctx context.Context) error

Init checks the service dependencies and prepares the environment.

func (*EpisodeService) Validate added in v1.0.0

func (s *EpisodeService) Validate(ctx context.Context, req domain.DownloadRequest) error

type FeedService

type FeedService struct {
	// contains filtered or unexported fields
}

FeedService builds RSS podcast FeedInfo from episodes.

func NewFeedService

func NewFeedService(cfg config.Settings, log *slog.Logger, s domain.Store) *FeedService

NewFeedService creates a new FeedService instance.

func (*FeedService) Build

func (s *FeedService) Build(ctx context.Context) error

Build implements Feeder interface to generate RSS FeedInfo from all episodes and update landing page

func (*FeedService) Info added in v1.0.0

func (s *FeedService) Info(ctx context.Context) (*domain.FeedInfo, error)

func (*FeedService) Init

func (s *FeedService) Init(ctx context.Context) error

Init checks the service dependencies and prepares the environment.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL