fifo

package
v2.0.0-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	// contains filtered or unexported fields
}

Group is a martian.RequestResponseModifier that maintains lists of request and response modifiers executed on a first-in, first-out basis.

func NewGroup

func NewGroup() *Group

NewGroup returns a modifier group.

func (*Group) AddRequestModifier

func (g *Group) AddRequestModifier(reqmod martian.RequestModifier)

AddRequestModifier adds a RequestModifier to the group's list of request modifiers.

func (*Group) AddResponseModifier

func (g *Group) AddResponseModifier(resmod martian.ResponseModifier)

AddResponseModifier adds a ResponseModifier to the group's list of response modifiers.

func (*Group) ModifyRequest

func (g *Group) ModifyRequest(req *http.Request) error

ModifyRequest modifies the request. If an error is returned by a RequestModifier the error is returned and no further modifiers are run.

func (*Group) ModifyResponse

func (g *Group) ModifyResponse(res *http.Response) error

ModifyResponse modifies the request. If an error is returned by a ResponseModifier the error is returned and no further modifiers are run.

func (*Group) ResetRequestVerifications

func (g *Group) ResetRequestVerifications()

ResetRequestVerifications resets the state of the contained request verifiers.

func (*Group) ResetResponseVerifications

func (g *Group) ResetResponseVerifications()

ResetResponseVerifications resets the state of the contained request verifiers.

func (*Group) VerifyRequests

func (g *Group) VerifyRequests() error

VerifyRequests returns a MultiError containing all the verification errors returned by request verifiers.

func (*Group) VerifyResponses

func (g *Group) VerifyResponses() error

VerifyResponses returns a MultiError containing all the verification errors returned by response verifiers.

Jump to

Keyboard shortcuts

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