mocker

package
v0.0.0-...-618e60b Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeConfigMock

func MakeConfigMock(cfg *config.Config) *config.Config

func MakeRedictMock

func MakeRedictMock() *redis.Client

Types

type RequestData

type RequestData struct {
	Host      string
	Path      string
	Method    string
	Body      string
	Headers   http.Header
	URLParams map[string]string

	// not request, per se, but needed for the handler
	Config *config.Config
	Rdb    *redis.Client
}

type Response

type Response struct {
	*api.Response
	StringBody string
}

func CallHandler

func CallHandler(handler router.WrappedHandler, data RequestData) (*Response, error)

Jump to

Keyboard shortcuts

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