Versions in this module Expand all Collapse all v0 v0.1.1 Jul 16, 2017 v0.1.0 Jul 15, 2017 Changes in this version + const ContextKeyInboundAppID + func AllowIPNets(ipnets []*net.IPNet, denial interface{}) endpoint.Middleware + func CORSHandler(f http.Handler, originSuffix string) http.Handler + func EncodeProtoRequest(_ context.Context, r *http.Request, preq interface{}) error + func EncodeProtoResponse(ctx context.Context, w http.ResponseWriter, pres interface{}) error + func HTTPToFastRoute(fh http.Handler) httprouter.Handle + func Init(service Service) + func Internal(ep endpoint.Endpoint, denial interface{}) endpoint.Endpoint + func ParseIPNets(ipStr string) ([]*net.IPNet, error) + func ScalingHandler(ctx context.Context, _ interface{}) (interface{}, error) + func SetRouteVars(r *http.Request, val interface{}) *http.Request + func Vars(r *http.Request) map[string]string + type FastRouter struct + func (f *FastRouter) Handle(method, path string, h http.Handler) + func (f *FastRouter) HandleFunc(method, path string, h func(http.ResponseWriter, *http.Request)) + func (f *FastRouter) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (f *FastRouter) SetNotFoundHandler(h http.Handler) + type GorillaRouter struct + func (g *GorillaRouter) Handle(method, path string, h http.Handler) + func (g *GorillaRouter) HandleFunc(method, path string, h func(http.ResponseWriter, *http.Request)) + func (g *GorillaRouter) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (g *GorillaRouter) SetNotFoundHandler(h http.Handler) + type HTTPEndpoint struct + Decoder httptransport.DecodeRequestFunc + Encoder httptransport.EncodeResponseFunc + Endpoint endpoint.Endpoint + Options []httptransport.ServerOption + type JSONEndpointer interface + JSONEndpoints func() map[string]map[string]HTTPEndpoint + type JSONService interface + type JSONStatusResponse struct + func NewJSONStatusResponse(res interface{}, code int) *JSONStatusResponse + func (c *JSONStatusResponse) Error() string + func (c *JSONStatusResponse) MarshalJSON() ([]byte, error) + func (c *JSONStatusResponse) StatusCode() int + type MixedService interface + type ProtoEndpointer interface + ProtoEndpoints func() map[string]map[string]HTTPEndpoint + type ProtoService interface + type ProtoStatusResponse struct + func NewProtoStatusResponse(res proto.Message, code int) *ProtoStatusResponse + func (c *ProtoStatusResponse) Error() string + func (c *ProtoStatusResponse) Marshal() ([]byte, error) + func (c *ProtoStatusResponse) MarshalJSON() ([]byte, error) + func (c *ProtoStatusResponse) ProtoMessage() + func (c *ProtoStatusResponse) Reset() + func (c *ProtoStatusResponse) StatusCode() int + func (c *ProtoStatusResponse) String() string + type Router interface + Handle func(method string, path string, handler http.Handler) + HandleFunc func(method string, path string, ...) + ServeHTTP func(w http.ResponseWriter, r *http.Request) + SetNotFoundHandler func(handler http.Handler) + type RouterOption func(Router) Router + func CustomRouter(r Router) RouterOption + func RouterNotFound(h http.Handler) RouterOption + func RouterSelect(name string) RouterOption + type Server struct + func NewServer(svc Service) Server + func (s Server) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Service interface + HTTPMiddleware func(http.Handler) http.Handler + Middleware func(endpoint.Endpoint) endpoint.Endpoint + Options func() []httptransport.ServerOption + RouterOptions func() []RouterOption + type StdlibRouter struct + func (g *StdlibRouter) Handle(method, path string, h http.Handler) + func (g *StdlibRouter) HandleFunc(method, path string, h func(http.ResponseWriter, *http.Request)) + func (g *StdlibRouter) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (g *StdlibRouter) SetNotFoundHandler(h http.Handler)