Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeProtoRequest

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

    EncodeProtoRequest is an EncodeRequestFunc that serializes the request as Protobuf. If the request implements Headerer, the provided headers will be applied to the request. If the given request does not implement proto.Message, an error will be returned.

    func EncodeProtoResponse

    func EncodeProtoResponse(ctx context.Context, w http.ResponseWriter, pres interface{}) error

      EncodeProtoResponse is an EncodeResponseFunc that serializes the response as Protobuf. Many Proto-over-HTTP services can use it as a sensible default. If the response implements Headerer, the provided headers will be applied to the response. If the response implements StatusCoder, the provided StatusCode will be used instead of 200.

      Types

      This section is empty.