Documentation ¶
Index ¶
- func BuildURL(target configuration.Target, endpoint string) string
- func CheckIfRunning(target configuration.Target) error
- func DeleteSimulations(target configuration.Target) error
- func ExportSimulation(target configuration.Target) ([]byte, error)
- func FlushCache(target configuration.Target) error
- func GetDestination(target configuration.Target) (string, error)
- func GetLogs(target configuration.Target, format string) ([]string, error)
- func GetMiddleware(target configuration.Target) (v2.MiddlewareView, error)
- func GetMode(target configuration.Target) (string, error)
- func ImportSimulation(target configuration.Target, simulationData string) error
- func IsLocal(url string) bool
- func Login(target configuration.Target, username, password string) (string, error)
- func SetDestination(target configuration.Target, destination string) (string, error)
- func SetMiddleware(target configuration.Target, binary, script, remote string) (v2.MiddlewareView, error)
- func SetModeWithArguments(target configuration.Target, modeView v2.ModeView) (string, error)
- func Start(target *configuration.Target, ...) error
- func Stop(target configuration.Target) error
- func UnmarshalToInterface(response *http.Response, v interface{}) error
- type APIDelaySchema
- type APIStateSchema
- type ErrorSchema
- type HoverflyAuthSchema
- type HoverflyAuthTokenSchema
- type MiddlewareSchema
- type ResponseDelaySchema
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 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
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
Types ¶
type APIDelaySchema ¶
type APIDelaySchema struct {
Data []ResponseDelaySchema `json:"data"`
}
type APIStateSchema ¶
type ErrorSchema ¶
type ErrorSchema struct {
ErrorMessage string `json:"error"`
}
type HoverflyAuthSchema ¶
type HoverflyAuthTokenSchema ¶
type HoverflyAuthTokenSchema struct {
Token string `json:"token"`
}
type MiddlewareSchema ¶
type MiddlewareSchema struct {
Middleware string `json:"middleware"`
}