server

package
v0.0.0-...-fc872c1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2015 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package server is used to serve blocked files via http

Current version: experimental

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockAndRespond

func BlockAndRespond(w http.ResponseWriter, content io.Reader)

Handle the uploaded data.

func CopyHandler

func CopyHandler(u *url.URL, h http.Header, _ interface{}) (int, http.Header, *blocks.BlockedFile, error)

CopyHandler - The REST endpoint for deleting a BlockedFile

func DeleteHandler

func DeleteHandler(u *url.URL, h http.Header, _ interface{}) (int, http.Header, bool, error)

DeleteHandler - The REST endpoint for deleting a BlockedFile

func GetHello

func GetHello(u *url.URL, h http.Header, _ interface{}) (int, http.Header, string, error)

func HandleErrorWithResponse

func HandleErrorWithResponse(w http.ResponseWriter, error error)

func Start

func Start()

Start a HTTP listener

Types

type FileDownloadHandler

type FileDownloadHandler struct {
}

func NewFileDownloadHandler

func NewFileDownloadHandler() FileDownloadHandler

func (FileDownloadHandler) ServeHTTP

func (handler FileDownloadHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type PostMultipartUploadHandler

type PostMultipartUploadHandler struct{}

PostMultipartUploadHandler handles POST operations

func NewPostMultipartUploadHandler

func NewPostMultipartUploadHandler() PostMultipartUploadHandler

func (PostMultipartUploadHandler) ServeHTTP

func (handler PostMultipartUploadHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RawUploadHandler

type RawUploadHandler struct {
}

RawUploadHandler handles PUT operations

func NewRawUploadHandler

func NewRawUploadHandler() RawUploadHandler

func (RawUploadHandler) ServeHTTP

func (handler RawUploadHandler) 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