restclient

package
v0.0.0-...-733830a Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMockup

func AddMockup(mock Mock)

AddMockup - load the mock values

func FlushMocks

func FlushMocks()

func GetMockID

func GetMockID(httpMethod string, url string) string

func Post

func Post(url string, body interface{}, headers http.Header) (*http.Response, error)

Post method function

func StartMockups

func StartMockups()

StartMockups - throw a bool to as a mode controller

func StopMockups

func StopMockups()

StopMockups - throw a bool reset as mode controller

Types

type Mock

type Mock struct {
	URL        string
	HTTPMethod string
	Response   *http.Response
	Err        error
}

Mock struct to hold the mock values

Jump to

Keyboard shortcuts

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