invdmockserver

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadJsonMappings added in v1.0.1

func LoadJsonMappings() error

func New

func New(code int, body interface{}, dataType string, ssl bool) (*httptest.Server, error)

func NewJsonFileServer added in v1.0.1

func NewJsonFileServer(ssl bool) (*httptest.Server, error)

Types

type BodyPatterns added in v1.0.1

type BodyPatterns struct {
	EqualToJson string `json:"equalToJson,omitempty"`
}

type RRActionMap added in v1.0.1

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

func GetRRActionMap added in v1.0.1

func GetRRActionMap() *RRActionMap

func NewRRActionMap added in v1.0.1

func NewRRActionMap() *RRActionMap

func (*RRActionMap) Get added in v1.0.1

func (r *RRActionMap) Get(method, url, body string) (*RRActionObject, bool, error)

func (*RRActionMap) Put added in v1.0.1

func (r *RRActionMap) Put(rrActionObject *RRActionObject) error

type RRActionObject added in v1.0.1

type RRActionObject struct {
	Request  RequestObject  `json:"request,omitempty"`
	Response ResponseObject `json:"response,omitempty"`
}

type RequestObject added in v1.0.1

type RequestObject struct {
	Method string         `json:"method,omitempty"`
	Url    string         `json:"url,omitempty"`
	Body   []BodyPatterns `json:"bodyPatterns"`
}

type ResponseObject added in v1.0.1

type ResponseObject struct {
	Status int    `json:"status,omitempty"`
	Body   string `json:"body,omitempty"`
}

Jump to

Keyboard shortcuts

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