http

package
v0.0.0-...-38d8a97 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeConfigureRequest

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

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

func DecodeConfigureResponse

func DecodeConfigureResponse(_ context.Context, r *http.Response) (interface{}, error)

DecodeConfigureResponse is a transport/http.DecodeResponseFunc that decodes a JSON-encoded configure response from the HTTP response body. If the response has a non-200 status code, we will interpret that as an error and attempt to decode the specific error message from the response body. Primarily useful in a client.

func DecodeInitRequest

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

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

func DecodeInitResponse

func DecodeInitResponse(_ context.Context, r *http.Response) (interface{}, error)

DecodeInitResponse is a transport/http.DecodeResponseFunc that decodes a JSON-encoded init response from the HTTP response body. If the response has a non-200 status code, we will interpret that as an error and attempt to decode the specific error message from the response body. Primarily useful in a client.

func DecodeInitStatusRequest

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

DecodeInitStatusRequest is a transport/http.DecodeRequestFunc that is basically a noop. Normally, this method's default behavior is to decode a JSON-encoded request from the HTTP request body. Primarily useful in a server.

func DecodeInitStatusResponse

func DecodeInitStatusResponse(_ context.Context, r *http.Response) (interface{}, error)

DecodeInitStatusResponse is a transport/http.DecodeResponseFunc that decodes a JSON-encoded initStatus response from the HTTP response body. If the response has a non-200 status code, we will interpret that as an error and attempt to decode the specific error message from the response body. Primarily useful in a client.

func DecodeSealStatusRequest

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

DecodeSealStatusRequest is a transport/http.DecodeRequestFunc that is basically a noop. Normally, this method's default behavior is to decode a JSON-encoded request from the HTTP request body. Primarily useful in a server.

func DecodeSealStatusResponse

func DecodeSealStatusResponse(_ context.Context, r *http.Response) (interface{}, error)

DecodeSealStatusResponse is a transport/http.DecodeResponseFunc that decodes a JSON-encoded sealstatus response from the HTTP response body. If the response has a non-200 status code, we will interpret that as an error and attempt to decode the specific error message from the response body. Primarily useful in a client.

func DecodeUnsealRequest

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

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

func DecodeUnsealResponse

func DecodeUnsealResponse(_ context.Context, r *http.Response) (interface{}, error)

DecodeUnsealResponse is a transport/http.DecodeResponseFunc that decodes a JSON-encoded unseal response from the HTTP response body. If the response has a non-200 status code, we will interpret that as an error and attempt to decode the specific error message from the response body. Primarily useful in a client.

func EncodeGenericRequest

func EncodeGenericRequest(_ context.Context, r *http.Request, request interface{}) error

EncodeGenericRequest is a transport/http.EncodeRequestFunc that JSON-encodes any request to the request body. Primarily useful in a client.

func EncodeGenericResponse

func EncodeGenericResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error

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

func EncodeInitRequest

func EncodeInitRequest(_ context.Context, r *http.Request, request interface{}) error

EncodeInitRequest is a transport/http.EncodeRequestFunc that JSON-encodes the init request to the request body. Primarily useful in a client.

func NewHandler

func NewHandler(ctx context.Context, endpoints endpoints.Endpoints, tracer stdopentracing.Tracer, logger log.Logger) http.Handler

NewHandler 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