models

package
v2.0.0-beta.14 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// V2 spec
	V2 SpecificationVersion = "2.0.0"

	// V3 spec
	V3 = "3.0.0"

	// V4 spec
	V4 = "4.0.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ProviderState

type ProviderState struct {
	Name       string                 `json:"name"`
	Parameters map[string]interface{} `json:"params,omitempty"`
}

ProviderState allows parameters and a description to be passed to the verification process

type ProviderStateResponse

type ProviderStateResponse map[string]interface{}

ProviderStateResponse may return values in the state setup for the "value from provider state" feature

type SpecificationVersion

type SpecificationVersion string

SpecificationVersion is used to determine the current specification version

type StateHandler

type StateHandler func(setup bool, state ProviderState) (ProviderStateResponse, error)

StateHandler is a provider function that sets up a given state before the provider interaction is validated It can optionally return a map of key => value (JSON) that may be used as values in the verification process See https://github.com/pact-foundation/pact-reference/tree/master/rust/pact_verifier_cli#state-change-requests https://github.com/pact-foundation/pact-js/tree/feat/v3.0.0#provider-state-injected-values for more

type StateHandlers

type StateHandlers map[string]StateHandler

StateHandlers is a list of StateHandler's

Jump to

Keyboard shortcuts

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