service

package
v0.0.0-...-dd9661b Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewComputeHandler

func NewComputeHandler() http.Handler

NewComputeHandler ...

func NewHealthHandler

func NewHealthHandler() http.Handler

NewHealthHandler ...

func NewStorageHandler

func NewStorageHandler(c *config.Config) http.Handler

NewtSorageHandler ...

Types

type ComputeHandler

type ComputeHandler struct {
	api.Handler
}

ComputeHandler ...

type HealthHandler

type HealthHandler struct {
	api.Handler
}

HealthHandler ...

type Storage

type Storage interface {
	Upload(key string, body io.ReadCloser) error
	Download(key string) (io.ReadCloser, error)
	Delete(key string) error
}

Storage ...

func GetStorage

func GetStorage(c *config.Config) (s Storage)

func NewLocalStorage

func NewLocalStorage(path string) Storage

func NewS3Storage

func NewS3Storage(url, id, key, bucket string) Storage

type StorageHandler

type StorageHandler struct {
	api.Handler
	// contains filtered or unexported fields
}

StorageHandler ...

func (*StorageHandler) Delete

func (h *StorageHandler) Delete(w http.ResponseWriter, r *http.Request)

func (*StorageHandler) Download

func (h *StorageHandler) Download(w http.ResponseWriter, r *http.Request)

func (*StorageHandler) Upload

func (h *StorageHandler) Upload(w http.ResponseWriter, r *http.Request)

type StorageLocal

type StorageLocal struct {
}

func (*StorageLocal) Delete

func (s *StorageLocal) Delete(key string) error

func (*StorageLocal) Download

func (s *StorageLocal) Download(key string) (io.ReadCloser, error)

func (*StorageLocal) Upload

func (s *StorageLocal) Upload(key string, body io.ReadCloser) error

type StorageS3

type StorageS3 struct {
	Client     *s3.S3
	Bucket     *string
	Downloader *s3manager.Downloader
	Uploader   *s3manager.Uploader
}

func (*StorageS3) Delete

func (s *StorageS3) Delete(key string) error

func (*StorageS3) Download

func (s *StorageS3) Download(key string) (io.ReadCloser, error)

func (*StorageS3) Upload

func (s *StorageS3) Upload(key string, body io.ReadCloser) error

Jump to

Keyboard shortcuts

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