provider

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrChroot error = fmt.Errorf("Chroot error")
View Source
var ErrKeyNotFound error = fmt.Errorf("Key not found")

Functions

This section is empty.

Types

type LocalConf

type LocalConf struct {
	Folder string `json:"folder"`
}

type LocalProvider

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

func NewLocalProvider

func NewLocalProvider(conf LocalConf) (LocalProvider, error)

func (LocalProvider) Get

func (p LocalProvider) Get(key string) (io.ReadCloser, error)

func (LocalProvider) Set

func (p LocalProvider) Set(key string, in io.Reader) error

type Provider

type Provider interface {
	Get(key string) (io.ReadCloser, error)
	Set(key string, b io.Reader) error
}

type S3Conf

type S3Conf struct {
	AccessId     string `json:"accessId"`
	AccessSecret string `json:"accessSecret"`
	Bucket       string `json:"bucket"`
	URL          string `json:"url"`
}

type S3Provider

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

func NewS3Provider

func NewS3Provider(conf S3Conf) (S3Provider, error)

func (S3Provider) Get

func (p S3Provider) Get(key string) (io.ReadCloser, error)

func (S3Provider) Set

func (p S3Provider) Set(k string, r io.Reader) error

Jump to

Keyboard shortcuts

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