Documentation ¶
Index ¶
- func Elapsed(what string) func()
- func EnrichPathParams(r *http.Request, params map[string]string)
- func EnrichRequestBody(r *http.Request) error
- func EnrichRule(req *http.Request, r *rule.Rule)
- func ExtractMiddleware(r *http.Request, name string) (rule.MiddlewareSpec, bool)
- func ExtractPathParams(r *http.Request) (map[string]string, bool)
- func ExtractRequestBody(r *http.Request) (io.ReadCloser, bool)
- func ExtractRule(r *http.Request) (*rule.Rule, bool)
- type Attribute
- type AttributeType
- type Middleware
- type MiddlewareInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnrichRequestBody ¶
func ExtractMiddleware ¶
func ExtractRequestBody ¶
func ExtractRequestBody(r *http.Request) (io.ReadCloser, bool)
Types ¶
type Attribute ¶
type Attribute struct { Key string `yaml:"key" mapstructure:"key"` Type AttributeType `yaml:"type" mapstructure:"type"` Index string `yaml:"index" mapstructure:"index"` // proto index Path string `yaml:"path" mapstructure:"path"` Params []string `yaml:"params" mapstructure:"params"` Value string `yaml:"value" mapstructure:"value"` }
type AttributeType ¶
type AttributeType string
const ( AttributeTypeQuery AttributeType = "query" AttributeTypeHeader AttributeType = "header" AttributeTypeJSONPayload AttributeType = "json_payload" AttributeTypeGRPCPayload AttributeType = "grpc_payload" AttributeTypePathParam AttributeType = "path_param" AttributeTypeConstant AttributeType = "constant" )
type Middleware ¶
type Middleware interface { Info() *MiddlewareInfo ServeHTTP(rw http.ResponseWriter, req *http.Request) }
type MiddlewareInfo ¶
Click to show internal directories.
Click to hide internal directories.