Categorygithub.com/unixpickle/ezserver
modulepackage
0.1.0
Repository: https://github.com/unixpickle/ezserver.git
Documentation: pkg.go.dev

# README

ezserver

This is an easy-to-use wrapper around Go's HTTP and HTTPS servers.

Demonstrations

Checkout the demo folder for some samples.

License

ezserver is licensed under the BSD 2-clause license. See LICENSE.

Copyright (c) 2014-2015, Alex Nichol.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer. 
2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# Packages

No description provided by the author

# Functions

NewHTTP creates a new HTTP server with a given handler.
NewHTTPS creates a new HTTPS server with a given handler.

# Variables

Errors relating to HTTP or HTTPS servers.
Errors relating to HTTP or HTTPS servers.
Errors relating to HTTP or HTTPS servers.
Errors relating to HTTP or HTTPS servers.

# Structs

HTTP is an HTTP server instance which can listen on one port at a time.
HTTPS is an HTTPS server instance which can listen on one port at a time.
KeyCert represents a TLS key/centificate pair.
TLSConfig represents the TLS configuration for an HTTPS server.

# Interfaces

Server serves some sort of web content on a specified port.

# Type aliases

An AutocertHandler is a function which handles certain HTTP requests for ACME verification.