kit: github.com/go-kit/kit/transport/http/proto Index | Files

package proto

import "github.com/go-kit/kit/transport/http/proto"

Index

Package Files

client.go server.go

func EncodeProtoRequest Uses

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 Uses

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.

Package proto imports 7 packages (graph). Updated 2018-12-19. Refresh now. Tools for package owners.