http

package
v0.0.0-...-a4d875f Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeFooRequest

func DecodeFooRequest(_ context.Context, r *http.Request) (req interface{}, err error)

DecodeFooRequest is a transport/http.DecodeRequestFunc that decodes a JSON-encoded sum request from the HTTP request body. Primarily useful in a server.

func EncodeFooResponse

func EncodeFooResponse(_ context.Context, w http.ResponseWriter, response interface{}) (err error)

EncodeFooResponse is a transport/http.EncodeResponseFunc that encodes the response as JSON to the response writer. Primarily useful in a server.

func NewHTTPHandler

func NewHTTPHandler(endpoints endpoints.Endpoints) http.Handler

NewHTTPHandler returns a handler that makes a set of endpoints available on predefined paths.

Types

This section is empty.

Jump to

Keyboard shortcuts

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