echokit

package
v0.8.10 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const OK = "OK"

OK is status when no error

Variables

This section is empty.

Functions

func DoDELETE

func DoDELETE(handler echo.HandlerFunc, url string, urlParams map[string]string) (rec *httptest.ResponseRecorder, err error)

DoDELETE return echo.Context and httptest.ResponseRecorder for DELETE Request

func DoGET

func DoGET(handler echo.HandlerFunc, url string, urlParams map[string]string) (rec *httptest.ResponseRecorder, err error)

DoGET return echo.Context and httptest.ResponseRecorder for GET Request

func DoPOST

func DoPOST(handler echo.HandlerFunc, url string, json string) (rec *httptest.ResponseRecorder, err error)

DoPOST return echo.Context and httptest.ResponseRecorder for POST Request

func DoPUT

func DoPUT(handler echo.HandlerFunc, url string, json string) (rec *httptest.ResponseRecorder, err error)

DoPUT return echo.Context and httptest.ResponseRecorder for POST Request

func DoRequest added in v0.6.3

func DoRequest(handler echo.HandlerFunc, req *http.Request, urlParams map[string]string) (rec *httptest.ResponseRecorder, err error)

DoRequest return echo.Context and httptest.ResponseRecorder for Request

Types

type HealthCheck

type HealthCheck map[string]string

HealthCheck is key-value store that contain health check information

func NewHealthCheck

func NewHealthCheck() HealthCheck

NewHealthCheck return new instance of HealthCheck

func (HealthCheck) Add

func (c HealthCheck) Add(name string, err error) HealthCheck

Add name and error to register as heath check

func (HealthCheck) NotOK

func (c HealthCheck) NotOK() bool

NotOK return true is some error registered

func (HealthCheck) Send

func (c HealthCheck) Send(ctx echo.Context) error

Send healthcheck response

Jump to

Keyboard shortcuts

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