package
2.0.0+incompatible
Repository: https://github.com/jeffthedev/pact-go.git
Documentation: pkg.go.dev
# Functions
AfterEachMiddleware is invoked after any other, and is the last function to be called prior to returning to the test suite.
BeforeEachMiddleware is invoked before any other, only on the __setup request (to avoid duplication).
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 hexadecimal 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
Integer defines a matcher that accepts ints.
IPv4Address matches valid IPv4 addresses.
Regex is a more appropriately named alias for the "Term" matcher.
# Structs
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.
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.
# Type aliases
MapMatcher allows a map[string]string-like object to also contain complex 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 Matcher 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.
StructMatcher matches a complex object structure, which may itself contain nested Matchers.