v2

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

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
	GetMode() string
	GetStats() metrics.Stats
}

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
	SetMiddleware(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 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 HoverflyView

type HoverflyView struct {
	DestinationView
	MiddlewareView
	ModeView
	UsageView
}

type MetaView

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

type MiddlewareView

type MiddlewareView struct {
	Middleware string `json:"middleware"`
}

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

type UsageView

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

Jump to

Keyboard shortcuts

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