Help us shape the future of Go! Take the 2026 Go Developer Survey

mockhttp

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 8 Imported by: 0

README

gomockhttp

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiMock

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

func Api

func Api(t *testing.T) *ApiMock

func (*ApiMock) Close

func (mockedApi *ApiMock) Close()

func (*ApiMock) GetHost

func (mockedApi *ApiMock) GetHost() string

func (*ApiMock) GetUrl

func (mockedApi *ApiMock) GetUrl() *url.URL

func (*ApiMock) Stub

func (mockedApi *ApiMock) Stub(method string, path string) *StubBuilder

type HttpCall

type HttpCall struct {
	Method string
	Path   string
}

type Invocation

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

type StubBuilder

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

func (*StubBuilder) With

func (stub *StubBuilder) With(handler http.HandlerFunc) *ApiMock

func (*StubBuilder) WithJson

func (stub *StubBuilder) WithJson(statusCode int, content interface{}) *ApiMock

Jump to

Keyboard shortcuts

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