package
0.0.0-20191020161600-58998d98f9ce
Repository: https://github.com/etherlabsio/pkg.git
Documentation: pkg.go.dev
# Functions
Chain is a helper function for composing middlewares.
CheckOKResponse checks if the status code is within 2XX range.
CheckResponse checks the API response for errors, and returns them if present.
EncodeJSONResponse encodes a response using the appropriate serializer function.
JSONErrorEncoder takes in a status coder and returns an HTTP error encoder.
NewServer creates an HTTP Server with pre-configured timeouts and a secure TLS Config.
# Type aliases
Middleware is a chainable decorator for HTTP Handlers.
Option configures an HTTP Server.
SerializerFunc serializes a specific response.