httptest

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGrpcServerMock added in v0.12.0

func NewGrpcServerMock(serverHost string, registerServers func(*grpc.Server)) *grpcServerMock

func NewHttpServerMock

func NewHttpServerMock(serverHost string, httpServerMocks map[string]HttpServerMockResponseFunc) *gohttptest.Server

Types

type HttpServerMockResponse

type HttpServerMockResponse struct {
	Status  int
	Headers map[string]string
	Body    string
}

type HttpServerMockResponseFunc

type HttpServerMockResponseFunc func() HttpServerMockResponse

func NewHttpServerMockResponseFunc added in v0.12.0

func NewHttpServerMockResponseFunc(status int, headers map[string]string, body string) HttpServerMockResponseFunc

func NewHttpServerMockResponseFuncJSON added in v0.12.0

func NewHttpServerMockResponseFuncJSON(body string) HttpServerMockResponseFunc

func NewHttpServerMockResponseFuncPlain added in v0.12.0

func NewHttpServerMockResponseFuncPlain(body string) HttpServerMockResponseFunc

Jump to

Keyboard shortcuts

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