files

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2018 License: Apache-2.0 Imports: 16 Imported by: 4

Documentation

Index

Constants

View Source
const FileURLPrefix = "/static"

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	Config *config.Module
	DB     *db.Module
	Router *router.Module
	Logger *logger.Module
	// contains filtered or unexported fields
}

func (*Module) Delete

func (m *Module) Delete(uuid string) error

Get returns a reader, and nil, nil if file is not found

func (*Module) Get

func (m *Module) Get(filename string) (io.ReadCloser, error)

Get returns a reader, and nil, nil if file is not found

func (*Module) GetWithTransform

func (m *Module) GetWithTransform(filename string, optStr string) (io.ReadCloser, error)

GetWithTransform attempts to transform the image

func (*Module) Init

func (m *Module) Init(c *service.Config)

func (*Module) URLForFile

func (m *Module) URLForFile(file *models.File) string

func (*Module) Upload

func (m *Module) Upload(filename string, wr io.Reader) (*models.File, error)

type Store

type Store interface {
	Upload(uuid string, r io.Reader) error
	Delete(uuid string) error
	Get(uuid string) (io.ReadCloser, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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