mock

package
v0.0.0-...-cf4d00b Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalJson

func MarshalJson(data interface{}) io.ReadCloser

func MarshalString

func MarshalString(data string) io.ReadCloser

Types

type HttpClient

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

func NewHttpClient

func NewHttpClient() *HttpClient

func (*HttpClient) AddGetResponse

func (h *HttpClient) AddGetResponse(res *http.Response, err error) *HttpClient

func (HttpClient) AddPlugin

func (h HttpClient) AddPlugin(p heimdall.Plugin)

func (*HttpClient) AddPostResponse

func (h *HttpClient) AddPostResponse(res *http.Response, err error) *HttpClient

func (*HttpClient) AddPutResponse

func (h *HttpClient) AddPutResponse(res *http.Response, err error) *HttpClient

func (HttpClient) Delete

func (h HttpClient) Delete(url string, headers http.Header) (*http.Response, error)

func (HttpClient) Do

func (h HttpClient) Do(req *http.Request) (*http.Response, error)

func (HttpClient) Get

func (h HttpClient) Get(url string, headers http.Header) (*http.Response, error)

func (HttpClient) Patch

func (h HttpClient) Patch(url string, body io.Reader, headers http.Header) (*http.Response, error)

func (*HttpClient) Post

func (h *HttpClient) Post(url string, body io.Reader, headers http.Header) (*http.Response, error)

func (HttpClient) Put

func (h HttpClient) Put(url string, body io.Reader, headers http.Header) (*http.Response, error)

Directories

Path Synopsis
infra
database
Package mock_database is a generated GoMock package.
Package mock_database is a generated GoMock package.

Jump to

Keyboard shortcuts

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