pyrahttp

package module
v0.0.0-...-ee3cff5 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2018 License: BSD-2-Clause Imports: 13 Imported by: 0

README

pyrahttp

HTTP helper function that will watch for SSL certificate changes. (Letsencrypt certs may automatically change monthly)

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReloadError = errors.New("Listener stopped")

Functions

func AuthFunc

func AuthFunc(am *AuthManager, f1 func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request)

func InitAuthHandler

func InitAuthHandler(am *AuthManager, h http.Handler) http.Handler

func ListenAndServeLetsEncrypt

func ListenAndServeLetsEncrypt(addr string, certFile string, keyFile string, handler http.Handler) error

func ListenAndServeLetsEncryptServer

func ListenAndServeLetsEncryptServer(addr string, certFile string, keyFile string, srv *http.Server) error

func ListenAndServeTLS

func ListenAndServeTLS(addr string, certFile, keyFile string, handler http.Handler) error

func LoginHandler

func LoginHandler(w http.ResponseWriter, r *http.Request)

Types

type AuthHandler

type AuthHandler struct {
	// contains filtered or unexported fields
}

func (AuthHandler) ServeHTTP

func (h AuthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type AuthManager

type AuthManager struct {
	// contains filtered or unexported fields
}

func InitAuthManager

func InitAuthManager(filename string) *AuthManager

func (*AuthManager) Key

func (am *AuthManager) Key() string

type StoppableListener

type StoppableListener struct {
	*net.TCPListener //Wrapped listener
	// contains filtered or unexported fields
}

https://github.com/hydrogen18/stoppableListener/blob/master/listener.go

func New

func New(l net.Listener, tcpL *net.TCPListener, certFile string, keyFile string) (*StoppableListener, error)

func (*StoppableListener) Accept

func (sl *StoppableListener) Accept() (net.Conn, error)

Jump to

Keyboard shortcuts

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