package
0.0.14-beta
Repository: https://github.com/jeffthedev/pact-go.git
Documentation: pkg.go.dev

# Functions

Date matches a pattern corresponding to the ISO_DATE_FORMAT, which is "yyyy-MM-dd".
Decimal defines a matcher that accepts any decimal value.
EachLike specifies that a given element in a JSON body can be repeated "minRequired" times.
HexValue defines a matcher that accepts hexidecimal values.
Identifier defines a matcher that accepts integer values.
IPAddress defines a matcher that accepts valid IPv4 addresses.
IPv6Address defines a matcher that accepts IP addresses.
Like specifies that the given content type should be matched based on type (int, string etc.) instead of a verbatim match.
Match recursively traverses the provided type and outputs a matcher string for it that is compatible with the Pact dsl.
NewClient creates a new Pact client manager with defaults.
Term specifies that the matching should generate a value and also match using a regular expression.
Time matches a pattern corresponding to the ISO_DATE_FORMAT, which is "'T'HH:mm:ss".
Timestamp matches a pattern corresponding to the ISO_DATETIME_FORMAT, which is "yyyy-MM-dd'T'HH:mm:ss".
UUID defines a matcher that accepts UUIDs.

# Variables

ErrNoConsumers is returned when no consumer are not found for a provider.
ErrUnauthorized represents a Forbidden (403).
Integer defines a matcher that accepts ints.
IPv4Address matches valid IPv4 addresses.
Regex is a more appropriately named alias for the "Term" matcher.

# Structs

HalDoc is a simple representation of the HAL response from a Pact Broker.
HalLinks represents the _links key in a HAL document.
Interaction is the main implementation of the Pact interface.
Message is a representation of a single, unidirectional message e.g.
MockService is the HTTP interface to setup the Pact Mock Service See https://github.com/bethesque/pact-mock_service and https://gist.github.com/bethesque/9d81f21d6f77650811f4.
Pact is the container structure to run the Consumer Pact test cases.
PactClient is the main interface into starting/stopping the underlying Pact CLI subsystem.
PactFile is a simple representation of a Pact file to be able to parse Consumer/Provider from the file.
PactLink represents the Pact object in the HAL response.
PactName represents the name fields in the PactFile.
Publisher is the API to send Pact files to a Pact Broker.
Request is the default implementation of the Request interface.
Response is the default implementation of the Response interface.
ServiceMock is the mock implementation of the Service interface.
State specifies how the system should be configured when verified.
VerifyMessageRequest contains the verification logic to send to the Pact Message verifier.

# Interfaces

StringMatcher allows a string or Matcher to be provided in when matching with the DSL We use the strategy outlined at http://www.jerf.org/iri/post/2917 to create a "sum" or "union" type.

# Type aliases

MapMatcher allows a map[string]string-like object to also contain complex matchers.
Matcher matches a complex object structure, which may itself contain nested Matchers.
MessageConsumer receives a message and must be able to parse the content.
MessageHandler is a provider function that generates a message for a Consumer given a Message context (state, description etc.).
MessageHandlers is a list of handlers ordered by description.
S is the string primitive wrapper (alias) for the StringMatcher type, it allows plain strings to be matched To keep backwards compatible with previous versions we aren't using an alias here.
StateHandler is a provider function that sets up a given state before the provider interaction is validated.
StateHandlers is a list of StateHandler's.
String is the longer named form of the string primitive wrapper, it allows plain strings to be matched.