mockspec

package
v0.0.0-...-a78fae4 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Delay

type Delay struct {
	DurationMs  int `json:"durationMs"`
	DeviationMs int `json:"deviationMs"`
}

Delay specifies delay of single endpoint.

type MockSpecification

type MockSpecification struct {
	Body       *string                `json:"body"`
	JSONBody   map[string]interface{} `json:"jsonBody"`
	Base64Body []byte                 `json:"base64Body"`
	Path       string                 `json:"path"`
	Status     int                    `json:"status"`
	Headers    http.Header            `json:"headers"`
	Delay      *Delay                 `json:"delay"`
}

MockSpecification specification of mock.

func CollectFromDirectory

func CollectFromDirectory(dir string) ([]MockSpecification, error)

CollectFromDirectory collect specifications from the specified directory.

Jump to

Keyboard shortcuts

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