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 DeleteCsvDataSource(dataSourceName string, target configuration.Target) error
- func DeleteCurrentState(target configuration.Target) error
- func DeleteJournalIndex(indexName string, target configuration.Target) error
- func DeletePostServeAction(actionName string, 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 GetAllJournalIndexes(target configuration.Target) ([]v2.JournalIndexView, error)
- func GetAllPostServeActions(target configuration.Target) (v2.PostServeActionDetailsView, error)
- func GetAllTemplateDataSources(target configuration.Target) (v2.TemplateDataSourceView, 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 SetCsvTemplateDataSource(dataSourceName, scriptContent string, target configuration.Target) error
- func SetDestination(target configuration.Target, destination string) (string, error)
- func SetJournalIndex(indexName string, target configuration.Target) error
- func SetLocalPostServeAction(actionName, binary, scriptContent string, delayInMs int, ...) 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 SetRemotePostServeAction(actionName, remote string, delayInMs int, 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 DeleteCsvDataSource ¶ added in v1.7.0
func DeleteCsvDataSource(dataSourceName string, target configuration.Target) error
func DeleteCurrentState ¶ added in v0.14.0
func DeleteCurrentState(target configuration.Target) error
func DeleteJournalIndex ¶ added in v1.8.0
func DeleteJournalIndex(indexName string, target configuration.Target) error
func DeletePostServeAction ¶ added in v1.6.0
func DeletePostServeAction(actionName string, 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 GetAllJournalIndexes ¶ added in v1.8.0
func GetAllJournalIndexes(target configuration.Target) ([]v2.JournalIndexView, error)
func GetAllPostServeActions ¶ added in v1.6.0
func GetAllPostServeActions(target configuration.Target) (v2.PostServeActionDetailsView, error)
func GetAllTemplateDataSources ¶ added in v1.7.0
func GetAllTemplateDataSources(target configuration.Target) (v2.TemplateDataSourceView, 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 SetCsvTemplateDataSource ¶ added in v1.7.0
func SetCsvTemplateDataSource(dataSourceName, scriptContent string, target configuration.Target) 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 SetJournalIndex ¶ added in v1.8.0
func SetJournalIndex(indexName string, target configuration.Target) error
func SetLocalPostServeAction ¶ added in v1.9.0
func SetLocalPostServeAction(actionName, binary, scriptContent string, delayInMs int, target configuration.Target) error
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 SetRemotePostServeAction ¶ added in v1.9.0
func SetRemotePostServeAction(actionName, remote string, delayInMs int, 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"`
}