sources

package
v0.0.0-...-9625bed Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: GPL-3.0 Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Song

type Song struct {
	ArtistTitle string
	Error       error
}

type SongSource

type SongSource interface {
	// Starts the song source. This method should start the background thread and return.
	// When new song is found it should be send to the channel. Channel should be closed
	// when there is no more songs left.
	Start(ctx context.Context, conf SourceJob, song chan<- Song) error
}

func Create

func Create(ctx context.Context, sourceType string) (SongSource, error)

type SourceJob

type SourceJob struct {
	SourceUrl  string
	SourceType string
	SubstrMap  map[string]string
}

Jump to

Keyboard shortcuts

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