handler

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnforcerHandler added in v0.0.3

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

func NewEnforcer added in v0.0.3

func NewEnforcer(cfg *config.Config, logger log.Logger, query string) *EnforcerHandler

NewEnforcer returns a Enforcer handler

func (*EnforcerHandler) BasicAuth added in v0.0.3

BasicAuth enforces our autentication and returns the correct config

func (*EnforcerHandler) Error added in v0.0.3

func (h *EnforcerHandler) Error(w http.ResponseWriter, code int, err error, msg string)

Error formats and logs our http errors

func (*EnforcerHandler) ServeHTTP added in v0.0.3

func (h *EnforcerHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP implements our required http.Handler interface

Jump to

Keyboard shortcuts

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