types

package
v0.0.3-windows Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2017 License: MIT Imports: 2 Imported by: 27

Documentation

Overview

Package types contains a number of structs common to the library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandResponse

type CommandResponse struct {
	// System exit code from the command. Note that this will only even be 0 or 1.
	ExitCode int

	// Error message (if any) from the command.
	Message string
}

CommandResponse contains the exit status and any message from running an external command / service.

type MockServer added in v0.0.2

type MockServer struct {
	Pid    int
	Port   int
	Status int
	Args   []string
}

MockServer contains the RPC client interface to a Mock Server

type PactListResponse

type PactListResponse struct {
	// System exit code from the Publish task.
	Servers []*MockServer
}

PactListResponse contains a list of all running Servers.

type ProviderState added in v0.0.2

type ProviderState struct {
	Consumer string `json:"consumer"`
	State    string `json:"state"`
}

ProviderState Models a provider state coming over the Wire. This is generally provided as a request to an HTTP endpoint (e.g. PUT /state) to configure a state on a Provider.

type ProviderStates added in v0.0.2

type ProviderStates map[string][]string

ProviderStates is mapping of consumers to all known states. This is usually a response from an HTTP endpoint (e.g. GET /states) to find all states a provider has.

type PublishRequest

type PublishRequest struct {
	// Array of local Pact files or directories containing them. Required.
	PactURLs []string

	// URL to fetch the provider states for the given provider API. Optional.
	PactBroker string

	// Username for Pact Broker basic authentication. Optional
	BrokerUsername string

	// Password for Pact Broker basic authentication. Optional
	BrokerPassword string

	// ConsumerVersion is the semantical version of the consumer API.
	ConsumerVersion string

	// Tags help you organise your Pacts for different testing purposes.
	// e.g. "production", "latest" and "development" are some common examples.
	Tags []string
}

PublishRequest contains the details required to Publish Pacts to a broker.

type VerifyRequest

type VerifyRequest struct {
	// URL to hit during provider verification.
	ProviderBaseURL string

	// Local/HTTP paths to Pact files.
	PactURLs []string

	// Pact Broker URL for broker-based verification
	BrokerURL string

	// Tags to find in Broker for matrix-based testing
	Tags []string

	// URL to retrieve valid Provider States.
	ProviderStatesURL string

	// URL to post currentp provider state to on the Provider API.
	ProviderStatesSetupURL string

	// Username when authenticating to a Pact Broker.
	BrokerUsername string

	// Password when authenticating to a Pact Broker.
	BrokerPassword string

	// Arguments to the VerificationProvider
	// Deprecated: This will be deleted after the native library replaces Ruby deps.
	Args []string
}

VerifyRequest contains the verification params.

func (*VerifyRequest) Validate

func (v *VerifyRequest) Validate() error

Validate checks that the minimum fields are provided. Deprecated: This map be deleted after the native library replaces Ruby deps, and should not be used outside of this library.

Jump to

Keyboard shortcuts

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