consumer

package
v0.0.0-...-08f35fa Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPMockService

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

func NewHTTPMockService

func NewHTTPMockService() *HTTPMockService

func (*HTTPMockService) ClearInteractions

func (ms *HTTPMockService) ClearInteractions()

func (*HTTPMockService) GetRegisteredInteractions

func (ms *HTTPMockService) GetRegisteredInteractions() []*Interaction

func (*HTTPMockService) IsTestScopeClear

func (ms *HTTPMockService) IsTestScopeClear() bool

func (*HTTPMockService) RegisterInteraction

func (ms *HTTPMockService) RegisterInteraction(interaction *Interaction) error

func (*HTTPMockService) Start

func (ms *HTTPMockService) Start() string

func (*HTTPMockService) Stop

func (ms *HTTPMockService) Stop()

func (*HTTPMockService) VerifyInteractions

func (ms *HTTPMockService) VerifyInteractions() error

VerifyInteractions - Verfies if the registered interactions has been requested and verified

type Interaction

type Interaction struct {
	State       string             `json:"provider_state,omitempty"`
	Description string             `json:"description"`
	Request     *provider.Request  `json:"request"`
	Response    *provider.Response `json:"response"`
}

func NewInteraction

func NewInteraction(description string, state string, request *provider.Request,
	response *provider.Response) (*Interaction, error)

func (*Interaction) IsSimilar

func (i *Interaction) IsSimilar(to *Interaction) bool

func (*Interaction) ToHTTPRequest

func (i *Interaction) ToHTTPRequest(baseURL string) (*http.Request, error)

func (*Interaction) WriteToHTTPResponse

func (i *Interaction) WriteToHTTPResponse(w http.ResponseWriter) error

Jump to

Keyboard shortcuts

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