provider

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IProvider

type IProvider interface {
	// Init opens SQLite database connection and does
	// some provider-specific stuff.
	Init(config *config.Config, storage *repository.Repository)

	// Provide is a main method for each provider that
	// must obtain or generate image. Also at current
	// code state it save wallpaper in database, but
	// saving to database logic will be moved to separate
	// module in future versions.
	Provide() *repository.Wallpaper
}

IProvider is an interface for creating different image providers. Generally speaking, IProvider can generate images on the fly, not only download them from external sources,.

type SimpleDesktopsProvider

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

SimpleDesktopsProvider is provider of images taken from http://simpledesktops.com

func (*SimpleDesktopsProvider) Init

func (p *SimpleDesktopsProvider) Init(config *config.Config, repository *repository.Repository)

func (*SimpleDesktopsProvider) Provide

Provide tries to parse and download images from http://simpledesktops.com.

Jump to

Keyboard shortcuts

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