p

pact4s

package pact4s

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. sealed trait Authentication extends AnyRef

    Auth for accessing a pact-broker

  2. trait BasePactForgerResources extends Pact4sLogger
  3. trait BasePactForgerResourcesForPlatform[Pact <: BasePact[_]] extends BasePactForgerResources
  4. final case class ConsumerVersionSelector(tag: Option[String] = None, latest: Boolean = true, fallbackTag: Option[String] = None, consumer: Option[String] = None) extends Product with Serializable

    tag

    the tag name(s) of the consumer versions to get the pacts for.

    latest

    the name of the tag to fallback to if the specified tag does not exist. This is useful when the consumer and provider use matching branch names to coordinate the development of new features.

    fallbackTag

    default true. If the latest flag is omitted, all the pacts with the specified tag will be returned. (This might seem a bit weird, but it's done this way to match the syntax used for the matrix query params. See https://docs.pact.io/selectors)

    consumer

    allows a selector to only be applied to a certain consumer. This is used for example when there is an API that has multiple consumers, one of which is a deployed service, and one of which is a mobile consumer. The deployed service only needs the latest production pact verified, where as the mobile consumer may want all the production pacts verified.

    See also

    https://docs.pact.io/pact_broker/advanced_topics/consumer_version_selectors/ and https://github.com/pact-foundation/pact_broker/issues/307 Gets converted into a au.com.dius.pact.core.pactbroker.ConsumerVersionSelector under the hood.

  5. sealed case class MessageAndMetadataBuilder(message: Array[Byte], metadata: Map[String, Any]) extends ResponseBuilder with Product with Serializable
  6. trait MessagePactDecoder[A] extends AnyRef
  7. trait MessagePactForgerResources extends BasePactForgerResourcesForPlatform[MessagePact] with MessagePactOps
  8. trait MessagePactOps extends AnyRef
  9. trait Pact4sLogger extends AnyRef
  10. trait PactBodyJsonEncoder[A] extends AnyRef
  11. trait PactDslJsonBodyEncoder[A] extends AnyRef
  12. sealed trait PactSource extends AnyRef
  13. trait PactVerifyResources extends AnyRef
  14. final case class ProviderInfoBuilder(name: String, protocol: String, host: String, port: Int, path: String, pactSource: PactSource, stateChangeUrl: Option[String] = None, verificationSettings: Option[VerificationSettings] = None, requestFilter: (ProviderRequest) => List[ProviderRequestFilter] = _ => Nil) extends Product with Serializable

    Interface for defining the provider that consumer pacts are verified against.

    Interface for defining the provider that consumer pacts are verified against. Internally gets converted to au.com.dius.pact.provider.ProviderInfo during verification.

    name

    the name of the provider

    protocol

    e.g. http or https

    host

    mock provider host

    port

    mock provider port

    path

    address of the mock provider server is {protocol}://{host}:{port}{path}

    pactSource

    pacts to verify can come either from a file location, or from a pact broker.

    stateChangeUrl

    full url of the mock provider endpoint that can be used for setting provider state before each pact with state is run. state is sent as JSON of the form {"state": "state goes here"}. Can also be set using ProviderInfoBuilder#withStateChangeEndpoint just by providing the path.

    verificationSettings

    Required if verifying message pacts

    requestFilter

    Apply filters to certain consumer requests. The most common use case for this is adding auth headers to requests

    See also

    https://docs.pact.io/faq/#how-do-i-test-oauth-or-other-security-headers

  15. final case class ProviderRequest extends Product with Serializable

    A simplified interface for managing the requests sent by pact-jvm to the mock provider service.

    A simplified interface for managing the requests sent by pact-jvm to the mock provider service. Used in conjunction with ProviderRequestFilter in ProviderInfoBuilder.requestFilter

  16. trait ProviderRequestFilter extends AnyRef

    pact-jvm uses apache-http as its http implementation.

    pact-jvm uses apache-http as its http implementation. A ProviderRequestFilter applies a transformation to a org.apache.http.HttpRequest before passing it to the mock provider server. Its called a "filter" as this is what its called in other pact implementations. It doesn't filter in the sense of stopping certain requests from reaching the mock server.

  17. sealed case class ProviderResponseBuilder(statusCode: Int, contentType: Option[String], headers: Map[String, List[String]], data: Option[String]) extends ResponseBuilder with Product with Serializable
  18. final case class ProviderState(state: String) extends AnyVal with Product with Serializable

    entity passed to the mock provider state setup endpoint by pact-jvm before running consumer pacts with state.

    entity passed to the mock provider state setup endpoint by pact-jvm before running consumer pacts with state. A circe.Decoder instance is provided in the pact4s-circe module.

  19. final case class ProviderTags(head: String, tail: List[String]) extends Product with Serializable
  20. sealed abstract class ProviderVerificationOption extends AnyRef
  21. final case class PublishVerificationResults(providerVersion: String, providerTags: Option[ProviderTags]) extends Product with Serializable
  22. trait RequestResponsePactForgerResources extends BasePactForgerResourcesForPlatform[RequestResponsePact] with RequestResponsePactOps
  23. trait RequestResponsePactOps extends AnyRef
  24. sealed trait ResponseBuilder extends AnyRef
  25. sealed trait VerificationSettings extends AnyRef

Ungrouped