radiko

package
v0.0.0-...-1fa1717 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JST = time.FixedZone("Asia/Tokyo", 9*60*60)

Functions

func RunDispatcher

func RunDispatcher(ctx context.Context, toDispatcher <-chan []Schedule, toFetcher chan<- Schedule)

func RunFetchers

func RunFetchers(ctx context.Context, toFetcher <-chan Schedule, cnf *config.Config, toDone chan<- bool)

func RunFromURL

func RunFromURL(ctx context.Context, tsURL string, cnf *config.Config)

func RunPlanner

func RunPlanner(ctx context.Context, toDispatcher chan<- []Schedule, cnf *config.Config)

func RunScheduler

func RunScheduler(ctx context.Context, cnf *config.Config)

Types

type Rule

type Rule struct {
	Name        string
	StationID   StationID
	Weekday     time.Weekday
	StartHour   int
	StartMinute int
	Duration    time.Duration
}

func (Rule) NextSchedules

func (r Rule) NextSchedules(n int) []Schedule

type Schedule

type Schedule struct {
	RuleName  string
	StationID StationID
	StartTime time.Time
	FetchTime time.Time
}

func (Schedule) String

func (s Schedule) String() string

type StationID

type StationID string
const (
	TBS StationID = "TBS" // TBSラジオ
	LFR StationID = "LFR" // ニッポン放送
)

Jump to

Keyboard shortcuts

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