Documentation ¶
Overview ¶
Package headertojson implements a filter to convert HTTP request header to json.
Index ¶
- Constants
- type HeaderMap
- type HeaderToJSON
- func (h *HeaderToJSON) Close()
- func (h *HeaderToJSON) Handle(ctx *context.Context) string
- func (h *HeaderToJSON) Inherit(previousGeneration filters.Filter)
- func (h *HeaderToJSON) Init()
- func (h *HeaderToJSON) Kind() *filters.Kind
- func (h *HeaderToJSON) Name() string
- func (h *HeaderToJSON) Spec() filters.Spec
- func (h *HeaderToJSON) Status() interface{}
- type Spec
Constants ¶
View Source
const (
// Kind is the kind of Kafka
Kind = "HeaderToJSON"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeaderMap ¶
type HeaderMap struct { Header string `json:"header" jsonschema:"required"` JSON string `json:"json" jsonschema:"required"` }
HeaderMap defines relationship between http header and json
type HeaderToJSON ¶
type HeaderToJSON struct {
// contains filtered or unexported fields
}
HeaderToJSON put http request headers into body as JSON fields.
func (*HeaderToJSON) Handle ¶
func (h *HeaderToJSON) Handle(ctx *context.Context) string
Handle handle Context
func (*HeaderToJSON) Inherit ¶
func (h *HeaderToJSON) Inherit(previousGeneration filters.Filter)
Inherit init HeaderToJSON based on previous generation
func (*HeaderToJSON) Kind ¶
func (h *HeaderToJSON) Kind() *filters.Kind
Kind return kind of HeaderToJSON
func (*HeaderToJSON) Name ¶
func (h *HeaderToJSON) Name() string
Name returns the name of the HeaderToJSON filter instance.
func (*HeaderToJSON) Spec ¶
func (h *HeaderToJSON) Spec() filters.Spec
Spec returns the spec used by the HeaderToJSON
func (*HeaderToJSON) Status ¶
func (h *HeaderToJSON) Status() interface{}
Status return status of HeaderToJSON
Click to show internal directories.
Click to hide internal directories.