httpserve

package
v0.0.0-...-d091d85 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Overview

This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.

This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.

This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicAuthHandler

func BasicAuthHandler(next http.Handler, authOptions *AuthOptions) http.Handler

func ChangeAuthOptionsPass

func ChangeAuthOptionsPass(authOptions *AuthOptions, pass string, salt string)

func ChangeAuthOptionsUser

func ChangeAuthOptionsUser(authOptions *AuthOptions, user string)

func CreateCertificateIfNotExist

func CreateCertificateIfNotExist(certFile string, keyFile string, commonName string, bits int)

func ListenAndUpgradeTLS

func ListenAndUpgradeTLS(addr string, certFile string, keyFile string, handler http.Handler) error

func RandomString

func RandomString(len int) (string, error)

func Sha512Sum

func Sha512Sum(s string) string

Types

type AuthOptions

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

func NewAuthOptions

func NewAuthOptions(user string, pass string, salt string) (authOptions *AuthOptions)

Jump to

Keyboard shortcuts

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