govalintesting

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPTestUtil

func HTTPTestUtil(serverF TestFunc, testFunc ExecFunc)

Types

type ExecFunc

type ExecFunc func(http GovalinHTTP)

type GovalinHTTP

type GovalinHTTP struct {
	Host string
	// contains filtered or unexported fields
}

GovalinHTTP is a simple wrapper with utility methods to simplify testing.

func (*GovalinHTTP) Get

func (govalinHttp *GovalinHTTP) Get(path string, params ...interface{}) string

func (*GovalinHTTP) GetResponse

func (govalinHttp *GovalinHTTP) GetResponse(path string, params ...interface{}) *httpclient.Response

func (*GovalinHTTP) Post

func (govalinHttp *GovalinHTTP) Post(path string, postData any) string

func (*GovalinHTTP) PostResponse

func (govalinHttp *GovalinHTTP) PostResponse(path string, postData interface{}) *httpclient.Response

func (*GovalinHTTP) Raw

func (govalinHttp *GovalinHTTP) Raw() *httpclient.HttpClient

type TestFunc

type TestFunc func(app *govalin.App) *govalin.App

Jump to

Keyboard shortcuts

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