invdmockserver

package
v6.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadJsonMappings

func LoadJsonMappings() error

func New

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

func NewJsonFileServer

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

Types

type BodyPatterns

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

type RRActionMap

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

func GetRRActionMap

func GetRRActionMap() *RRActionMap

func NewRRActionMap

func NewRRActionMap() *RRActionMap

func (*RRActionMap) Get

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

func (*RRActionMap) Put

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

type RRActionObject

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

type RequestObject

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

type ResponseObject

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