http

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 12 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicAuth

func BasicAuth(username, passwd string) string

func CanonicalHost

func CanonicalHost(host string) (string, error)

canonicalHost strips port from host if present and returns the canonicalized host name.

func OkResponse

func OkResponse() *http.Response

func ParseBasicAuth

func ParseBasicAuth(auth string) (username, password string, ok bool)

func ProxyUnauthorizedResponse

func ProxyUnauthorizedResponse() *http.Response

Types

type RouterRegisterHelper

type RouterRegisterHelper struct {
	Router         *mux.Router
	AssetsFS       http.FileSystem
	AuthMiddleware mux.MiddlewareFunc
}

type Server

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

func NewServer

func NewServer(cfg v1.WebServerConfig) (*Server, error)

func (*Server) Address

func (s *Server) Address() string

func (*Server) Close

func (s *Server) Close() error

func (*Server) RouteRegister

func (s *Server) RouteRegister(register func(helper *RouterRegisterHelper))

func (*Server) Run

func (s *Server) Run() error

Jump to

Keyboard shortcuts

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