testtool

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalMap

func MarshalMap(body interface{}) ([]byte, error)

func MustParseIPNet

func MustParseIPNet(str string) *types.IPNet

for testing

func UnmarshalToMapString

func UnmarshalToMapString(a json.RawMessage) map[string]interface{}

Types

type NopClient

type NopClient struct {
	*Client
	Transport      *httpmock.MockTransport
	RequestHeaders map[string]http.Header
	RequestBody    map[string]string
	Response       map[string]ResponseSpec
}

func NewNopClient

func NewNopClient(token, endpoint string, logger Logger) *NopClient

type ResponseSpec

type ResponseSpec struct {
	Code int
	Msg  interface{}
}

Jump to

Keyboard shortcuts

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