http

package
v0.0.0-...-2113ee5 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandHandler

func ExpandHandler(logger *log.WOFLogger) (gohttp.Handler, error)

func ExpvarHandler

func ExpvarHandler(host string) (gohttp.Handler, error)

func FormatParsed

func FormatParsed(parsed []postal.ParsedComponent) map[string][]string

func ParseRequest

func ParseRequest(r *gohttp.Request) (*Query, *Error)

func ParserHandler

func ParserHandler(logger *log.WOFLogger) (gohttp.Handler, error)

func PingHandler

func PingHandler() (gohttp.Handler, error)

func WriteResponse

func WriteResponse(w gohttp.ResponseWriter, rsp interface{})

Types

type Error

type Error struct {
	Code    int
	Message string
	// contains filtered or unexported fields
}

func GetAddress

func GetAddress(r *gohttp.Request) (string, *Error)

func IsValidMethod

func IsValidMethod(r *gohttp.Request, allowed []string) (bool, *Error)

func NewError

func NewError(code int, message string) *Error

func ParseQuery

func ParseQuery(query *Query) (string, *Error)

func (Error) Error

func (e Error) Error() string

type Query

type Query struct {
	Address string
}

Jump to

Keyboard shortcuts

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