provider

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	EventsSourceURL    string
	DefaultOpts        []options.ProviderOption
	EventSourceFsPath  string
	EventDetailsFsPath string
	AsciiGen           func(string, string) string
}

type Downloader

type Downloader interface {
	Download() error
}

func NewDownloader

func NewDownloader(config *Config) (Downloader, error)

NewDownloader constructs obj which can be used to download data

type Provider

type Provider interface {
	GetEvents(opts ...options.ProviderOption) (*models.Events, error)
	GetAscii(eventID string, imageURL string, opts ...options.ProviderOption) (*models.EventAscii, error)
	GetDetails(eventID string, eventURL string, opts ...options.ProviderOption) (*models.EventDetails, error)
}

func New

func New(config *Config, opt options.TypeOption) (Provider, error)

New constructs the correct provider from the configuration

Jump to

Keyboard shortcuts

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