imgsource

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAuthorization added in v0.1.2

func WithAuthorization(parent context.Context, authorization string) context.Context

WithAuthorization puts the authorization in the context.

Types

type FileSystem added in v0.1.2

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

FileSystem is an image source using the local file system

func NewFileSystemSource added in v0.1.2

func NewFileSystemSource(cfg config.FileSystemSource) FileSystem

NewFileSystemSource return a new FileSystem instance

func (FileSystem) Get added in v0.1.2

func (s FileSystem) Get(ctx context.Context, file string) (image.Image, error)

Get retrieves an image from the filesystem.

type Source

type Source interface {
	Get(ctx context.Context, path string) (image.Image, error)
}

Source defines the interface for image sources

type WebDav

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

WebDav implements the Source interface for webdav services

func NewWebDavSource

func NewWebDavSource(cfg config.WebDavSource) WebDav

NewWebDavSource creates a new webdav instance.

func (WebDav) Get

func (s WebDav) Get(ctx context.Context, file string) (image.Image, error)

Get downloads the file from a webdav service

Jump to

Keyboard shortcuts

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