wrapper

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSimulation added in v1.0.1

func AddSimulation(target configuration.Target, simulationData string) error

func BuildURL added in v0.11.2

func BuildURL(target configuration.Target, endpoint string) string

func CheckIfRunning added in v0.11.5

func CheckIfRunning(target configuration.Target) error

func DeleteAllDiffs added in v0.16.0

func DeleteAllDiffs(target configuration.Target) error

func DeleteCurrentState added in v0.14.0

func DeleteCurrentState(target configuration.Target) error

func DeleteSimulations added in v0.11.1

func DeleteSimulations(target configuration.Target) error

Wipe will call the records endpoint in Hoverfly with a DELETE request, triggering Hoverfly to wipe the database

func ExportSimulation added in v0.11.1

func ExportSimulation(target configuration.Target, urlPattern string) (v2.SimulationViewV5, error)

func FlushCache added in v0.11.1

func FlushCache(target configuration.Target) error

func GetAllDiffs added in v0.16.0

func GetAllDiffs(target configuration.Target) ([]v2.ResponseDiffForRequestView, error)

func GetCurrentState added in v0.14.0

func GetCurrentState(target configuration.Target) (map[string]string, error)

func GetDestination added in v0.11.1

func GetDestination(target configuration.Target) (string, error)

GetDestination will go the destination endpoint in Hoverfly, parse the JSON response and return the destination of Hoverfly

func GetHoverfly added in v0.15.0

func GetHoverfly(target configuration.Target) (*v2.HoverflyView, error)

GetHoverfly will get the Hoverfly API which contains current configurations

func GetLogs added in v0.11.4

func GetLogs(target configuration.Target, format string, filterTime *time.Time) ([]string, error)

func GetMiddleware added in v0.11.1

func GetMiddleware(target configuration.Target) (v2.MiddlewareView, error)

GetMiddle will go the middleware endpoint in Hoverfly, parse the JSON response and return the middleware of Hoverfly

func GetMode added in v0.11.1

func GetMode(target configuration.Target) (*v2.ModeView, error)

GetMode will go the state endpoint in Hoverfly, parse the JSON response and return the mode of Hoverfly

func ImportSimulation added in v0.11.1

func ImportSimulation(target configuration.Target, simulationData string) error

func IsLocal added in v0.11.1

func IsLocal(url string) bool

func Login added in v0.11.1

func Login(target configuration.Target, username, password string) (string, error)

func PatchCurrentState added in v0.14.0

func PatchCurrentState(target configuration.Target, key, value string) error

func SetDestination added in v0.11.1

func SetDestination(target configuration.Target, destination string) (string, error)

SetDestination will go the destination endpoint in Hoverfly, sending JSON that will set the destination of Hoverfly

func SetMiddleware added in v0.11.1

func SetMiddleware(target configuration.Target, binary, script, remote string) (v2.MiddlewareView, error)

func SetModeWithArguments added in v0.11.1

func SetModeWithArguments(target configuration.Target, modeView *v2.ModeView) (string, error)

Set will go the state endpoint in Hoverfly, sending JSON that will set the mode of Hoverfly

func SetPACFile added in v0.17.4

func SetPACFile(target configuration.Target) error

func Start added in v0.11.1

func Start(target *configuration.Target) error

func Stop added in v0.11.1

func Stop(target configuration.Target) error

func UnmarshalToInterface added in v0.11.4

func UnmarshalToInterface(response *http.Response, v interface{}) error

Types

type APIDelaySchema

type APIDelaySchema struct {
	Data []ResponseDelaySchema `json:"data"`
}

type APIStateSchema

type APIStateSchema struct {
	Mode        string `json:"mode"`
	Destination string `json:"destination"`
}

type ErrorSchema

type ErrorSchema struct {
	ErrorMessage string `json:"error"`
}

type HoverflyAuthSchema

type HoverflyAuthSchema struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type HoverflyAuthTokenSchema

type HoverflyAuthTokenSchema struct {
	Token string `json:"token"`
}

type MiddlewareSchema

type MiddlewareSchema struct {
	Middleware string `json:"middleware"`
}

type ResponseDelaySchema

type ResponseDelaySchema struct {
	UrlPattern string `json:"urlpattern"`
	Delay      int    `json:"delay"`
	HttpMethod string `json:"httpmethod"`
}

Jump to

Keyboard shortcuts

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