Documentation ¶
Index ¶
- type Middleware
- func (this *Middleware) DeleteScript() error
- func (this *Middleware) Execute(pair models.RequestResponsePair) (models.RequestResponsePair, error)
- func (this Middleware) GetScript() (string, error)
- func (this Middleware) IsSet() bool
- func (this *Middleware) SetBinary(binary string) error
- func (this *Middleware) SetRemote(remoteUrl string) error
- func (this *Middleware) SetScript(scriptContent string) error
- type MiddlewareError
- type RequestDetailsView
- func (this RequestDetailsView) GetBody() *string
- func (this RequestDetailsView) GetDestination() *string
- func (this RequestDetailsView) GetFormData() map[string][]string
- func (this RequestDetailsView) GetHeaders() map[string][]string
- func (this RequestDetailsView) GetMethod() *string
- func (this RequestDetailsView) GetPath() *string
- func (this RequestDetailsView) GetQuery() *string
- func (this RequestDetailsView) GetScheme() *string
- type RequestResponsePairView
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
func ConvertToNewMiddleware ¶
func ConvertToNewMiddleware(middleware string) (*Middleware, error)
func (*Middleware) DeleteScript ¶ added in v1.1.5
func (this *Middleware) DeleteScript() error
func (*Middleware) Execute ¶
func (this *Middleware) Execute(pair models.RequestResponsePair) (models.RequestResponsePair, error)
func (Middleware) GetScript ¶
func (this Middleware) GetScript() (string, error)
func (Middleware) IsSet ¶
func (this Middleware) IsSet() bool
func (*Middleware) SetBinary ¶
func (this *Middleware) SetBinary(binary string) error
func (*Middleware) SetRemote ¶
func (this *Middleware) SetRemote(remoteUrl string) error
func (*Middleware) SetScript ¶
func (this *Middleware) SetScript(scriptContent string) error
type MiddlewareError ¶ added in v0.16.0
type MiddlewareError struct { OriginalError error Message string Command string Url string Stdin string Stdout string Stderr string }
func (*MiddlewareError) Error ¶ added in v0.16.0
func (m *MiddlewareError) Error() string
type RequestDetailsView ¶
type RequestDetailsView struct { RequestType *string `json:"requestType"` Path *string `json:"path"` Method *string `json:"method"` Destination *string `json:"destination"` Scheme *string `json:"scheme"` Query *string `json:"query"` Body *string `json:"body"` FormData map[string][]string `json:"formData"` Headers map[string][]string `json:"headers"` }
func (RequestDetailsView) GetBody ¶
func (this RequestDetailsView) GetBody() *string
func (RequestDetailsView) GetDestination ¶
func (this RequestDetailsView) GetDestination() *string
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
func (RequestDetailsView) GetMethod ¶
func (this RequestDetailsView) GetMethod() *string
func (RequestDetailsView) GetPath ¶
func (this RequestDetailsView) GetPath() *string
func (RequestDetailsView) GetQuery ¶
func (this RequestDetailsView) GetQuery() *string
func (RequestDetailsView) GetScheme ¶
func (this RequestDetailsView) GetScheme() *string
type RequestResponsePairView ¶
type RequestResponsePairView struct { Response ResponseDetailsView `json:"response"` Request RequestDetailsView `json:"request"` }
This is a JSON serializable representation of the internal Hoverfly structs for HTTP requests and responses. These structs are only used when serializing requests and responses to middleware.
func (RequestResponsePairView) GetRequest ¶
func (this RequestResponsePairView) GetRequest() interfaces.Request
func (RequestResponsePairView) GetResponse ¶
func (this RequestResponsePairView) GetResponse() interfaces.Response
type ResponseDetailsView ¶
type ResponseDetailsView struct { Status int `json:"status"` Body string `json:"body"` BodyFile string `json:"bodyFile"` EncodedBody bool `json:"encodedBody"` Headers map[string][]string `json:"headers"` FixedDelay int `json:"fixedDelay"` LogNormalDelay *v2.LogNormalDelayOptions `json:"logNormalDelay"` PostServeAction string `json:"postServeAction"` }
func (ResponseDetailsView) GetBody ¶
func (this ResponseDetailsView) GetBody() string
func (ResponseDetailsView) GetBodyFile ¶ added in v1.3.0
func (this ResponseDetailsView) GetBodyFile() string
func (ResponseDetailsView) GetEncodedBody ¶
func (this ResponseDetailsView) GetEncodedBody() bool
func (ResponseDetailsView) GetFixedDelay ¶ added in v1.3.0
func (this ResponseDetailsView) GetFixedDelay() int
func (ResponseDetailsView) GetHeaders ¶
func (this ResponseDetailsView) GetHeaders() map[string][]string
func (ResponseDetailsView) GetLogNormalDelay ¶ added in v1.3.0
func (this ResponseDetailsView) GetLogNormalDelay() interfaces.ResponseDelay
The trick here to return nil with the right type to compare later.
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
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
Click to show internal directories.
Click to hide internal directories.