internal

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockTestServer

type MockTestServer struct {
	NonTLS *MockTestServerInstance
	TLS    *MockTestServerInstance
}

MockTestServer is a mock web server. The server supports both HTTPS and HTTP.

func NewMockTestServer

func NewMockTestServer(pathMap map[string]string, tlsEnabled bool) (*MockTestServer, error)

NewMockTestServer return an instance of MockTestServer running with and without TLS.

func (*MockTestServer) Close

func (srv *MockTestServer) Close()

Close closes running instances of MockTestServerInstance, if any.

type MockTestServerInstance

type MockTestServerInstance struct {
	Instance *httptest.Server
	URL      *url.URL
	Hostname string
	Protocol string
	Port     int
}

MockTestServerInstance is an instance of a mock web server.

Jump to

Keyboard shortcuts

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