publish

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePublishRequest added in v0.8.2

func CreatePublishRequest(t *testing.T, data []byte) *http.Request

CreatePublishRequest creates and returns a HTTP request providing data for the publishing endpoint.

Types

type Handler added in v0.13.3

type Handler struct {
	UploadPath string
}

Handler has path to save uploads to

func (Handler) CanHandle added in v0.13.3

func (h Handler) CanHandle(r *http.Request, _ *mux.RouteMatch) bool

CanHandle checks if http.Request contains POSTed data in an accepted format. Supposed to be used in gorilla mux router MatcherFunc.

func (Handler) Handle added in v0.13.3

func (h Handler) Handle(w http.ResponseWriter, r *http.Request)

Handle is where HTTP upload is handled and passed on to Publisher. It should be wrapped with users.Authenticator.Wrap before it can be used in a mux.Router.

Jump to

Keyboard shortcuts

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