wrapper

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2017 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 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) ([]byte, error)

func FlushCache added in v0.11.1

func FlushCache(target configuration.Target) 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 GetLogs added in v0.11.4

func GetLogs(target configuration.Target, format string) ([]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) (string, 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 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 Start added in v0.11.1

func Start(target *configuration.Target, hoverflyDirectory configuration.HoverflyDirectory) 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