consumer

package
v0.0.0-...-3a5bafc Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2015 License: MIT Imports: 8 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) RegisterInteraction

func (ms *HttpMockService) RegisterInteraction(interaction *Interaction)

func (*HttpMockService) Start

func (ms *HttpMockService) Start() string

func (*HttpMockService) Stop

func (ms *HttpMockService) Stop()

type Interaction

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

func NewInteraction

func NewInteraction(description string, state string, request *provider.ProviderRequest,
	response *provider.ProviderResponse) *Interaction

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