Module: PactFfi

Extended by:
FFI::Library
Defined in:
lib/pact/ffi.rb,
lib/pact/ffi/utils.rb,
lib/pact/ffi/logger.rb,
lib/pact/ffi/verifier.rb,
lib/pact/ffi/mock_server.rb,
lib/pact/ffi/http_consumer.rb,
lib/pact/ffi/plugin_consumer.rb,
lib/pact/ffi/message_consumer.rb,
lib/pact/ffi/async_message_pact.rb,
lib/pact/ffi/sync_http_consumer.rb,
lib/pact/ffi/sync_message_consumer.rb

Defined Under Namespace

Modules: AsyncMessageConsumer, HttpConsumer, Logger, MessageConsumer, MockServer, PluginConsumer, SyncHttpConsumer, SyncMessageConsumer, Utils, Verifier

Constant Summary collapse

FfiSpecificationVersion =
Hash[
  'SPECIFICATION_VERSION_UNKNOWN' => 0,
  'SPECIFICATION_VERSION_V1' => 1,
  'SPECIFICATION_VERSION_V1_1' => 2,
  'SPECIFICATION_VERSION_V2' => 3,
  'SPECIFICATION_VERSION_V3' => 4,
  'SPECIFICATION_VERSION_V4' => 5,
]
FfiWritePactResponse =
Hash[
  'SUCCESS' => 0,
  'GENERAL_PANIC' => 1,
  'UNABLE_TO_WRITE_PACT_FILE' => 2,
  'MOCK_SERVER_NOT_FOUND' => 3,
]
FfiWriteMessagePactResponse =
Hash[
  'SUCCESS' => 0,
  'UNABLE_TO_WRITE_PACT_FILE' => 1,
  'MESSAGE_HANDLE_INVALID' => 2,
  'MOCK_SERVER_NOT_FOUND' => 3,
]
FfiConfigurePluginResponse =
Hash[
  'SUCCESS' => 0,
  'GENERAL_PANIC' => 1,
  'FAILED_TO_LOAD_PLUGIN' => 2,
  'PACT_HANDLE_INVALID' => 3,
]
FfiPluginInteractionResponse =
Hash[
  'SUCCESS' => 0,
  'A_GENERAL_PANIC_WAS_CAUGHT' => 1,
  'MOCK_SERVER_HAS_ALREADY_BEEN_STARTED' => 2,
  'INTERACTION_HANDLE_IS_INVALID' => 3,
  'CONTENT_TYPE_IS_NOT_VALID' => 4,
  'CONTENTS_JSON_IS_NOT_VALID_JSON' => 5,
  'PLUGIN_RETURNED_AN_ERROR' => 6,
]
FfiInteractionPart =
Hash[
  'INTERACTION_PART_REQUEST' => 0,
  'INTERACTION_PART_RESPONSE' => 1,
]
FfiPluginCreateMockServerErrors =

/* -1 A null pointer was received -2 The pact JSON could not be parsed -3 The mock server could not be started -4 The method panicked -5 The address is not valid -6 Could not create the TLS configuration with the self-signed certificate */

Hash[
  'NULL_POINTER' => -1,
  'JSON_PARSE_ERROR' => -2,
  'MOCK_SERVER_START_FAIL' => -3,
  'CORE_PANIC' => -4,
  'ADDRESS_NOT_VALID' => -5,
  'TLS_CONFIG' => -6,
]
FfiVerifyProviderResponse =

/*

* | Error | Description |
* |-------|-------------|
* | 1 | The verification process failed, see output for errors |
* | 2 | A null pointer was received |
* | 3 | The method panicked |
* | 4 | Invalid arguments were provided to the verification process |
*/
Hash[
  'VERIFICATION_SUCCESSFUL' => 0,
  'VERIFICATION_FAILED' => 1,
  'NULL_POINTER_RECEIVED' => 2,
  'METHOD_PANICKED' => 3,
  'INVALID_ARGUMENTS' => 4,
]
FfiPluginFunctionResult =
Hash[
  'RESULT_OK' => 0,
  'RESULT_FAILED' => 1,
]
FfiLogLevelFilter =
Hash[
  'LOG_LEVEL_OFF' => 0,
  'LOG_LEVEL_ERROR' => 1,
  'LOG_LEVEL_WARN' => 2,
  'LOG_LEVEL_INFO' => 3,
  'LOG_LEVEL_DEBUG' => 4,
  'LOG_LEVEL_TRACE' => 5
]
FfiLogLevel =
Hash[
  'LOG_LEVEL_OFF' => 'OFF',
  'LOG_LEVEL_ERROR' => 'ERROR',
  'LOG_LEVEL_WARN' => 'WARN',
  'LOG_LEVEL_INFO' => 'INFO',
  'LOG_LEVEL_DEBUG' => 'DEBUG',
  'LOG_LEVEL_TRACE' => 'TRACE'
]