mockserver

package
v0.0.0-...-bde254b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIBuilder

type APIBuilder struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(t *testing.T) *APIBuilder

NewAPI creates new APIBuilder

func (*APIBuilder) Build

func (b *APIBuilder) Build() *httptest.Server

Build returns new http.Server hosting API mocks

func (*APIBuilder) HttpReqMock

func (b *APIBuilder) HttpReqMock(endpoint string, code int, response []byte, wait time.Duration) *APIBuilder

func (*APIBuilder) WithHandler

func (b *APIBuilder) WithHandler(pattern string, handler http.HandlerFunc) *APIBuilder

Jump to

Keyboard shortcuts

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