headertojson

package
v1.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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 `yaml:"header" jsonschema:"required"`
	JSON   string `yaml:"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) Close

func (h *HeaderToJSON) Close()

Close close HeaderToJSON

func (*HeaderToJSON) DefaultSpec

func (h *HeaderToJSON) DefaultSpec() interface{}

DefaultSpec return default spec of HeaderToJSON

func (*HeaderToJSON) Description

func (h *HeaderToJSON) Description() string

Description return description of HeaderToJSON

func (*HeaderToJSON) Handle

func (h *HeaderToJSON) Handle(ctx context.HTTPContext) string

Handle handle HTTPContext

func (*HeaderToJSON) Inherit

func (h *HeaderToJSON) Inherit(filterSpec *httppipeline.FilterSpec, previousGeneration httppipeline.Filter)

Inherit init HeaderToJSON based on previous generation

func (*HeaderToJSON) Init

func (h *HeaderToJSON) Init(filterSpec *httppipeline.FilterSpec)

Init init HeaderToJSON

func (*HeaderToJSON) Kind

func (h *HeaderToJSON) Kind() string

Kind return kind of HeaderToJSON

func (*HeaderToJSON) Results

func (h *HeaderToJSON) Results() []string

Results return possible results of HeaderToJSON

func (*HeaderToJSON) Status

func (h *HeaderToJSON) Status() interface{}

Status return status of HeaderToJSON

type Spec

type Spec struct {
	HeaderMap []*HeaderMap `yaml:"headerMap" jsonschema:"required"`
}

Spec is spec of HeaderToJson

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL