package
0.4.8
Repository: https://github.com/stratumn/go-core.git
Documentation: pkg.go.dev

# Functions

New creates an instance of Server.
NewErrHTTP creates an http error from an internal error.
NewErrInternalServer creates an internal server error.
NewErrNotFound creates an error not found.
NotFound is a handle for a route that is not found.
SetCORSHeaders sets expected CORS headers to allow calls from anywhere.

# Constants

DefaultMaxHeaderBytes is the default max header bytes.
DefaultReadTimeout is the default read timeout.
DefaultWriteTimeout is the default read timeout.

# Variables

ErrorCodeToHTTPCode maps internal error codes to http status code.

# Structs

Config contains configuration options for the server.
ErrHTTP is an error with an HTTP status code.
Server is the type that implements net/http.Handler.

# Type aliases

Handle is the function type for a route handle.
RawHandle is the function type for a non-JSON route handle.