filer

package
v0.0.0-...-447d7c9 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2017 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filer

type Filer struct {
	Config     *config.Config
	Log        *logrus.Logger
	DB         *sqlx.DB
	Gin        *gin.Engine
	GQ         *goqu.Database
	Filesystem filesystem.Filesystem
	Queue      queue.Queue
}

Filer is the implementation of the Oakmail's fileserver

func NewFiler

func NewFiler(
	cfg *config.Config,
	log *logrus.Logger,
	db *sqlx.DB,
	gq *goqu.Database,
	fs filesystem.Filesystem,
	qu queue.Queue,
) *Filer

NewFiler creates a new filesystem server instance

func (*Filer) FetchResource

func (f *Filer) FetchResource(c *gin.Context)

FetchResource allows users to download any resource they own

func (*Filer) Index

func (f *Filer) Index(c *gin.Context)

Index is the landing page of the API

func (*Filer) Start

func (f *Filer) Start() error

Start binds the Filer API and starts listening.

func (*Filer) Upload

func (f *Filer) Upload(c *gin.Context)

Upload takes a token and creates a file in the virtual filesystem

Jump to

Keyboard shortcuts

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