httpsserver

package
v0.0.0-...-953a1d1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCerts

func CheckCerts(certPath, keyPath, host string) error

func LogRequest

func LogRequest(next http.Handler) http.Handler

func Recover

func Recover(h http.Handler) http.Handler

Recover - Recovering after panic in http handler.

Types

type Cert

type Cert struct {
	CaCert        []byte
	CaCertPool    *x509.CertPool
	CaCertificate tls.Certificate
}

func LoadCert

func LoadCert(certFile, keyFile string) (*Cert, error)

func (*Cert) CreateTLSConfig

func (c *Cert) CreateTLSConfig() *tls.Config

type Config

type Config interface {
	Host() string
	PortHTTPS() string
	HTTPSConnectionString() string
}

type Server

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

func NewServer

func NewServer(config Config) *Server

func (*Server) SetHTTPSRouter

func (s *Server) SetHTTPSRouter(handler http.Handler)

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context)

func (*Server) StartHTTPSServe

func (s *Server) StartHTTPSServe(cert, key string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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