client

package
v1.1.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(fs afero.Fs, opener configOpener, host string, port uint, httpClient http.Client) *wiremock

func NewDefaultClient

func NewDefaultClient(fs afero.Fs, opener configOpener) *wiremock

Types

type Accept added in v1.0.1

type Accept struct {
	Contains string `json:"contains"`
}

type Headers added in v1.0.1

type Headers struct {
	ContentType string `json:"Content-Type"`
}

type Metadata added in v1.0.1

type Metadata struct {
	Description string `json:"description"`
}

type Mock added in v1.0.1

type Mock struct {
	Name string `json:"name"`

	Request  Request  `json:"request"`
	Response Response `json:"response"`
	Metadata Metadata `json:"metadata"`
}

func DefaultMock added in v1.0.1

func DefaultMock() Mock

func (*Mock) WithDescription added in v1.0.1

func (m *Mock) WithDescription(description string) *Mock

func (*Mock) WithName added in v1.0.1

func (m *Mock) WithName(name string) *Mock

func (*Mock) WithRequestMethod added in v1.0.1

func (m *Mock) WithRequestMethod(method string) *Mock

func (*Mock) WithRequestUrlPath added in v1.0.1

func (m *Mock) WithRequestUrlPath(urlPath string) *Mock

func (*Mock) WithResponseBody added in v1.0.1

func (m *Mock) WithResponseBody(body string) *Mock

func (*Mock) WithResponseStatusCode added in v1.0.1

func (m *Mock) WithResponseStatusCode(statusCode int) *Mock

type Request added in v1.0.1

type Request struct {
	URLPath string `json:"urlPath"`
	Method  string `json:"method"`
}

type Response added in v1.0.1

type Response struct {
	Status  int     `json:"status"`
	Body    string  `json:"body"`
	Headers Headers `json:"headers"`
}

Jump to

Keyboard shortcuts

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