fileserver

package
v2.4.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2019 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileServer

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

FileServer deals with receiving and serving of uploaded files.

func New

func New(fileStore filestore.Storage) *FileServer

New creates a new File Server and starts a monitoring goroutine.

func (*FileServer) AddRoutes

func (fs *FileServer) AddRoutes(router *mux.Router, auther jwtauth.Authenticator)

AddRoutes adds this package's routes to the Router.

func (*FileServer) Close

func (fs *FileServer) Close()

Close stops any goroutines started by this server, and waits for them to close.

func (*FileServer) Go

func (fs *FileServer) Go()

Go starts goroutines for background operations. After Go() has been called, use Close() to stop those goroutines.

func (*FileServer) ServeHTTP

func (fs *FileServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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