middleware

package
v0.17.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware struct {
	Binary string
	Script *os.File
	Remote string
}

func ConvertToNewMiddleware

func ConvertToNewMiddleware(middleware string) (*Middleware, error)

func (*Middleware) DeleteScripts

func (this *Middleware) DeleteScripts(path string) error

func (*Middleware) Execute

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"`
	Headers     map[string][]string `json:"headers"`
}

func (RequestDetailsView) GetBody

func (this RequestDetailsView) GetBody() *string

func (RequestDetailsView) GetDestination

func (this RequestDetailsView) GetDestination() *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"`
	EncodedBody bool                `json:"encodedBody"`
	Headers     map[string][]string `json:"headers"`
}

func (ResponseDetailsView) GetBody

func (this ResponseDetailsView) GetBody() string

func (ResponseDetailsView) GetEncodedBody

func (this ResponseDetailsView) GetEncodedBody() bool

func (ResponseDetailsView) GetHeaders

func (this ResponseDetailsView) GetHeaders() map[string][]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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL