http

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2017 License: MIT Imports: 9 Imported by: 0

README

MailHog HTTP utilities GoDoc Build Status

github.com/mailhog/http provides HTTP utilities used by MailHog-UI and MailHog-Server.

Licence

Copyright ©‎ 2014-2015, Ian Kent (http://iankent.uk)

Released under MIT license, see LICENSE for details.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Authorised func(string, string) bool

Authorised should be given a function to enable HTTP Basic Authentication

Functions

func AuthFile added in v0.2.0

func AuthFile(file string)

AuthFile sets Authorised to a function which validates against file

func BasicAuthHandler added in v0.2.0

func BasicAuthHandler(h http.Handler) http.Handler

BasicAuthHandler is middleware to check HTTP Basic Authentication if an authorisation function is defined.

func Listen

func Listen(httpBindAddr string, Asset func(string) ([]byte, error), exitCh chan int, registerCallback func(http.Handler))

Listen binds to httpBindAddr

Types

This section is empty.

Jump to

Keyboard shortcuts

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