v2

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2017 License: Apache-2.0 Imports: 14 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataView

type DataView struct {
	RequestResponsePairs []RequestResponsePairView `json:"pairs"`
	GlobalActions        GlobalActionsView         `json:"globalActions"`
}

type DestinationView

type DestinationView struct {
	Destination string `json:"destination"`
}

type GlobalActionsView

type GlobalActionsView struct {
	Delays []v1.ResponseDelayView `json:"delays"`
}

type Hoverfly

type Hoverfly interface {
	GetDestination() string
	GetMiddleware() (string, string, string)
	GetMode() string
	GetStats() metrics.Stats
	GetVersion() string
	GetUpstreamProxy() string
}

type HoverflyDestination

type HoverflyDestination interface {
	GetDestination() string
	SetDestination(string) error
}

type HoverflyDestinationHandler

type HoverflyDestinationHandler struct {
	Hoverfly HoverflyDestination
}

func (*HoverflyDestinationHandler) Get

func (*HoverflyDestinationHandler) Put

func (*HoverflyDestinationHandler) RegisterRoutes

func (this *HoverflyDestinationHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)

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) RegisterRoutes

func (this *HoverflyHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)

type HoverflyMiddleware

type HoverflyMiddleware interface {
	GetMiddleware() (string, string, string)
	SetMiddleware(string, string, string) error
}

type HoverflyMiddlewareHandler

type HoverflyMiddlewareHandler struct {
	Hoverfly HoverflyMiddleware
}

func (*HoverflyMiddlewareHandler) Get

func (*HoverflyMiddlewareHandler) Put

func (*HoverflyMiddlewareHandler) RegisterRoutes

func (this *HoverflyMiddlewareHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)

type HoverflyMode

type HoverflyMode interface {
	GetMode() string
	SetMode(string) error
}

type HoverflyModeHandler

type HoverflyModeHandler struct {
	Hoverfly HoverflyMode
}

func (*HoverflyModeHandler) Get

func (*HoverflyModeHandler) Put

func (*HoverflyModeHandler) RegisterRoutes

func (this *HoverflyModeHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)

type HoverflySimulation

type HoverflySimulation interface {
	GetSimulation() (SimulationView, error)
	PutSimulation(SimulationView) error
	DeleteSimulation()
}

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 (*HoverflyUpstreamProxyHandler) RegisterRoutes added in v0.10.1

func (this *HoverflyUpstreamProxyHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)

type HoverflyUsage

type HoverflyUsage interface {
	GetStats() metrics.Stats
}

type HoverflyUsageHandler

type HoverflyUsageHandler struct {
	Hoverfly HoverflyUsage
}

func (*HoverflyUsageHandler) Get

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 (*HoverflyVersionHandler) RegisterRoutes added in v0.10.1

func (this *HoverflyVersionHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)

type HoverflyView

type HoverflyView struct {
	DestinationView
	MiddlewareView `json:"middleware"`
	ModeView
	UsageView
	VersionView
	UpstreamProxyView
}

type MetaView

type MetaView struct {
	SchemaVersion   string `json:"schemaVersion"`
	HoverflyVersion string `json:"hoverflyVersion"`
	TimeExported    string `json:"timeExported"`
}

type MiddlewareView

type MiddlewareView struct {
	Binary string `json:"binary"`
	Script string `json:"script"`
	Remote string `json:"remote"`
}

type ModeView

type ModeView struct {
	Mode string `json:"mode"`
}

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"`
}

RequestDetailsView is used when marshalling and unmarshalling RequestDetails

func (RequestDetailsView) GetBody

func (this RequestDetailsView) GetBody() *string

Gets Body - required for interfaces.Request

func (RequestDetailsView) GetDestination

func (this RequestDetailsView) GetDestination() *string

Gets Destination - required for interfaces.Request

func (RequestDetailsView) GetHeaders

func (this RequestDetailsView) GetHeaders() map[string][]string

Gets Headers - required for interfaces.Request

func (RequestDetailsView) GetMethod

func (this RequestDetailsView) GetMethod() *string

Gets Method - required for interfaces.Request

func (RequestDetailsView) GetPath

func (this RequestDetailsView) GetPath() *string

Gets Path - required for interfaces.Request

func (RequestDetailsView) GetQuery

func (this RequestDetailsView) GetQuery() *string

Gets Query - required for interfaces.Request

func (RequestDetailsView) GetRequestType

func (this RequestDetailsView) GetRequestType() *string

Gets RequestType - required for interfaces.Request

func (RequestDetailsView) GetScheme

func (this RequestDetailsView) GetScheme() *string

Gets Scheme - required for interfaces.Request

type RequestResponsePairView

type RequestResponsePairView struct {
	Response ResponseDetailsView `json:"response"`
	Request  RequestDetailsView  `json:"request"`
}

func (RequestResponsePairView) GetRequest

func (this RequestResponsePairView) GetRequest() interfaces.Request

Gets Request - required for interfaces.RequestResponsePairView

func (RequestResponsePairView) GetResponse

func (this RequestResponsePairView) 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"`
}

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) GetEncodedBody

func (this ResponseDetailsView) GetEncodedBody() bool

Gets EncodedBody - required for interfaces.Response

func (ResponseDetailsView) GetHeaders

func (this ResponseDetailsView) GetHeaders() map[string][]string

Gets Headers - required for interfaces.Response

func (ResponseDetailsView) GetStatus

func (this ResponseDetailsView) GetStatus() int

Gets Status - required for interfaces.Response

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 (*SimulationHandler) Put

func (*SimulationHandler) RegisterRoutes

func (this *SimulationHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler)

type SimulationView

type SimulationView struct {
	DataView `json:"data"`
	MetaView `json:"meta"`
}

func (SimulationView) GetValidationSchema added in v0.9.2

func (this SimulationView) GetValidationSchema() valid.Validator

type UpstreamProxyView added in v0.10.1

type UpstreamProxyView struct {
	UpstreamProxy string `json:"upstream-proxy"`
}

type UsageView

type UsageView struct {
	Usage metrics.Stats `json:"usage"`
}

type VersionView added in v0.10.1

type VersionView struct {
	Version string `json:"version"`
}

Jump to

Keyboard shortcuts

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