Pact.PactVerifier.PactSource (pact_verifier_ex v0.1.6)

Copy Markdown

Source for loading pacts.

Variants

  • Unknown - Unknown pact source.
  • File - Load the pact from a pact file.
  • Dir - Load all the pacts from a directory.
  • URL - Load the pact from a URL.
  • BrokerUrl - Load all pacts with the provider name from the pact broker URL.
  • BrokerWithDynamicConfiguration - Load pacts with the newer pacts for verification API. Includes provider name, broker URL, pending/wip options, selectors, auth, and links.
  • String - Load the Pact from some JSON (used for testing purposes).
  • WebhookCallbackUrl - Load the given pact with the URL via a webhook callback.

Summary

Types

t()

@type t() ::
  :unknown
  | {:file, String.t()}
  | {:dir, String.t()}
  | {:url, String.t(), nil | Pact.PactVerifier.HttpAuth.t()}
  | {:broker_url, String.t(), String.t(), nil | Pact.PactVerifier.HttpAuth.t(),
     [Pact.PactVerifier.Link.t()]}
  | {:broker_with_dynamic_configuration,
     Pact.PactVerifier.PactSource.BrokerDynamicConfig.t()}
  | {:string, String.t()}
  | {:webhook_callback_url,
     %{
       pact_url: String.t(),
       broker_url: String.t(),
       auth: nil | Pact.PactVerifier.HttpAuth.t()
     }}

Functions

broker_url(provider_name, broker_url, auth \\ nil, links \\ [])

@spec broker_url(String.t(), String.t(), nil | Pact.PactVerifier.HttpAuth.t(), [
  Pact.PactVerifier.Link.t()
]) :: t()

broker_with_dynamic_configuration(opts)

@spec broker_with_dynamic_configuration(
  Pact.PactVerifier.PactSource.BrokerDynamicConfig.t()
) :: t()

dir(path)

@spec dir(String.t()) :: t()

file(path)

@spec file(String.t()) :: t()

string(contract)

@spec string(String.t()) :: t()

url(url, auth \\ nil)

@spec url(String.t(), nil | Pact.PactVerifier.HttpAuth.t()) :: t()

webhook_callback_url(pact_url, broker_url, auth \\ nil)

@spec webhook_callback_url(
  String.t(),
  String.t(),
  nil | Pact.PactVerifier.HttpAuth.t()
) :: t()