Documentation ¶
Index ¶
- Constants
- Variables
- func ValidateSimulation(json, schema map[string]interface{}) error
- func ValidateSimulationSchemaFromFile(json map[string]interface{}, schema []byte) error
- type ActionView
- type CORSView
- type CSVDataSourceView
- type CacheHandler
- func (this *CacheHandler) Delete(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *CacheHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *CacheHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (this *CacheHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
- type CacheView
- type CachedResponseView
- type ClosestMissView
- type DataViewV1
- type DataViewV2
- type DataViewV3
- type DataViewV4
- type DataViewV5
- type DestinationView
- type DiffFilterView
- type DiffHandler
- func (this *DiffHandler) Delete(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *DiffHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *DiffHandler) GetFilteredData(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *DiffHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (this *DiffHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
- type DiffReport
- type DiffReportEntry
- type DiffView
- type GlobalActionsView
- type GlobalLiteralViewV5
- type GlobalVariableViewV5
- type Hoverfly
- type HoverflyCORS
- type HoverflyCORSHandler
- type HoverflyCache
- type HoverflyDestination
- type HoverflyDestinationHandler
- func (this *HoverflyDestinationHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *HoverflyDestinationHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (this *HoverflyDestinationHandler) Put(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (this *HoverflyDestinationHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
- type HoverflyDiff
- type HoverflyHandler
- type HoverflyJournal
- type HoverflyJournalIndex
- type HoverflyJournalIndexHandler
- func (hoverflyJournalIndexHandler HoverflyJournalIndexHandler) Delete(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (hoverflyJournalIndexHandler HoverflyJournalIndexHandler) GetAll(rw http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (hoverflyJournalIndexHandler HoverflyJournalIndexHandler) Post(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (hoverflyJournalIndexHandler HoverflyJournalIndexHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
- type HoverflyLogs
- type HoverflyMiddleware
- type HoverflyMiddlewareHandler
- func (this *HoverflyMiddlewareHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *HoverflyMiddlewareHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (this *HoverflyMiddlewareHandler) Put(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *HoverflyMiddlewareHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
- type HoverflyMode
- type HoverflyModeHandler
- func (this *HoverflyModeHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *HoverflyModeHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (this *HoverflyModeHandler) Put(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (this *HoverflyModeHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
- type HoverflyPAC
- type HoverflyPACHandler
- func (this *HoverflyPACHandler) Delete(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *HoverflyPACHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *HoverflyPACHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (this *HoverflyPACHandler) Put(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *HoverflyPACHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
- type HoverflyPostServeActionDetails
- type HoverflyPostServeActionDetailsHandler
- func (postServeActionDetailsHandler *HoverflyPostServeActionDetailsHandler) Delete(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (postServeActionDetailsHandler *HoverflyPostServeActionDetailsHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (postServeActionDetailsHandler *HoverflyPostServeActionDetailsHandler) Put(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (postServeActionDetailsHandler *HoverflyPostServeActionDetailsHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
- type HoverflySimulation
- type HoverflyTemplateDataSource
- type HoverflyTemplateDataSourceHandler
- func (templateDataSourceHandler HoverflyTemplateDataSourceHandler) Delete(rw http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (templateDataSourceHandler HoverflyTemplateDataSourceHandler) Get(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (templateDataSourceHandler HoverflyTemplateDataSourceHandler) Put(rw http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (templateDataSourceHandler HoverflyTemplateDataSourceHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
- type HoverflyUpstreamProxy
- type HoverflyUpstreamProxyHandler
- func (this *HoverflyUpstreamProxyHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *HoverflyUpstreamProxyHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (this *HoverflyUpstreamProxyHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
- type HoverflyUsage
- type HoverflyUsageHandler
- type HoverflyVersion
- type HoverflyVersionHandler
- func (this *HoverflyVersionHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *HoverflyVersionHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (this *HoverflyVersionHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
- type HoverflyView
- type IsWebServerView
- type JournalEntryFilterView
- type JournalEntryView
- type JournalHandler
- func (this *JournalHandler) Delete(response http.ResponseWriter, request *http.Request, next http.HandlerFunc)
- func (this *JournalHandler) Get(response http.ResponseWriter, request *http.Request, next http.HandlerFunc)
- func (this *JournalHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (this *JournalHandler) Post(response http.ResponseWriter, request *http.Request, next http.HandlerFunc)
- func (this *JournalHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
- type JournalIndexEntryView
- type JournalIndexRequestView
- type JournalIndexView
- type JournalView
- type LogNormalDelayOptions
- type LogsHandler
- func (this *LogsHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *LogsHandler) GetWS(w http.ResponseWriter, r *http.Request)
- func (this *LogsHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (this *LogsHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
- type LogsView
- type MatcherViewV5
- type MetaView
- type MiddlewareView
- type ModeArgumentsView
- type ModeView
- type PostServeActionDetailsView
- type PostServeActionEntryView
- type QueryMatcherViewV4
- type QueryMatcherViewV5
- type RequestDetailsView
- func (this RequestDetailsView) GetBody() *string
- func (this RequestDetailsView) GetDestination() *string
- func (this RequestDetailsView) GetFixedDelay() int
- func (this RequestDetailsView) GetFormData() map[string][]string
- func (this RequestDetailsView) GetHeaders() map[string][]string
- func (this RequestDetailsView) GetLogNormalDelay() interfaces.ResponseDelay
- func (this RequestDetailsView) GetMethod() *string
- func (this RequestDetailsView) GetPath() *string
- func (this RequestDetailsView) GetQuery() *string
- func (this RequestDetailsView) GetScheme() *string
- type RequestFieldMatchersView
- type RequestMatcherResponsePairViewV2
- type RequestMatcherResponsePairViewV3
- type RequestMatcherResponsePairViewV4
- type RequestMatcherResponsePairViewV5
- type RequestMatcherViewV2
- type RequestMatcherViewV3
- type RequestMatcherViewV4
- type RequestMatcherViewV5
- type RequestResponsePairViewV1
- type ResponseDetailsView
- func (this ResponseDetailsView) GetBody() string
- func (this ResponseDetailsView) GetBodyFile() string
- func (this ResponseDetailsView) GetEncodedBody() bool
- func (this ResponseDetailsView) GetFixedDelay() int
- func (this ResponseDetailsView) GetHeaders() map[string][]string
- func (this ResponseDetailsView) GetLogNormalDelay() interfaces.ResponseDelay
- func (this ResponseDetailsView) GetPostServeAction() string
- func (this ResponseDetailsView) GetRemovesState() []string
- func (this ResponseDetailsView) GetStatus() int
- func (this ResponseDetailsView) GetTemplated() bool
- func (this ResponseDetailsView) GetTransitionsState() map[string]string
- type ResponseDetailsViewV3
- func (this ResponseDetailsViewV3) GetBody() string
- func (this ResponseDetailsViewV3) GetBodyFile() string
- func (this ResponseDetailsViewV3) GetEncodedBody() bool
- func (this ResponseDetailsViewV3) GetFixedDelay() int
- func (this ResponseDetailsViewV3) GetHeaders() map[string][]string
- func (this ResponseDetailsViewV3) GetLogNormalDelay() interfaces.ResponseDelay
- func (this ResponseDetailsViewV3) GetPostServeAction() string
- func (this ResponseDetailsViewV3) GetRemovesState() []string
- func (this ResponseDetailsViewV3) GetStatus() int
- func (this ResponseDetailsViewV3) GetTemplated() bool
- func (this ResponseDetailsViewV3) GetTransitionsState() map[string]string
- type ResponseDetailsViewV4
- func (this ResponseDetailsViewV4) GetBody() string
- func (this ResponseDetailsViewV4) GetBodyFile() string
- func (this ResponseDetailsViewV4) GetEncodedBody() bool
- func (this ResponseDetailsViewV4) GetFixedDelay() int
- func (this ResponseDetailsViewV4) GetHeaders() map[string][]string
- func (this ResponseDetailsViewV4) GetLogNormalDelay() interfaces.ResponseDelay
- func (this ResponseDetailsViewV4) GetPostServeAction() string
- func (this ResponseDetailsViewV4) GetRemovesState() []string
- func (this ResponseDetailsViewV4) GetStatus() int
- func (this ResponseDetailsViewV4) GetTemplated() bool
- func (this ResponseDetailsViewV4) GetTransitionsState() map[string]string
- type ResponseDetailsViewV5
- func (this ResponseDetailsViewV5) GetBody() string
- func (this ResponseDetailsViewV5) GetBodyFile() string
- func (this ResponseDetailsViewV5) GetEncodedBody() bool
- func (this ResponseDetailsViewV5) GetFixedDelay() int
- func (this ResponseDetailsViewV5) GetHeaders() map[string][]string
- func (this ResponseDetailsViewV5) GetLogNormalDelay() interfaces.ResponseDelay
- func (this ResponseDetailsViewV5) GetPostServeAction() string
- func (this ResponseDetailsViewV5) GetRemovesState() []string
- func (this ResponseDetailsViewV5) GetStatus() int
- func (this ResponseDetailsViewV5) GetTemplated() bool
- func (this ResponseDetailsViewV5) GetTransitionsState() map[string]string
- type ResponseDiffForRequestView
- type ShutdownHandler
- type SimpleRequestDefinitionView
- type SimulationHandler
- func (this *SimulationHandler) Delete(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *SimulationHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *SimulationHandler) GetSchema(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *SimulationHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (this *SimulationHandler) OptionsSchema(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (this *SimulationHandler) Post(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *SimulationHandler) Put(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *SimulationHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
- type SimulationImportResult
- func (s *SimulationImportResult) AddBodyAndBodyFileWarning(requestNumber int)
- func (s *SimulationImportResult) AddContentLengthAndTransferEncodingWarning(requestNumber int)
- func (s *SimulationImportResult) AddContentLengthMismatchWarning(requestNumber int)
- func (s *SimulationImportResult) AddPairIgnoredWarning(requestNumber int)
- func (s SimulationImportResult) GetError() error
- func (s *SimulationImportResult) SetError(err error)
- type SimulationImportWarning
- type SimulationViewV1
- type SimulationViewV2
- type SimulationViewV3
- type SimulationViewV4
- type SimulationViewV5
- type StateHandler
- func (this *StateHandler) Delete(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *StateHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *StateHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (this *StateHandler) Patch(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *StateHandler) Put(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- func (this *StateHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
- type StateView
- type TemplateDataSourceView
- type UpstreamProxyView
- type UsageView
- type VersionView
Constants ¶
const BodyAndBodyFileMessage = "" /* 136-byte string literal not displayed */
const ContentLengthAndTransferEncodingMessage = "" /* 130-byte string literal not displayed */
const ContentLengthMismatchMessage = "Response contains incorrect Content-Length header on data.pairs[%v].response, please correct or remove header"
const DefaultJournalLimit = 25
const DefaultLogLimit = 500
Variables ¶
var SimulationViewV1Schema = map[string]interface{}{ "description": "Hoverfly simulation schema", "type": "object", "required": []string{ "data", "meta", }, "additionalProperties": false, "properties": map[string]interface{}{ "data": map[string]interface{}{ "type": "object", "properties": map[string]interface{}{ "pairs": map[string]interface{}{ "type": "array", "items": map[string]interface{}{ "$ref": "#/definitions/request-response-pair", }, }, "globalActions": map[string]interface{}{ "type": "object", "properties": map[string]interface{}{ "delays": map[string]interface{}{ "type": "array", "items": map[string]interface{}{ "$ref": "#/definitions/delay", }, }, }, }, }, }, "meta": map[string]interface{}{ "$ref": "#/definitions/meta", }, }, "definitions": map[string]interface{}{ "request-response-pair": requestResponsePairDefinition, "request": requestV1Definition, "response": responseDefinitionV1, "headers": headersDefinition, "delay": delaysDefinition, "meta": metaDefinition, }, }
var SimulationViewV2Schema = map[string]interface{}{ "description": "Hoverfly simulation schema", "type": "object", "required": []string{ "data", "meta", }, "additionalProperties": false, "properties": map[string]interface{}{ "data": map[string]interface{}{ "type": "object", "properties": map[string]interface{}{ "pairs": map[string]interface{}{ "type": "array", "items": map[string]interface{}{ "$ref": "#/definitions/request-response-pair", }, }, "globalActions": map[string]interface{}{ "type": "object", "properties": map[string]interface{}{ "delays": map[string]interface{}{ "type": "array", "items": map[string]interface{}{ "$ref": "#/definitions/delay", }, }, }, }, }, }, "meta": map[string]interface{}{ "$ref": "#/definitions/meta", }, }, "definitions": map[string]interface{}{ "request-response-pair": requestResponsePairDefinition, "request": requestV3Definition, "response": responseDefinitionV1, "field-matchers": requestFieldMatchersV3Definition, "headers": headersDefinition, "delay": delaysDefinition, "meta": metaDefinition, }, }
var SimulationViewV4Schema = map[string]interface{}{ "description": "Hoverfly simulation schema", "type": "object", "required": []string{ "data", "meta", }, "additionalProperties": false, "properties": map[string]interface{}{ "data": map[string]interface{}{ "type": "object", "properties": map[string]interface{}{ "pairs": map[string]interface{}{ "type": "array", "items": map[string]interface{}{ "$ref": "#/definitions/request-response-pair", }, }, "globalActions": map[string]interface{}{ "type": "object", "properties": map[string]interface{}{ "delays": map[string]interface{}{ "type": "array", "items": map[string]interface{}{ "$ref": "#/definitions/delay", }, }, }, }, }, }, "meta": map[string]interface{}{ "$ref": "#/definitions/meta", }, }, "definitions": map[string]interface{}{ "request-response-pair": requestResponsePairDefinition, "request": requestV4Definition, "response": responseDefinitionV4, "field-matchers": requestFieldMatchersV3Definition, "headers": headersDefinition, "delay": delaysDefinition, "meta": metaDefinition, }, }
var SimulationViewV5Schema []byte
V5 Schema
Functions ¶
func ValidateSimulation ¶ added in v0.11.0
func ValidateSimulationSchemaFromFile ¶ added in v1.5.0
Types ¶
type ActionView ¶ added in v1.6.0
type CORSView ¶ added in v1.1.0
type CORSView struct { Enabled bool `json:"enabled"` AllowOrigin string `json:"allowOrigin,omitempty"` AllowMethods string `json:"allowMethods,omitempty"` AllowHeaders string `json:"allowHeaders,omitempty"` PreflightMaxAge int64 `json:"preflightMaxAge,omitempty"` AllowCredentials bool `json:"allowCredentials,omitempty"` ExposeHeaders string `json:"exposeHeaders,omitempty"` }
type CSVDataSourceView ¶ added in v1.7.0
type CacheHandler ¶ added in v0.11.0
type CacheHandler struct {
Hoverfly HoverflyCache
}
func (*CacheHandler) Delete ¶ added in v0.11.0
func (this *CacheHandler) Delete(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*CacheHandler) Get ¶ added in v0.11.0
func (this *CacheHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*CacheHandler) Options ¶ added in v0.12.0
func (this *CacheHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*CacheHandler) RegisterRoutes ¶ added in v0.11.0
func (this *CacheHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type CacheView ¶ added in v0.11.0
type CacheView struct {
Cache []CachedResponseView `json:"cache"`
}
type CachedResponseView ¶ added in v0.11.0
type CachedResponseView struct { Key string `json:"key"` MatchingPair *RequestMatcherResponsePairViewV5 `json:"matchingPair,omitempty"` HeaderMatch bool `json:"headerMatch"` ClosestMiss *ClosestMissView `json:"closestMiss"` }
type ClosestMissView ¶ added in v0.12.0
type ClosestMissView struct { Response ResponseDetailsViewV5 `json:"response"` RequestMatcher RequestMatcherViewV5 `json:"requestMatcher"` MissedFields []string `json:"missedFields"` }
type DataViewV1 ¶ added in v0.11.0
type DataViewV1 struct { RequestResponsePairViewV1 []RequestResponsePairViewV1 `json:"pairs"` GlobalActions GlobalActionsView `json:"globalActions"` }
type DataViewV2 ¶ added in v0.11.0
type DataViewV2 struct { RequestResponsePairs []RequestMatcherResponsePairViewV2 `json:"pairs"` GlobalActions GlobalActionsView `json:"globalActions"` }
type DataViewV3 ¶ added in v0.13.0
type DataViewV3 struct { RequestResponsePairs []RequestMatcherResponsePairViewV3 `json:"pairs"` GlobalActions GlobalActionsView `json:"globalActions"` }
type DataViewV4 ¶ added in v0.14.0
type DataViewV4 struct { RequestResponsePairs []RequestMatcherResponsePairViewV4 `json:"pairs"` GlobalActions GlobalActionsView `json:"globalActions"` }
type DataViewV5 ¶ added in v0.17.0
type DataViewV5 struct { RequestResponsePairs []RequestMatcherResponsePairViewV5 `json:"pairs"` GlobalActions GlobalActionsView `json:"globalActions"` GlobalLiterals []GlobalLiteralViewV5 `json:"literals,omitempty"` GlobalVariables []GlobalVariableViewV5 `json:"variables,omitempty"` }
type DestinationView ¶
type DestinationView struct {
Destination string `json:"destination"`
}
type DiffFilterView ¶ added in v1.5.0
type DiffHandler ¶ added in v0.16.0
type DiffHandler struct {
Hoverfly HoverflyDiff
}
func (*DiffHandler) Delete ¶ added in v0.16.0
func (this *DiffHandler) Delete(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*DiffHandler) Get ¶ added in v0.16.0
func (this *DiffHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*DiffHandler) GetFilteredData ¶ added in v1.5.0
func (this *DiffHandler) GetFilteredData(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*DiffHandler) Options ¶ added in v0.16.0
func (this *DiffHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*DiffHandler) RegisterRoutes ¶ added in v0.16.0
func (this *DiffHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type DiffReport ¶ added in v0.16.0
type DiffReport struct { Timestamp string `json:"timestamp"` DiffEntries []DiffReportEntry `json:"diffEntries"` }
type DiffReportEntry ¶ added in v0.16.0
type DiffView ¶ added in v0.16.0
type DiffView struct {
Diff []ResponseDiffForRequestView `json:"diff"`
}
type GlobalActionsView ¶
type GlobalActionsView struct { Delays []v1.ResponseDelayView `json:"delays"` DelaysLogNormal []v1.ResponseDelayLogNormalView `json:"delaysLogNormal"` }
type GlobalLiteralViewV5 ¶ added in v1.5.0
type GlobalLiteralViewV5 struct { Name string `json:"name"` Value interface{} `json:"value"` }
type GlobalVariableViewV5 ¶ added in v1.5.0
type Hoverfly ¶
type Hoverfly interface { GetCORS() CORSView GetDestination() string GetMiddleware() (string, string, string) GetMode() ModeView GetStats() metrics.Stats GetVersion() string GetState() map[string]string SetState(map[string]string) PatchState(map[string]string) ClearState() GetUpstreamProxy() string IsWebServer() bool }
type HoverflyCORS ¶ added in v1.1.0
type HoverflyCORS interface {
GetCORS() CORSView
}
type HoverflyCORSHandler ¶ added in v1.1.0
type HoverflyCORSHandler struct {
Hoverfly HoverflyCORS
}
func (*HoverflyCORSHandler) Get ¶ added in v1.1.0
func (h *HoverflyCORSHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*HoverflyCORSHandler) Options ¶ added in v1.1.0
func (h *HoverflyCORSHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*HoverflyCORSHandler) RegisterRoutes ¶ added in v1.1.0
func (h *HoverflyCORSHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type HoverflyCache ¶ added in v0.11.0
type HoverflyDestination ¶
type HoverflyDestinationHandler ¶
type HoverflyDestinationHandler struct {
Hoverfly HoverflyDestination
}
func (*HoverflyDestinationHandler) Get ¶
func (this *HoverflyDestinationHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*HoverflyDestinationHandler) Options ¶ added in v0.12.0
func (this *HoverflyDestinationHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*HoverflyDestinationHandler) Put ¶
func (this *HoverflyDestinationHandler) Put(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*HoverflyDestinationHandler) RegisterRoutes ¶
func (this *HoverflyDestinationHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type HoverflyDiff ¶ added in v1.1.0
type HoverflyDiff interface { GetDiff() map[SimpleRequestDefinitionView][]DiffReport GetFilteredDiff(diffFilterView DiffFilterView) map[SimpleRequestDefinitionView][]DiffReport ClearDiff() }
type HoverflyHandler ¶
type HoverflyHandler struct {
Hoverfly Hoverfly
}
func (*HoverflyHandler) Get ¶
func (this *HoverflyHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*HoverflyHandler) Options ¶ added in v0.12.0
func (this *HoverflyHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*HoverflyHandler) RegisterRoutes ¶
func (this *HoverflyHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type HoverflyJournal ¶ added in v0.12.2
type HoverflyJournal interface { GetEntries(offset int, limit int, from *time.Time, to *time.Time, sort string) (JournalView, error) GetFilteredEntries(journalEntryFilterView JournalEntryFilterView) ([]JournalEntryView, error) DeleteEntries() error }
type HoverflyJournalIndex ¶ added in v1.8.0
type HoverflyJournalIndex interface { GetAllIndexes() []JournalIndexView AddJournalIndex(string) error DeleteJournalIndex(string) }
type HoverflyJournalIndexHandler ¶ added in v1.8.0
type HoverflyJournalIndexHandler struct {
Hoverfly HoverflyJournalIndex
}
func (HoverflyJournalIndexHandler) Delete ¶ added in v1.8.0
func (hoverflyJournalIndexHandler HoverflyJournalIndexHandler) Delete(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (HoverflyJournalIndexHandler) GetAll ¶ added in v1.8.0
func (hoverflyJournalIndexHandler HoverflyJournalIndexHandler) GetAll(rw http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (HoverflyJournalIndexHandler) Post ¶ added in v1.8.0
func (hoverflyJournalIndexHandler HoverflyJournalIndexHandler) Post(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (HoverflyJournalIndexHandler) RegisterRoutes ¶ added in v1.8.0
func (hoverflyJournalIndexHandler HoverflyJournalIndexHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type HoverflyLogs ¶ added in v0.11.0
type HoverflyMiddleware ¶
type HoverflyMiddlewareHandler ¶
type HoverflyMiddlewareHandler struct {
Hoverfly HoverflyMiddleware
}
func (*HoverflyMiddlewareHandler) Get ¶
func (this *HoverflyMiddlewareHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*HoverflyMiddlewareHandler) Options ¶ added in v0.12.0
func (this *HoverflyMiddlewareHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*HoverflyMiddlewareHandler) Put ¶
func (this *HoverflyMiddlewareHandler) Put(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*HoverflyMiddlewareHandler) RegisterRoutes ¶
func (this *HoverflyMiddlewareHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type HoverflyMode ¶
type HoverflyModeHandler ¶
type HoverflyModeHandler struct {
Hoverfly HoverflyMode
}
func (*HoverflyModeHandler) Get ¶
func (this *HoverflyModeHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*HoverflyModeHandler) Options ¶ added in v0.12.0
func (this *HoverflyModeHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*HoverflyModeHandler) Put ¶
func (this *HoverflyModeHandler) Put(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*HoverflyModeHandler) RegisterRoutes ¶
func (this *HoverflyModeHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type HoverflyPAC ¶ added in v0.17.4
type HoverflyPACHandler ¶ added in v0.17.4
type HoverflyPACHandler struct {
Hoverfly HoverflyPAC
}
func (*HoverflyPACHandler) Delete ¶ added in v0.17.4
func (this *HoverflyPACHandler) Delete(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*HoverflyPACHandler) Get ¶ added in v0.17.4
func (this *HoverflyPACHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*HoverflyPACHandler) Options ¶ added in v0.17.4
func (this *HoverflyPACHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*HoverflyPACHandler) Put ¶ added in v0.17.4
func (this *HoverflyPACHandler) Put(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*HoverflyPACHandler) RegisterRoutes ¶ added in v0.17.4
func (this *HoverflyPACHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type HoverflyPostServeActionDetails ¶ added in v1.6.0
type HoverflyPostServeActionDetailsHandler ¶ added in v1.6.0
type HoverflyPostServeActionDetailsHandler struct {
Hoverfly HoverflyPostServeActionDetails
}
func (*HoverflyPostServeActionDetailsHandler) Delete ¶ added in v1.6.0
func (postServeActionDetailsHandler *HoverflyPostServeActionDetailsHandler) Delete(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*HoverflyPostServeActionDetailsHandler) Get ¶ added in v1.6.0
func (postServeActionDetailsHandler *HoverflyPostServeActionDetailsHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*HoverflyPostServeActionDetailsHandler) Put ¶ added in v1.6.0
func (postServeActionDetailsHandler *HoverflyPostServeActionDetailsHandler) Put(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*HoverflyPostServeActionDetailsHandler) RegisterRoutes ¶ added in v1.6.0
func (postServeActionDetailsHandler *HoverflyPostServeActionDetailsHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type HoverflySimulation ¶
type HoverflySimulation interface { GetSimulation() (SimulationViewV5, error) GetFilteredSimulation(string) (SimulationViewV5, error) PutSimulation(SimulationViewV5) SimulationImportResult DeleteSimulation() }
type HoverflyTemplateDataSource ¶ added in v1.7.0
type HoverflyTemplateDataSource interface { SetCsvDataSource(string, string) error DeleteDataSource(string) GetAllDataSources() TemplateDataSourceView }
type HoverflyTemplateDataSourceHandler ¶ added in v1.7.0
type HoverflyTemplateDataSourceHandler struct {
Hoverfly HoverflyTemplateDataSource
}
func (HoverflyTemplateDataSourceHandler) Delete ¶ added in v1.7.0
func (templateDataSourceHandler HoverflyTemplateDataSourceHandler) Delete(rw http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (HoverflyTemplateDataSourceHandler) Get ¶ added in v1.7.0
func (templateDataSourceHandler HoverflyTemplateDataSourceHandler) Get(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (HoverflyTemplateDataSourceHandler) Put ¶ added in v1.7.0
func (templateDataSourceHandler HoverflyTemplateDataSourceHandler) Put(rw http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (HoverflyTemplateDataSourceHandler) RegisterRoutes ¶ added in v1.7.0
func (templateDataSourceHandler HoverflyTemplateDataSourceHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type HoverflyUpstreamProxy ¶ added in v0.10.1
type HoverflyUpstreamProxy interface {
GetUpstreamProxy() string
}
type HoverflyUpstreamProxyHandler ¶ added in v0.10.1
type HoverflyUpstreamProxyHandler struct {
Hoverfly HoverflyUpstreamProxy
}
func (*HoverflyUpstreamProxyHandler) Get ¶ added in v0.10.1
func (this *HoverflyUpstreamProxyHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*HoverflyUpstreamProxyHandler) Options ¶ added in v0.12.0
func (this *HoverflyUpstreamProxyHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*HoverflyUpstreamProxyHandler) RegisterRoutes ¶ added in v0.10.1
func (this *HoverflyUpstreamProxyHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type HoverflyUsage ¶
type HoverflyUsageHandler ¶
type HoverflyUsageHandler struct {
Hoverfly HoverflyUsage
}
func (*HoverflyUsageHandler) Get ¶
func (this *HoverflyUsageHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*HoverflyUsageHandler) Options ¶ added in v0.12.0
func (this *HoverflyUsageHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*HoverflyUsageHandler) RegisterRoutes ¶
func (this *HoverflyUsageHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type HoverflyVersion ¶ added in v0.10.1
type HoverflyVersion interface {
GetVersion() string
}
type HoverflyVersionHandler ¶ added in v0.10.1
type HoverflyVersionHandler struct {
Hoverfly HoverflyVersion
}
func (*HoverflyVersionHandler) Get ¶ added in v0.10.1
func (this *HoverflyVersionHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*HoverflyVersionHandler) Options ¶ added in v0.12.0
func (this *HoverflyVersionHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*HoverflyVersionHandler) RegisterRoutes ¶ added in v0.10.1
func (this *HoverflyVersionHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type HoverflyView ¶
type HoverflyView struct { CORSView `json:"cors"` DestinationView MiddlewareView `json:"middleware"` ModeView IsWebServerView UsageView VersionView UpstreamProxyView }
type IsWebServerView ¶ added in v0.15.0
type IsWebServerView struct {
IsWebServer bool `json:"isWebServer"`
}
type JournalEntryFilterView ¶ added in v0.12.2
type JournalEntryFilterView struct {
Request *RequestMatcherViewV5 `json:"request"`
}
type JournalEntryView ¶ added in v0.12.2
type JournalEntryView struct { Request RequestDetailsView `json:"request"` Response ResponseDetailsView `json:"response"` Mode string `json:"mode"` TimeStarted string `json:"timeStarted"` Latency float64 `json:"latency"` Id string `json:"id"` PostServeActionEntry *PostServeActionEntryView `json:"postServeAction,omitEmpty"` }
type JournalHandler ¶ added in v0.12.2
type JournalHandler struct {
Hoverfly HoverflyJournal
}
func (*JournalHandler) Delete ¶ added in v0.12.2
func (this *JournalHandler) Delete(response http.ResponseWriter, request *http.Request, next http.HandlerFunc)
func (*JournalHandler) Get ¶ added in v0.12.2
func (this *JournalHandler) Get(response http.ResponseWriter, request *http.Request, next http.HandlerFunc)
func (*JournalHandler) Options ¶ added in v0.12.2
func (this *JournalHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*JournalHandler) Post ¶ added in v0.12.2
func (this *JournalHandler) Post(response http.ResponseWriter, request *http.Request, next http.HandlerFunc)
func (*JournalHandler) RegisterRoutes ¶ added in v0.12.2
func (this *JournalHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type JournalIndexEntryView ¶ added in v1.8.0
type JournalIndexRequestView ¶ added in v1.8.0
type JournalIndexRequestView struct {
Name string `json:"name"`
}
type JournalIndexView ¶ added in v1.8.0
type JournalIndexView struct { Name string `json:"name"` Entries []JournalIndexEntryView `json:"entries,omitempty"` }
type JournalView ¶ added in v0.12.2
type JournalView struct { Journal []JournalEntryView `json:"journal"` Index []JournalIndexView `json:"indexes"` Offset int `json:"offset"` Limit int `json:"limit"` Total int `json:"total"` }
type LogNormalDelayOptions ¶ added in v1.3.0
type LogNormalDelayOptions struct { Min int `json:"min"` Max int `json:"max"` Mean int `json:"mean"` Median int `json:"median"` }
func (*LogNormalDelayOptions) GetMax ¶ added in v1.3.0
func (l *LogNormalDelayOptions) GetMax() int
func (*LogNormalDelayOptions) GetMean ¶ added in v1.3.0
func (l *LogNormalDelayOptions) GetMean() int
func (*LogNormalDelayOptions) GetMedian ¶ added in v1.3.0
func (l *LogNormalDelayOptions) GetMedian() int
func (*LogNormalDelayOptions) GetMin ¶ added in v1.3.0
func (l *LogNormalDelayOptions) GetMin() int
type LogsHandler ¶ added in v0.11.0
type LogsHandler struct {
Hoverfly HoverflyLogs
}
func (*LogsHandler) Get ¶ added in v0.11.0
func (this *LogsHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*LogsHandler) GetWS ¶ added in v0.11.0
func (this *LogsHandler) GetWS(w http.ResponseWriter, r *http.Request)
func (*LogsHandler) Options ¶ added in v0.12.0
func (this *LogsHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*LogsHandler) RegisterRoutes ¶ added in v0.11.0
func (this *LogsHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type LogsView ¶ added in v0.11.0
type LogsView struct {
Logs []map[string]interface{} `json:"logs"`
}
type MatcherViewV5 ¶ added in v0.17.0
type MatcherViewV5 struct { Matcher string `json:"matcher"` Value interface{} `json:"value"` Config map[string]interface{} `json:"config,omitempty"` DoMatch *MatcherViewV5 `json:"doMatch,omitempty"` }
func NewMatcherView ¶ added in v0.17.0
func NewMatcherView(matcher string, value interface{}) MatcherViewV5
type MetaView ¶
type MetaView struct { SchemaVersion string `json:"schemaVersion"` HoverflyVersion string `json:"hoverflyVersion"` TimeExported string `json:"timeExported"` }
func NewMetaView ¶ added in v0.11.0
type MiddlewareView ¶
type ModeArgumentsView ¶ added in v0.11.0
type ModeArgumentsView struct { Headers []string `json:"headersWhitelist,omitempty"` MatchingStrategy *string `json:"matchingStrategy,omitempty"` Stateful bool `json:"stateful,omitempty"` OverwriteDuplicate bool `json:"overwriteDuplicate,omitempty"` CaptureOnMiss bool `json:"captureOnMiss,omitempty"` }
type ModeView ¶
type ModeView struct { Mode string `json:"mode"` Arguments ModeArgumentsView `json:"arguments,omitempty"` }
type PostServeActionDetailsView ¶ added in v1.6.0
type PostServeActionDetailsView struct {
Actions []ActionView `json:"actions,omitempty"`
}
type PostServeActionEntryView ¶ added in v1.9.0
type QueryMatcherViewV4 ¶ added in v0.17.3
type QueryMatcherViewV4 map[string]*RequestFieldMatchersView
type QueryMatcherViewV5 ¶ added in v0.17.3
type QueryMatcherViewV5 map[string][]MatcherViewV5
type RequestDetailsView ¶
type RequestDetailsView struct { RequestType *string `json:"requestType,omitempty"` Path *string `json:"path"` Method *string `json:"method"` Destination *string `json:"destination"` Scheme *string `json:"scheme"` Query *string `json:"query"` QueryMap map[string][]string `json:"-"` FormData map[string][]string `json:"formData"` Body *string `json:"body"` Headers map[string][]string `json:"headers"` }
RequestDetailsView is used when marshalling and unmarshalling RequestDetails
func (RequestDetailsView) GetBody ¶
func (this RequestDetailsView) GetBody() *string
Gets Body - required for interfaces.RequestMatcher
func (RequestDetailsView) GetDestination ¶
func (this RequestDetailsView) GetDestination() *string
Gets Destination - required for interfaces.RequestMatcher
func (RequestDetailsView) GetFixedDelay ¶ added in v1.3.0
func (this RequestDetailsView) GetFixedDelay() int
Gets FixedDelay - required for interfaces.Response
func (RequestDetailsView) GetFormData ¶ added in v1.5.0
func (this RequestDetailsView) GetFormData() map[string][]string
func (RequestDetailsView) GetHeaders ¶
func (this RequestDetailsView) GetHeaders() map[string][]string
Gets Headers - required for interfaces.RequestMatcher
func (RequestDetailsView) GetLogNormalDelay ¶ added in v1.3.0
func (this RequestDetailsView) GetLogNormalDelay() interfaces.ResponseDelay
Gets LogNormalDelay - required for interfaces.Response
func (RequestDetailsView) GetMethod ¶
func (this RequestDetailsView) GetMethod() *string
Gets Method - required for interfaces.RequestMatcher
func (RequestDetailsView) GetPath ¶
func (this RequestDetailsView) GetPath() *string
Gets Path - required for interfaces.RequestMatcher
func (RequestDetailsView) GetQuery ¶
func (this RequestDetailsView) GetQuery() *string
Gets Query - required for interfaces.RequestMatcher
func (RequestDetailsView) GetScheme ¶
func (this RequestDetailsView) GetScheme() *string
Gets Scheme - required for interfaces.RequestMatcher
type RequestFieldMatchersView ¶ added in v0.11.0
type RequestFieldMatchersView struct { ExactMatch *string `json:"exactMatch,omitempty"` XmlMatch *string `json:"xmlMatch,omitempty"` XpathMatch *string `json:"xpathMatch,omitempty"` JsonMatch *string `json:"jsonMatch,omitempty"` JsonPathMatch *string `json:"jsonPathMatch,omitempty"` RegexMatch *string `json:"regexMatch,omitempty"` GlobMatch *string `json:"globMatch,omitempty"` }
type RequestMatcherResponsePairViewV2 ¶ added in v0.12.0
type RequestMatcherResponsePairViewV2 struct { Response ResponseDetailsView `json:"response"` RequestMatcher RequestMatcherViewV2 `json:"request"` }
type RequestMatcherResponsePairViewV3 ¶ added in v0.13.0
type RequestMatcherResponsePairViewV3 struct { Response ResponseDetailsViewV3 `json:"response"` RequestMatcher RequestMatcherViewV3 `json:"request"` }
func (RequestMatcherResponsePairViewV3) GetResponse ¶ added in v0.13.0
func (this RequestMatcherResponsePairViewV3) GetResponse() interfaces.Response
Gets Response - required for interfaces.RequestResponsePairView
type RequestMatcherResponsePairViewV4 ¶ added in v0.14.0
type RequestMatcherResponsePairViewV4 struct { RequestMatcher RequestMatcherViewV4 `json:"request"` Response ResponseDetailsViewV4 `json:"response"` }
func (RequestMatcherResponsePairViewV4) GetResponse ¶ added in v0.14.0
func (this RequestMatcherResponsePairViewV4) GetResponse() interfaces.Response
Gets Response - required for interfaces.RequestResponsePairView
type RequestMatcherResponsePairViewV5 ¶ added in v0.17.0
type RequestMatcherResponsePairViewV5 struct { Labels []string `json:"labels,omitempty"` RequestMatcher RequestMatcherViewV5 `json:"request"` Response ResponseDetailsViewV5 `json:"response"` }
func (RequestMatcherResponsePairViewV5) GetResponse ¶ added in v0.17.0
func (this RequestMatcherResponsePairViewV5) GetResponse() interfaces.Response
Gets Response - required for interfaces.RequestResponsePairView
type RequestMatcherViewV2 ¶ added in v0.12.0
type RequestMatcherViewV2 struct { Path *RequestFieldMatchersView `json:"path,omitempty"` Method *RequestFieldMatchersView `json:"method,omitempty"` Destination *RequestFieldMatchersView `json:"destination,omitempty"` Scheme *RequestFieldMatchersView `json:"scheme,omitempty"` Query *RequestFieldMatchersView `json:"query,omitempty"` Body *RequestFieldMatchersView `json:"body,omitempty"` Headers map[string][]string `json:"headers,omitempty"` }
RequestDetailsView is used when marshalling and unmarshalling RequestDetails
type RequestMatcherViewV3 ¶ added in v0.13.0
type RequestMatcherViewV3 struct { Path *RequestFieldMatchersView `json:"path,omitempty"` Method *RequestFieldMatchersView `json:"method,omitempty"` Destination *RequestFieldMatchersView `json:"destination,omitempty"` Scheme *RequestFieldMatchersView `json:"scheme,omitempty"` Query *RequestFieldMatchersView `json:"query,omitempty"` Body *RequestFieldMatchersView `json:"body,omitempty"` Headers map[string][]string `json:"headers,omitempty"` }
RequestDetailsView is used when marshalling and unmarshalling RequestDetails
type RequestMatcherViewV4 ¶ added in v0.14.0
type RequestMatcherViewV4 struct { Path *RequestFieldMatchersView `json:"path,omitempty"` Method *RequestFieldMatchersView `json:"method,omitempty"` Destination *RequestFieldMatchersView `json:"destination,omitempty"` Scheme *RequestFieldMatchersView `json:"scheme,omitempty"` Query *RequestFieldMatchersView `json:"query,omitempty"` Body *RequestFieldMatchersView `json:"body,omitempty"` Headers map[string][]string `json:"headers,omitempty"` HeadersWithMatchers map[string]*RequestFieldMatchersView `json:"headersWithMatchers,omitempty"` QueriesWithMatchers *QueryMatcherViewV4 `json:"queriesWithMatchers,omitempty"` RequiresState map[string]string `json:"requiresState,omitempty"` }
RequestDetailsView is used when marshalling and unmarshalling RequestDetails
type RequestMatcherViewV5 ¶ added in v0.17.0
type RequestMatcherViewV5 struct { Path []MatcherViewV5 `json:"path,omitempty"` Method []MatcherViewV5 `json:"method,omitempty"` Destination []MatcherViewV5 `json:"destination,omitempty"` Scheme []MatcherViewV5 `json:"scheme,omitempty"` Body []MatcherViewV5 `json:"body,omitempty"` Headers map[string][]MatcherViewV5 `json:"headers,omitempty"` Query *QueryMatcherViewV5 `json:"query,omitempty"` RequiresState map[string]string `json:"requiresState,omitempty"` }
RequestDetailsView is used when marshalling and unmarshalling RequestDetails
type RequestResponsePairViewV1 ¶ added in v0.11.0
type RequestResponsePairViewV1 struct { Response ResponseDetailsView `json:"response"` Request RequestDetailsView `json:"request"` }
func (RequestResponsePairViewV1) GetRequest ¶ added in v0.11.0
func (this RequestResponsePairViewV1) GetRequest() interfaces.Request
Gets RequestMatcher - required for interfaces.RequestResponsePairView
func (RequestResponsePairViewV1) GetResponse ¶ added in v0.11.0
func (this RequestResponsePairViewV1) GetResponse() interfaces.Response
Gets Response - required for interfaces.RequestResponsePairView
type ResponseDetailsView ¶
type ResponseDetailsView struct { Status int `json:"status"` Body string `json:"body"` EncodedBody bool `json:"encodedBody"` Headers map[string][]string `json:"headers,omitempty"` PostServeAction string `json:"postServeAction,omitempty"` }
ResponseDetailsView is used when marshalling and unmarshalling requests. This struct's Body may be Base64 encoded based on the EncodedBody field.
func (ResponseDetailsView) GetBody ¶
func (this ResponseDetailsView) GetBody() string
Gets Body - required for interfaces.Response
func (ResponseDetailsView) GetBodyFile ¶ added in v1.3.0
func (this ResponseDetailsView) GetBodyFile() string
Gets BodyFile - required for interfaces.Response
func (ResponseDetailsView) GetEncodedBody ¶
func (this ResponseDetailsView) GetEncodedBody() bool
Gets EncodedBody - required for interfaces.Response
func (ResponseDetailsView) GetFixedDelay ¶ added in v1.3.0
func (this ResponseDetailsView) GetFixedDelay() int
Gets FixedDelay - required for interfaces.Response
func (ResponseDetailsView) GetHeaders ¶
func (this ResponseDetailsView) GetHeaders() map[string][]string
Gets Headers - required for interfaces.Response
func (ResponseDetailsView) GetLogNormalDelay ¶ added in v1.3.0
func (this ResponseDetailsView) GetLogNormalDelay() interfaces.ResponseDelay
Gets LogNormalDelay - required for interfaces.Response
func (ResponseDetailsView) GetPostServeAction ¶ added in v1.6.0
func (this ResponseDetailsView) GetPostServeAction() string
func (ResponseDetailsView) GetRemovesState ¶ added in v0.14.0
func (this ResponseDetailsView) GetRemovesState() []string
func (ResponseDetailsView) GetStatus ¶
func (this ResponseDetailsView) GetStatus() int
Gets Status - required for interfaces.Response
func (ResponseDetailsView) GetTemplated ¶ added in v0.13.0
func (this ResponseDetailsView) GetTemplated() bool
func (ResponseDetailsView) GetTransitionsState ¶ added in v0.14.0
func (this ResponseDetailsView) GetTransitionsState() map[string]string
type ResponseDetailsViewV3 ¶ added in v0.13.0
type ResponseDetailsViewV3 struct { Status int `json:"status"` Body string `json:"body"` EncodedBody bool `json:"encodedBody"` Headers map[string][]string `json:"headers,omitempty"` Templated bool `json:"templated"` }
func (ResponseDetailsViewV3) GetBody ¶ added in v0.13.0
func (this ResponseDetailsViewV3) GetBody() string
Gets Body - required for interfaces.Response
func (ResponseDetailsViewV3) GetBodyFile ¶ added in v1.3.0
func (this ResponseDetailsViewV3) GetBodyFile() string
Gets BodyFile - required for interfaces.Response
func (ResponseDetailsViewV3) GetEncodedBody ¶ added in v0.13.0
func (this ResponseDetailsViewV3) GetEncodedBody() bool
Gets EncodedBody - required for interfaces.Response
func (ResponseDetailsViewV3) GetFixedDelay ¶ added in v1.3.0
func (this ResponseDetailsViewV3) GetFixedDelay() int
Gets FixedDelay - required for interfaces.Response
func (ResponseDetailsViewV3) GetHeaders ¶ added in v0.13.0
func (this ResponseDetailsViewV3) GetHeaders() map[string][]string
Gets Headers - required for interfaces.Response
func (ResponseDetailsViewV3) GetLogNormalDelay ¶ added in v1.3.0
func (this ResponseDetailsViewV3) GetLogNormalDelay() interfaces.ResponseDelay
Gets LogNormalDelay - required for interfaces.Response
func (ResponseDetailsViewV3) GetPostServeAction ¶ added in v1.6.0
func (this ResponseDetailsViewV3) GetPostServeAction() string
func (ResponseDetailsViewV3) GetRemovesState ¶ added in v0.14.0
func (this ResponseDetailsViewV3) GetRemovesState() []string
func (ResponseDetailsViewV3) GetStatus ¶ added in v0.13.0
func (this ResponseDetailsViewV3) GetStatus() int
Gets Status - required for interfaces.Response
func (ResponseDetailsViewV3) GetTemplated ¶ added in v0.13.0
func (this ResponseDetailsViewV3) GetTemplated() bool
func (ResponseDetailsViewV3) GetTransitionsState ¶ added in v0.14.0
func (this ResponseDetailsViewV3) GetTransitionsState() map[string]string
type ResponseDetailsViewV4 ¶ added in v0.14.0
type ResponseDetailsViewV4 struct { Status int `json:"status"` Body string `json:"body"` EncodedBody bool `json:"encodedBody"` Headers map[string][]string `json:"headers,omitempty"` Templated bool `json:"templated"` TransitionsState map[string]string `json:"transitionsState,omitempty"` RemovesState []string `json:"removesState,omitempty"` }
func (ResponseDetailsViewV4) GetBody ¶ added in v0.14.0
func (this ResponseDetailsViewV4) GetBody() string
Gets Body - required for interfaces.Response
func (ResponseDetailsViewV4) GetBodyFile ¶ added in v1.3.0
func (this ResponseDetailsViewV4) GetBodyFile() string
Gets BodyFile - required for interfaces.Response
func (ResponseDetailsViewV4) GetEncodedBody ¶ added in v0.14.0
func (this ResponseDetailsViewV4) GetEncodedBody() bool
Gets EncodedBody - required for interfaces.Response
func (ResponseDetailsViewV4) GetFixedDelay ¶ added in v1.3.0
func (this ResponseDetailsViewV4) GetFixedDelay() int
Gets FixedDelay - required for interfaces.Response
func (ResponseDetailsViewV4) GetHeaders ¶ added in v0.14.0
func (this ResponseDetailsViewV4) GetHeaders() map[string][]string
Gets Headers - required for interfaces.Response
func (ResponseDetailsViewV4) GetLogNormalDelay ¶ added in v1.3.0
func (this ResponseDetailsViewV4) GetLogNormalDelay() interfaces.ResponseDelay
Gets LogNormalDelay - required for interfaces.Response
func (ResponseDetailsViewV4) GetPostServeAction ¶ added in v1.6.0
func (this ResponseDetailsViewV4) GetPostServeAction() string
func (ResponseDetailsViewV4) GetRemovesState ¶ added in v0.14.0
func (this ResponseDetailsViewV4) GetRemovesState() []string
func (ResponseDetailsViewV4) GetStatus ¶ added in v0.14.0
func (this ResponseDetailsViewV4) GetStatus() int
Gets Status - required for interfaces.Response
func (ResponseDetailsViewV4) GetTemplated ¶ added in v0.14.0
func (this ResponseDetailsViewV4) GetTemplated() bool
func (ResponseDetailsViewV4) GetTransitionsState ¶ added in v0.14.0
func (this ResponseDetailsViewV4) GetTransitionsState() map[string]string
type ResponseDetailsViewV5 ¶ added in v0.17.0
type ResponseDetailsViewV5 struct { Status int `json:"status"` Body string `json:"body"` BodyFile string `json:"bodyFile,omitempty"` EncodedBody bool `json:"encodedBody"` Headers map[string][]string `json:"headers,omitempty"` Templated bool `json:"templated"` TransitionsState map[string]string `json:"transitionsState,omitempty"` RemovesState []string `json:"removesState,omitempty"` FixedDelay int `json:"fixedDelay,omitempty"` LogNormalDelay *LogNormalDelayOptions `json:"logNormalDelay,omitempty"` PostServeAction string `json:"postServeAction,omitempty"` }
func (ResponseDetailsViewV5) GetBody ¶ added in v0.17.0
func (this ResponseDetailsViewV5) GetBody() string
Gets Body - required for interfaces.Response
func (ResponseDetailsViewV5) GetBodyFile ¶ added in v1.3.0
func (this ResponseDetailsViewV5) GetBodyFile() string
Gets BodyFile - required for interfaces.Response
func (ResponseDetailsViewV5) GetEncodedBody ¶ added in v0.17.0
func (this ResponseDetailsViewV5) GetEncodedBody() bool
Gets EncodedBody - required for interfaces.Response
func (ResponseDetailsViewV5) GetFixedDelay ¶ added in v1.3.0
func (this ResponseDetailsViewV5) GetFixedDelay() int
Gets FixedDelay - required for interfaces.Response
func (ResponseDetailsViewV5) GetHeaders ¶ added in v0.17.0
func (this ResponseDetailsViewV5) GetHeaders() map[string][]string
Gets Headers - required for interfaces.Response
func (ResponseDetailsViewV5) GetLogNormalDelay ¶ added in v1.3.0
func (this ResponseDetailsViewV5) GetLogNormalDelay() interfaces.ResponseDelay
Gets LogNormalDelay - required for interfaces.Response The trick here to return nil with the right type to compare later.
func (ResponseDetailsViewV5) GetPostServeAction ¶ added in v1.6.0
func (this ResponseDetailsViewV5) GetPostServeAction() string
func (ResponseDetailsViewV5) GetRemovesState ¶ added in v0.17.0
func (this ResponseDetailsViewV5) GetRemovesState() []string
func (ResponseDetailsViewV5) GetStatus ¶ added in v0.17.0
func (this ResponseDetailsViewV5) GetStatus() int
Gets Status - required for interfaces.Response
func (ResponseDetailsViewV5) GetTemplated ¶ added in v0.17.0
func (this ResponseDetailsViewV5) GetTemplated() bool
func (ResponseDetailsViewV5) GetTransitionsState ¶ added in v0.17.0
func (this ResponseDetailsViewV5) GetTransitionsState() map[string]string
type ResponseDiffForRequestView ¶ added in v0.16.0
type ResponseDiffForRequestView struct { Request SimpleRequestDefinitionView `json:"request"` DiffReport []DiffReport `json:"diffReports"` }
type ShutdownHandler ¶ added in v0.11.5
type ShutdownHandler struct { }
func (*ShutdownHandler) Delete ¶ added in v0.11.5
func (this *ShutdownHandler) Delete(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*ShutdownHandler) Options ¶ added in v0.12.0
func (this *ShutdownHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*ShutdownHandler) RegisterRoutes ¶ added in v0.11.5
func (this *ShutdownHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type SimpleRequestDefinitionView ¶ added in v0.16.0
type SimulationHandler ¶
type SimulationHandler struct {
Hoverfly HoverflySimulation
}
func (*SimulationHandler) Delete ¶
func (this *SimulationHandler) Delete(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*SimulationHandler) Get ¶
func (this *SimulationHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*SimulationHandler) GetSchema ¶ added in v0.11.0
func (this *SimulationHandler) GetSchema(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*SimulationHandler) Options ¶ added in v0.12.0
func (this *SimulationHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*SimulationHandler) OptionsSchema ¶ added in v0.12.0
func (this *SimulationHandler) OptionsSchema(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*SimulationHandler) Post ¶ added in v1.0.1
func (this *SimulationHandler) Post(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*SimulationHandler) Put ¶
func (this *SimulationHandler) Put(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*SimulationHandler) RegisterRoutes ¶
func (this *SimulationHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type SimulationImportResult ¶ added in v0.17.0
type SimulationImportResult struct { Err error `json:"error,omitempty"` WarningMessages []SimulationImportWarning `json:"warnings,omitempty"` }
func (*SimulationImportResult) AddBodyAndBodyFileWarning ¶ added in v1.3.0
func (s *SimulationImportResult) AddBodyAndBodyFileWarning(requestNumber int)
func (*SimulationImportResult) AddContentLengthAndTransferEncodingWarning ¶ added in v0.17.1
func (s *SimulationImportResult) AddContentLengthAndTransferEncodingWarning(requestNumber int)
func (*SimulationImportResult) AddContentLengthMismatchWarning ¶ added in v0.17.1
func (s *SimulationImportResult) AddContentLengthMismatchWarning(requestNumber int)
func (*SimulationImportResult) AddPairIgnoredWarning ¶ added in v1.0.1
func (s *SimulationImportResult) AddPairIgnoredWarning(requestNumber int)
func (SimulationImportResult) GetError ¶ added in v0.17.0
func (s SimulationImportResult) GetError() error
func (*SimulationImportResult) SetError ¶ added in v1.1.4
func (s *SimulationImportResult) SetError(err error)
type SimulationImportWarning ¶ added in v0.17.0
type SimulationViewV1 ¶ added in v0.11.0
type SimulationViewV1 struct { DataViewV1 `json:"data"` MetaView `json:"meta"` }
type SimulationViewV2 ¶ added in v0.11.0
type SimulationViewV2 struct { DataViewV2 `json:"data"` MetaView `json:"meta"` }
type SimulationViewV3 ¶ added in v0.13.0
type SimulationViewV3 struct { DataViewV3 `json:"data"` MetaView `json:"meta"` }
type SimulationViewV4 ¶ added in v0.14.0
type SimulationViewV4 struct { DataViewV4 `json:"data"` MetaView `json:"meta"` }
type SimulationViewV5 ¶ added in v0.17.0
type SimulationViewV5 struct { DataViewV5 `json:"data"` MetaView `json:"meta"` }
func BuildSimulationView ¶ added in v0.15.1
func BuildSimulationView( pairViews []RequestMatcherResponsePairViewV5, delayView v1.ResponseDelayPayloadView, delayLogNormalView v1.ResponseDelayLogNormalPayloadView, variables []GlobalVariableViewV5, literals []GlobalLiteralViewV5, version string, ) SimulationViewV5
func NewSimulationViewFromRequestBody ¶ added in v1.0.0
func NewSimulationViewFromRequestBody(requestBody []byte) (SimulationViewV5, error)
type StateHandler ¶ added in v0.14.0
type StateHandler struct {
Hoverfly Hoverfly
}
func (*StateHandler) Delete ¶ added in v0.14.0
func (this *StateHandler) Delete(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*StateHandler) Get ¶ added in v0.14.0
func (this *StateHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*StateHandler) Options ¶ added in v0.14.0
func (this *StateHandler) Options(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*StateHandler) Patch ¶ added in v0.14.0
func (this *StateHandler) Patch(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*StateHandler) Put ¶ added in v0.14.0
func (this *StateHandler) Put(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*StateHandler) RegisterRoutes ¶ added in v0.14.0
func (this *StateHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)
type TemplateDataSourceView ¶ added in v1.7.0
type TemplateDataSourceView struct {
DataSources []CSVDataSourceView `json:"csvDataSources,omitempty"`
}
type UpstreamProxyView ¶ added in v0.10.1
type UpstreamProxyView struct {
UpstreamProxy string `json:"upstreamProxy"`
}
type VersionView ¶ added in v0.10.1
type VersionView struct {
Version string `json:"version"`
}
Source Files ¶
- cache_handler.go
- diff_handler.go
- hoverfly_cors_handler.go
- hoverfly_destination_handler.go
- hoverfly_handler.go
- hoverfly_journalindex_handler.go
- hoverfly_middleware_handler.go
- hoverfly_mode_handler.go
- hoverfly_pac_handler.go
- hoverfly_postserveactiondetails_handler.go
- hoverfly_templatedatasource_handler.go
- hoverfly_upstream_proxy_handler.go
- hoverfly_usage_handler.go
- hoverfly_version_handler.go
- journal_handler.go
- logs_handler.go
- postserveactiondetails_views.go
- shutdown_handler.go
- simulation_handler.go
- simulation_views.go
- simulation_views_upgrade.go
- simulation_views_v1.go
- simulation_views_v2.go
- simulation_views_v3.go
- simulation_views_v4.go
- simulation_views_v5.go
- simulation_views_validation.go
- state_handler.go
- template_datasource_views.go
- testutils.go
- views.go