test

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteEndpoint

func DeleteEndpoint() *httptest.Server

DeleteEndpoint is a HTTP mock endpoint to simulate a DELETE request that responds without data. The only valid path is "/delete".

func GetEndpoint

func GetEndpoint() *httptest.Server

GetEndpoint is a HTTP mock endpoint to simulate a GET request that responds with data. The only valid path is "/get".

func GetEndpointWithHeader

func GetEndpointWithHeader() *httptest.Server

GetEndpointWithHeader is a HTTP mock endpoint to simulate a GET request that await for "test-header" header in the request. The server will respond with a 404 status code if the incoming request do not contains the header. The only valid path is "/get".

func GetPingEndpoint

func GetPingEndpoint() *httptest.Server

GetPingEndpoint is a HTTP mock endpoint used for testing. The ping url is "/".

func PostEndpoint

func PostEndpoint() *httptest.Server

PostEndpoint is a HTTP mock endpoint to simulate a POST request that responds without data. The only valid path is "/post".

func PutEndpoint

func PutEndpoint() *httptest.Server

PutEndpoint is a HTTP mock endpoint to simulate a PUT request that responds without data. The only valid path is "/put".

Types

This section is empty.

Jump to

Keyboard shortcuts

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