types

package
v0.0.0-...-bc5839e Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler func(ctx context.Context, rw http.ResponseWriter, req *http.Request) error

Handler is the http request handler.

type HandlerSpec

type HandlerSpec struct {
	Method      string
	Path        string
	HandlerFunc Handler
}

HandlerSpec is used to describe a HTTP API.

func NewHandlerSpec

func NewHandlerSpec(method, path string, handler Handler) *HandlerSpec

NewHandlerSpec constructs a brand new HandlerSpec.

Jump to

Keyboard shortcuts

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