decoder

package
v0.0.0-...-44c4718 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

Decoder is the http decoder system for KCD.

func NewDecoder

func NewDecoder(
	req *http.Request,
	res http.ResponseWriter,
	stringsExtractors []extractor.Strings,
	valueExtractors []extractor.Value,
) *Decoder

NewDecoder create a new Decoder.

func (Decoder) Decode

func (d Decoder) Decode(c cache.StructCache, root reflect.Value) error

Decode will from cache struct and a root value decode the http request/response and set all extracted values inside the root parameter.

Jump to

Keyboard shortcuts

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