routebuilder: github.com/askm3/routebuilder/middleware Index | Files

package middleware

import "github.com/askm3/routebuilder/middleware"

Index

Package Files

audit.go basicAuth.go customHeaders.go

func Audith Uses

func Audith(ca CustomAuditor) routebuilder.Middleware

func BasicAuditor Uses

func BasicAuditor(a Auditor) routebuilder.Middleware

func BasicAuth Uses

func BasicAuth(auth Authenticate) routebuilder.Middleware

func CustomHeader Uses

func CustomHeader(k, v string) func(h http.HandlerFunc) http.HandlerFunc

func Headers Uses

func Headers(headers map[string]string) func(h http.HandlerFunc) http.HandlerFunc

type Auditor Uses

type Auditor interface {
    BasicAudit(user, path, query string) error
}

type Authenticate Uses

type Authenticate func(user, pwd string) (int, error)

type CustomAuditor Uses

type CustomAuditor interface {
    CollectAuditInfo(h http.Header)
    DoAudit(info map[string]string)
}

Package middleware imports 3 packages (graph). Updated 2019-11-13. Refresh now. Tools for package owners.