Back to godoc.org

Package tests

v0.0.0-...-3b0e19b
Latest Go to latest

The highest tagged major version is .

Published: Apr 26, 2016 | License: MIT | Module: github.com/appleboy/gin-jwt-server

Index

func RunGetWithHeaders

func RunGetWithHeaders(path string, headers map[string]string, handler RequestFunc, reply ResponseFunc)

func RunGetWithMiddlewares

func RunGetWithMiddlewares(path string, mws []gin.HandlerFunc, handler RequestFunc, reply ResponseFunc)

func RunPostWithMiddlewares

func RunPostWithMiddlewares(path, body string, mws []gin.HandlerFunc, handler RequestFunc, reply ResponseFunc)

func RunRequest

func RunRequest(rc RequestConfig)

func RunSimpleGet

func RunSimpleGet(path string, handler RequestFunc, reply ResponseFunc)

func RunSimplePost

func RunSimplePost(path, body string, handler RequestFunc, reply ResponseFunc)

type RequestConfig

type RequestConfig struct {
	Method      string
	Path        string
	Body        string
	Headers     map[string]string
	Middlewares []gin.HandlerFunc
	Handler     RequestFunc
	Finaliser   ResponseFunc
}

type RequestFunc

type RequestFunc func(*gin.Context)

request handling func type to replace gin.HandlerFunc

type ResponseFunc

type ResponseFunc func(*httptest.ResponseRecorder)

response handling func type

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier