Documentation ¶
Index ¶
- func AddSimulation(target configuration.Target, simulationData string) error
- func BuildURL(target configuration.Target, endpoint string) string
- func CheckIfRunning(target configuration.Target) error
- func DeleteAllDiffs(target configuration.Target) error
- func DeleteCurrentState(target configuration.Target) error
- func DeleteSimulations(target configuration.Target) error
- func ExportSimulation(target configuration.Target, urlPattern string) (v2.SimulationViewV5, error)
- func FlushCache(target configuration.Target) error
- func GetAllDiffs(target configuration.Target) ([]v2.ResponseDiffForRequestView, error)
- func GetCurrentState(target configuration.Target) (map[string]string, error)
- func GetDestination(target configuration.Target) (string, error)
- func GetHoverfly(target configuration.Target) (*v2.HoverflyView, error)
- func GetLogs(target configuration.Target, format string, filterTime *time.Time) ([]string, error)
- func GetMiddleware(target configuration.Target) (v2.MiddlewareView, error)
- func GetMode(target configuration.Target) (*v2.ModeView, 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 PatchCurrentState(target configuration.Target, key, value 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 SetPACFile(target configuration.Target) 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 AddSimulation ¶ added in v1.0.1
func AddSimulation(target configuration.Target, simulationData string) error
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 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 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
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
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"`
}