http

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CodeTemplate is the function to be used as the template for the code viewer
	// overwrite it before calling GenHandler
	CodeTemplate = template.Code
	// IndexTemplate is the function to be used as the template for the index page
	// overwrite it before calling GenHandler
	IndexTemplate = template.Index
)

Functions

func GenHandler

func GenHandler(store storage.CHR) func(ctx *fasthttp.RequestCtx)

GenHandler generates the brpaste handler

func Get

func Get(store storage.CHR) handler

Get generates a handler for the /:key[/:lang] endpoint

func Index

func Index(ctx *fasthttp.RequestCtx)

Index handles the / endpoint

func Put

func Put(store storage.CHR, put bool) handler

Put generates a handler for the POST / and PUT /:key endpoints

Types

This section is empty.

Jump to

Keyboard shortcuts

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