server

package
v0.3.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run added in v0.0.14

func Run(ctx context.Context, addr string, c controller.Controller) error

Run creates the HTTP handler based on an implementation of a controller.Controller interface, and begins to listen on the specified address.

func RunTLS added in v0.0.17

func RunTLS(ctx context.Context, addr string, cert string, key string, c controller.Controller) error

RunTLS creates the HTTPS handler based on an implementation of a controller.Controller interface, and begins to listen on the specified address.

Types

type ErrorWithHTTPStatus added in v0.1.40

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

ErrorWithHTTPStatus is an error that also defines the HTTP status code that should be returned to the client making the request

func NewErrorWithHTTPStatus added in v0.1.40

func NewErrorWithHTTPStatus(err string, httpStatus int) ErrorWithHTTPStatus

NewErrorWithHTTPStatus creates a new ErrorWithHTTPStatus with the given error message and HTTP status code

func (ErrorWithHTTPStatus) Error added in v0.1.40

func (e ErrorWithHTTPStatus) Error() string

func (ErrorWithHTTPStatus) HTTPStatus added in v0.1.40

func (e ErrorWithHTTPStatus) HTTPStatus() int

HTTPStatus returns the HTTP status code that should be returned to the client

Jump to

Keyboard shortcuts

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