commands

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthUsers added in v0.5.0

func GetAuthUsers(r io.Reader) map[string]string

func Server

func Server(log *log.Logger, opt config.Flags, dir string) error

Server implements the static http server command.

func Version

func Version(version string, w io.Writer) error

Version implements the command `version` which outputs the current binary release version, if any.

Types

type HTTPServer added in v0.2.0

type HTTPServer interface {
	ListenAndServe() error
	ListenAndServeTLS(certFile, keyFile string) error
}

HTTPServer defines a returnable interface type for http.Server

func GetStdHTTPServer added in v0.2.0

func GetStdHTTPServer(addr string, h http.Handler) HTTPServer

GetStdHTTPServer returns a standard net/http.Server configured for a given address and handler, and other sane defaults.

Jump to

Keyboard shortcuts

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