providers

package
v0.0.0-...-0484061 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileNotFoundError

type FileNotFoundError struct{}

func (FileNotFoundError) Error

func (FileNotFoundError) Error() string

type FileSystemImageProvider

type FileSystemImageProvider struct {
	BaseRoot string
	List     []string
	Hit      chan string
}

func NewFileSystemImageProvider

func NewFileSystemImageProvider(path string) *FileSystemImageProvider

func (*FileSystemImageProvider) GetImage

func (f *FileSystemImageProvider) GetImage() (string, error)

type ImageProvider

type ImageProvider interface {
	// GetImage should return the name and the url of image. In case of non accessible image
	// you may use url encoded image (eg. data:image/png,base63,...).
	GetImage() (name, url string, err error)

	// AddImage inject new image to provide to user.
	AddImage(name, url string)
}

type NoMoreFileError

type NoMoreFileError struct{}

func (NoMoreFileError) Error

func (NoMoreFileError) Error() string

Jump to

Keyboard shortcuts

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