Documentation
¶
Overview ¶
support HTTP/2.
Index ¶
- func AdminOnly(next http.Handler) http.Handler
- func Certificate(dataDir, ip string) (tls.Certificate, error)
- func GenerateAccessToken(hmacSecret []byte, username string, expiration time.Time) (string, error)
- func GetRequestUsername(r *http.Request) string
- func Middleware(hmacSecret []byte, next http.Handler) http.Handler
- func SelfSignedListenAndServeTLS(dataDir, publicIP, addr string, handler http.Handler) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Certificate ¶ added in v0.0.3
func Certificate(dataDir, ip string) (tls.Certificate, error)
Certificate returns a self-signed x509 certificate and private key.
func GenerateAccessToken ¶
func GetRequestUsername ¶
func SelfSignedListenAndServeTLS ¶ added in v0.0.3
SelfSignedListenAndServeTLS listens on the TCP network address addr and then calls Serve with handler and a self-signed certificate to handle requests on incoming TLS connections.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.