data

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Caller

type Caller struct {
	IP string `json:"ip"`
}

Caller contains informatie of the client which made the request

type RequestData

type RequestData struct {
	Host        map[string]string `json:"host"`
	Environment map[string]string `json:"env"`
	Headers     map[string]string `json:"headers"`
	QueryParams map[string]string `json:"query"`
	Caller      Caller            `json:"caller"`
	Body        string            `json:"body"`
}

RequestData struct holds the data to be returned (and reflect how the request looks like)

func GetCallData

func GetCallData(c echo.Context) RequestData

GetCallData turns a echo.Context into a RequestData struct

func (*RequestData) GetHeaders

func (req *RequestData) GetHeaders(h http.Header)

GetHeaders reads http.Header and put them in a req.Headers map

Jump to

Keyboard shortcuts

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