web

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

README

web

Web tools and helpers

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoCertTLSConfig

func AutoCertTLSConfig(email string, policy autocert.HostPolicy) *tls.Config

func AutoCertWhitelist added in v0.0.2

func AutoCertWhitelist(email string, hosts ...string) *tls.Config

func BaseTLSConfig added in v0.0.3

func BaseTLSConfig() *tls.Config

func HTTP3Middleware

func HTTP3Middleware(next http.Handler, addr string) http.Handler

func LocalAndAutoCert added in v0.0.4

func LocalAndAutoCert(cert, key, email string, policy autocert.HostPolicy) *tls.Config

LocalAndAutoCert is loading both local and autocert Certificates Local certificates are checked first

func LocalTLSConfig

func LocalTLSConfig(certFile, keyFile string) *tls.Config

func RunServer

func RunServer(ctx context.Context, srv *http.Server)

func Server

func Server(opts ...func(*http.Server)) *http.Server

func TlsWithAutoCert added in v0.0.3

func TlsWithAutoCert(conf *tls.Config, email string, policy autocert.HostPolicy) *tls.Config

func TlsWithLocalCert added in v0.0.3

func TlsWithLocalCert(conf *tls.Config, certFile, keyFile string) (*tls.Config, error)

func VaultTLSConfig added in v0.0.8

func VaultTLSConfig(vaultAddr, vaultToken, vaultRole, cn string, ttl time.Duration) (*tls.Config, error)

func WithAddr

func WithAddr(addr string) func(*http.Server)

func WithHandler

func WithHandler(h http.Handler) func(*http.Server)

func WithTLSConfig

func WithTLSConfig(conf *tls.Config) func(*http.Server)

Types

This section is empty.

Jump to

Keyboard shortcuts

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