Versions in this module Expand all Collapse all v1 v1.1.0 Jul 23, 2016 v1.0.0 Jun 15, 2016 Changes in this version + const MIMEWildcard + var DefaultContextTimeout = 0 * time.Second + var ErrInvalidPattern = errors.New("invalid pattern") + var ErrNotMatch = errors.New("not match to the path pattern") + var HTTPError = DefaultHTTPError + var OtherErrorHandler = DefaultOtherErrorHandler + func AnnotateContext(ctx context.Context, req *http.Request) (context.Context, error) + func Bool(val string) (bool, error) + func BoolP(val string) (*bool, error) + func DefaultHTTPError(ctx context.Context, marshaler Marshaler, w http.ResponseWriter, ...) + func DefaultOtherErrorHandler(w http.ResponseWriter, _ *http.Request, msg string, code int) + func Float32(val string) (float32, error) + func Float32P(val string) (*float32, error) + func Float64(val string) (float64, error) + func Float64P(val string) (*float64, error) + func ForwardResponseMessage(ctx context.Context, marshaler Marshaler, w http.ResponseWriter, ...) + func ForwardResponseStream(ctx context.Context, marshaler Marshaler, w http.ResponseWriter, ...) + func HTTPStatusFromCode(code codes.Code) int + func Int32(val string) (int32, error) + func Int32P(val string) (*int32, error) + func Int64(val string) (int64, error) + func Int64P(val string) (*int64, error) + func MarshalerForRequest(mux *ServeMux, r *http.Request) (inbound Marshaler, outbound Marshaler) + func NewServerMetadataContext(ctx context.Context, md ServerMetadata) context.Context + func PopulateFieldFromPath(msg proto.Message, fieldPathString string, value string) error + func PopulateQueryParameters(msg proto.Message, values url.Values, filter *utilities.DoubleArray) error + func String(val string) (string, error) + func StringP(val string) (*string, error) + func Uint32(val string) (uint32, error) + func Uint32P(val string) (*uint32, error) + func Uint64(val string) (uint64, error) + func Uint64P(val string) (*uint64, error) + type Decoder interface + Decode func(v interface{}) error + type DecoderFunc func(v interface{}) error + func (f DecoderFunc) Decode(v interface{}) error + type Encoder interface + Encode func(v interface{}) error + type EncoderFunc func(v interface{}) error + func (f EncoderFunc) Encode(v interface{}) error + type HandlerFunc func(w http.ResponseWriter, r *http.Request, pathParams map[string]string) + type JSONBuiltin struct + func (*JSONBuiltin) ContentType() string + func (j *JSONBuiltin) Marshal(v interface{}) ([]byte, error) + func (j *JSONBuiltin) NewDecoder(r io.Reader) Decoder + func (j *JSONBuiltin) NewEncoder(w io.Writer) Encoder + func (j *JSONBuiltin) Unmarshal(data []byte, v interface{}) error + type JSONPb jsonpb.Marshaler + func (*JSONPb) ContentType() string + func (j *JSONPb) Marshal(v interface{}) ([]byte, error) + func (j *JSONPb) NewDecoder(r io.Reader) Decoder + func (j *JSONPb) NewEncoder(w io.Writer) Encoder + func (j *JSONPb) Unmarshal(data []byte, v interface{}) error + type Marshaler interface + ContentType func() string + Marshal func(v interface{}) ([]byte, error) + NewDecoder func(r io.Reader) Decoder + NewEncoder func(w io.Writer) Encoder + Unmarshal func(data []byte, v interface{}) error + type Pattern struct + func MustPattern(p Pattern, err error) Pattern + func NewPattern(version int, ops []int, pool []string, verb string) (Pattern, error) + func (p Pattern) Match(components []string, verb string) (map[string]string, error) + func (p Pattern) String() string + func (p Pattern) Verb() string + type ServeMux struct + func NewServeMux(opts ...ServeMuxOption) *ServeMux + func (s *ServeMux) GetForwardResponseOptions() []func(context.Context, http.ResponseWriter, proto.Message) error + func (s *ServeMux) Handle(meth string, pat Pattern, h HandlerFunc) + func (s *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) + type ServeMuxOption func(*ServeMux) + func WithForwardResponseOption(...) ServeMuxOption + func WithMarshalerOption(mime string, marshaler Marshaler) ServeMuxOption + type ServerMetadata struct + HeaderMD metadata.MD + TrailerMD metadata.MD + func ServerMetadataFromContext(ctx context.Context) (md ServerMetadata, ok bool)