pact-ffi 0.0.2-aarch64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6ce728f520711debefde20ce760b054df02a8f144dde79eb3a635afb60c6ee29
4
+ data.tar.gz: 0b86dcb0811e20896ae1a5262d53c99779d3f2a08034088c897cde45dcf75f30
5
+ SHA512:
6
+ metadata.gz: 5014e17b71a4fd709ef6b7b1c4ecfc24639c51ca68ddde1912293b7d4a960894790dcddd06358a4a6d8eeb9d1cfabda96be9d37724270617c1b337f7ec75d1fa
7
+ data.tar.gz: 25f5f001a8e6196a4fc51739d1097b950ce32602a7c59a2028e6d9ce7e4caf3c0c65eb35a28ee33c1e17fd98f36b3dfdb089431961cb7c455b578781451b587e
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Yousaf Nabi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # PactFfi
2
+
3
+ Ruby spike gem, to show interactions with the Pact Rust FFI methods.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'pact-ffi'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ gem install pact-ffi
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Pre-Reqs
26
+
27
+ - Ruby
28
+ - This gem is compatible with `3.0`
29
+
30
+ - FFI libraries for your current platform - run `./script/download-libs.sh` to download
31
+ - If testing the protobuf plugin
32
+ - `2.7` for protobuf/grpc example
33
+ - See https://grpc.io/docs/languages/ruby/quickstart/ for steps
34
+ - See `examples/proto-ruby/README.md` for notes
35
+ - ruby-grpc is not currently, on m1 hardware for the `pact-protobuf-plugin` example
36
+ - Have the pact-protobuf plugin available
37
+ - Run `pact-plugin-cli -y install https://github.com/pactflow/pact-protobuf-plugin/releases/latest`
38
+ ## Development
39
+
40
+ - run `bin/setup` or `bundle install` to install dependencies
41
+ - run `./script/download-libs.sh` to download FFI libraries for your current platform
42
+ - run `rake spec` to run tests
43
+
44
+ ## Contributing
45
+
46
+ Bug reports and pull requests are welcome on GitHub at <https://github.com/[USERNAME>]/pact-ffi. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
47
+
48
+ ## License
49
+
50
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
51
+
52
+ ## Code of Conduct
53
+
54
+ Everyone interacting in the PactFfi project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/pact-ffi/blob/master/CODE_OF_CONDUCT.md).
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "pact-ffi"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
Binary file
@@ -0,0 +1,79 @@
1
+ module DetectOS
2
+ def self.windows?
3
+ return if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RbConfig::CONFIG['arch']).nil?
4
+
5
+ puts 'detected windows'
6
+ true
7
+ end
8
+
9
+ def self.mac_arm?
10
+ return unless !(/darwin/ =~ RbConfig::CONFIG['arch']).nil? && !(/arm64/ =~ RbConfig::CONFIG['arch']).nil?
11
+
12
+ puts 'detected macos arm'
13
+ true
14
+ end
15
+
16
+ def self.mac?
17
+ return unless !(/darwin/ =~ RbConfig::CONFIG['arch']).nil? && !(/x86_64/ =~ RbConfig::CONFIG['arch']).nil?
18
+
19
+ puts 'detected macos'
20
+ true
21
+ end
22
+
23
+ def self.linux_arm?
24
+ return unless !(/linux/ =~ RbConfig::CONFIG['arch']).nil? && !(/aarch64/ =~ RbConfig::CONFIG['arch']).nil?
25
+
26
+ puts 'detected linux aarch64'
27
+ true
28
+ end
29
+
30
+ def self.linux?
31
+ return unless !(/linux/ =~ RbConfig::CONFIG['arch']).nil? && !(/x86_64/ =~ RbConfig::CONFIG['arch']).nil?
32
+
33
+ puts 'detected linux'
34
+ true
35
+ end
36
+
37
+ def self.debug?
38
+ return if ENV['DEBUG_TARGET'].nil?
39
+
40
+ puts 'detected debug target' + ENV['DEBUG_TARGET']
41
+ true
42
+ end
43
+
44
+ def self.get_bin_path
45
+ if debug?
46
+ ENV['DEBUG_TARGET'].to_s
47
+ elsif windows?
48
+ File.join(__dir__, '../../ffi/windows-x64/pact_ffi.dll')
49
+ elsif mac_arm?
50
+ File.join(__dir__, '../../ffi/macos-arm64/libpact_ffi.dylib')
51
+ elsif mac?
52
+ File.join(__dir__, '../../ffi/macos-x64/libpact_ffi.dylib')
53
+ elsif linux_arm?
54
+ File.join(__dir__, '../../ffi/linux-arm64/libpact_ffi.so')
55
+ elsif linux?
56
+ File.join(__dir__, '../../ffi/linux-x64/libpact_ffi.so')
57
+ else
58
+ raise "Detected #{RbConfig::CONFIG['arch']}-- I have no idea what to do with that."
59
+ end
60
+ end
61
+
62
+ def self.get_os
63
+ if windows?
64
+ 'win'
65
+ elsif mac_arm?
66
+ 'macos-arm64'
67
+ elsif mac?
68
+ 'linux-x8664'
69
+ elsif linux_arm?
70
+ 'linux-aarch64'
71
+ elsif linux?
72
+ 'linux-x8664'
73
+ else
74
+ raise "Detected #{RbConfig::CONFIG['arch']}-- I have no idea what to do with that."
75
+ end
76
+ end
77
+ end
78
+
79
+ puts DetectOS.get_bin_path
data/lib/pact/ffi.rb ADDED
@@ -0,0 +1,374 @@
1
+ # require 'pact-ffi/version'
2
+ require 'ffi'
3
+ require 'pact/detect_os'
4
+
5
+ module PactFfi
6
+ extend FFI::Library
7
+ ffi_lib DetectOS.get_bin_path
8
+
9
+ # at least neccessary on x64-mingw-ucrt as uint32_type is undefined
10
+ # also neccessary on linux aarch64 it seems
11
+ DetectOS.windows? || DetectOS.linux_arm? ? (typedef :uint32, :uint32_type) : (typedef :uint32_t, :uint32_type)
12
+
13
+ FfiSpecificationVersion = Hash[
14
+ 'SPECIFICATION_VERSION_UNKNOWN' => 0,
15
+ 'SPECIFICATION_VERSION_V1' => 1,
16
+ 'SPECIFICATION_VERSION_V1_1' => 2,
17
+ 'SPECIFICATION_VERSION_V2' => 3,
18
+ 'SPECIFICATION_VERSION_V3' => 4,
19
+ 'SPECIFICATION_VERSION_V4' => 5,
20
+ ]
21
+ FfiWritePactResponse = Hash[
22
+ 'SUCCESS' => 0,
23
+ 'GENERAL_PANIC' => 1,
24
+ 'UNABLE_TO_WRITE_PACT_FILE' => 2,
25
+ 'MOCK_SERVER_NOT_FOUND' => 3,
26
+ ]
27
+ FfiWriteMessagePactResponse = Hash[
28
+ 'SUCCESS' => 0,
29
+ 'UNABLE_TO_WRITE_PACT_FILE' => 1,
30
+ 'MESSAGE_HANDLE_INVALID' => 2,
31
+ 'MOCK_SERVER_NOT_FOUND' => 3,
32
+ ]
33
+ FfiConfigurePluginResponse = Hash[
34
+ 'SUCCESS' => 0,
35
+ 'GENERAL_PANIC' => 1,
36
+ 'FAILED_TO_LOAD_PLUGIN' => 2,
37
+ 'PACT_HANDLE_INVALID' => 3,
38
+ ]
39
+ FfiPluginInteractionResponse = Hash[
40
+ 'SUCCESS' => 0,
41
+ 'A_GENERAL_PANIC_WAS_CAUGHT' => 1,
42
+ 'MOCK_SERVER_HAS_ALREADY_BEEN_STARTED' => 2,
43
+ 'INTERACTION_HANDLE_IS_INVALID' => 3,
44
+ 'CONTENT_TYPE_IS_NOT_VALID' => 4,
45
+ 'CONTENTS_JSON_IS_NOT_VALID_JSON' => 5,
46
+ 'PLUGIN_RETURNED_AN_ERROR' => 6,
47
+ ]
48
+ FfiInteractionPart = Hash[
49
+ 'INTERACTION_PART_REQUEST' => 0,
50
+ 'INTERACTION_PART_RESPONSE' => 1,
51
+ ]
52
+ # /*
53
+ # -1 A null pointer was received
54
+ # -2 The pact JSON could not be parsed
55
+ # -3 The mock server could not be started
56
+ # -4 The method panicked
57
+ # -5 The address is not valid
58
+ # -6 Could not create the TLS configuration with the self-signed certificate
59
+ # */
60
+ FfiPluginCreateMockServerErrors = Hash[
61
+ 'NULL_POINTER' => -1,
62
+ 'JSON_PARSE_ERROR' => -2,
63
+ 'MOCK_SERVER_START_FAIL' => -3,
64
+ 'CORE_PANIC' => -4,
65
+ 'ADDRESS_NOT_VALID' => -5,
66
+ 'TLS_CONFIG' => -6,
67
+ ]
68
+ # /*
69
+ # * | Error | Description |
70
+ # * |-------|-------------|
71
+ # * | 1 | The verification process failed, see output for errors |
72
+ # * | 2 | A null pointer was received |
73
+ # * | 3 | The method panicked |
74
+ # * | 4 | Invalid arguments were provided to the verification process |
75
+ # */
76
+ FfiVerifyProviderResponse = Hash[
77
+ 'VERIFICATION_SUCCESSFUL' => 0,
78
+ 'VERIFICATION_FAILED' => 1,
79
+ 'NULL_POINTER_RECEIVED' => 2,
80
+ 'METHOD_PANICKED' => 3,
81
+ 'INVALID_ARGUMENTS' => 4,
82
+ ]
83
+
84
+ FfiPluginFunctionResult = Hash[
85
+ 'RESULT_OK' => 0,
86
+ 'RESULT_FAILED' => 1,
87
+ ]
88
+
89
+ FfiLogLevelFilter = Hash[
90
+ 'LOG_LEVEL_OFF' => 0,
91
+ 'LOG_LEVEL_ERROR' => 1,
92
+ 'LOG_LEVEL_WARN' => 2,
93
+ 'LOG_LEVEL_INFO' => 3,
94
+ 'LOG_LEVEL_DEBUG' => 4,
95
+ 'LOG_LEVEL_TRACE' => 5
96
+ ]
97
+ FfiLogLevel = Hash[
98
+ 'LOG_LEVEL_OFF' => 'OFF',
99
+ 'LOG_LEVEL_ERROR' => 'ERROR',
100
+ 'LOG_LEVEL_WARN' => 'WARN',
101
+ 'LOG_LEVEL_INFO' => 'INFO',
102
+ 'LOG_LEVEL_DEBUG' => 'DEBUG',
103
+ 'LOG_LEVEL_TRACE' => 'TRACE'
104
+ ]
105
+
106
+ # These bork on windows not sure they they are added in
107
+ # as part of deno-bindgen, maybe the include headers
108
+ # attach_function :malloc, %i[size_t], :pointer
109
+ # attach_function :calloc, %i[size_t size_t], :pointer
110
+ # attach_function :realloc, %i[pointer size_t], :pointer
111
+ # attach_function :free, %i[pointer], :void
112
+ # attach_function :posix_memalign, %i[pointer size_t size_t], :int32
113
+ # attach_function :abort, %i[], :void
114
+ # attach_function :getenv, %i[string], :string
115
+ # attach_function :realpath, %i[string string], :string
116
+
117
+ attach_function :pactffi_version, %i[], :string
118
+ attach_function :pactffi_init, %i[string], :void
119
+ attach_function :pactffi_init_with_log_level, %i[string], :void
120
+ attach_function :pactffi_enable_ansi_support, %i[], :void
121
+ attach_function :pactffi_log_message, %i[string string string], :void
122
+ attach_function :pactffi_match_message, %i[pointer pointer], :pointer
123
+ attach_function :pactffi_mismatches_get_iter, %i[pointer], :pointer
124
+ attach_function :pactffi_mismatches_delete, %i[pointer], :void
125
+ attach_function :pactffi_mismatches_iter_next, %i[pointer], :pointer
126
+ attach_function :pactffi_mismatches_iter_delete, %i[pointer], :void
127
+ attach_function :pactffi_mismatch_to_json, %i[pointer], :string
128
+ attach_function :pactffi_mismatch_type, %i[pointer], :string
129
+ attach_function :pactffi_mismatch_summary, %i[pointer], :string
130
+ attach_function :pactffi_mismatch_description, %i[pointer], :string
131
+ attach_function :pactffi_mismatch_ansi_description, %i[pointer], :string
132
+ attach_function :pactffi_get_error_message, %i[string int32], :int32
133
+ attach_function :pactffi_log_to_stdout, %i[int32], :int32
134
+ attach_function :pactffi_log_to_stderr, %i[int32], :int32
135
+ attach_function :pactffi_log_to_file, %i[string int32], :int32
136
+ attach_function :pactffi_log_to_buffer, %i[int32], :int32
137
+ attach_function :pactffi_logger_init, %i[], :void
138
+ attach_function :pactffi_logger_attach_sink, %i[string int32], :int32
139
+ attach_function :pactffi_logger_apply, %i[], :int32
140
+ attach_function :pactffi_fetch_log_buffer, %i[string], :string
141
+ attach_function :pactffi_parse_pact_json, %i[string], :pointer
142
+ attach_function :pactffi_pact_model_delete, %i[pointer], :void
143
+ attach_function :pactffi_pact_model_interaction_iterator, %i[pointer], :pointer
144
+ attach_function :pactffi_pact_spec_version, %i[pointer], :int32
145
+ attach_function :pactffi_pact_interaction_delete, %i[pointer], :void
146
+ attach_function :pactffi_async_message_new, %i[], :pointer
147
+ attach_function :pactffi_async_message_delete, %i[pointer], :void
148
+ attach_function :pactffi_async_message_get_contents, %i[pointer], :pointer
149
+ attach_function :pactffi_async_message_get_contents_str, %i[pointer], :string
150
+ attach_function :pactffi_async_message_set_contents_str, %i[pointer string string], :void
151
+ attach_function :pactffi_async_message_get_contents_length, %i[pointer], :size_t
152
+ attach_function :pactffi_async_message_get_contents_bin, %i[pointer], :pointer
153
+ attach_function :pactffi_async_message_set_contents_bin, %i[pointer pointer size_t string], :void
154
+ attach_function :pactffi_async_message_get_description, %i[pointer], :string
155
+ attach_function :pactffi_async_message_set_description, %i[pointer string], :int32
156
+ attach_function :pactffi_async_message_get_provider_state, %i[pointer uint32_type], :pointer
157
+ attach_function :pactffi_async_message_get_provider_state_iter, %i[pointer], :pointer
158
+ attach_function :pactffi_consumer_get_name, %i[pointer], :string
159
+ attach_function :pactffi_pact_get_consumer, %i[pointer], :pointer
160
+ attach_function :pactffi_pact_consumer_delete, %i[pointer], :void
161
+ attach_function :pactffi_message_contents_get_contents_str, %i[pointer], :string
162
+ attach_function :pactffi_message_contents_set_contents_str, %i[pointer string string], :void
163
+ attach_function :pactffi_message_contents_get_contents_length, %i[pointer], :size_t
164
+ attach_function :pactffi_message_contents_get_contents_bin, %i[pointer], :pointer
165
+ attach_function :pactffi_message_contents_set_contents_bin, %i[pointer pointer size_t string], :void
166
+ attach_function :pactffi_message_contents_get_metadata_iter, %i[pointer], :pointer
167
+ attach_function :pactffi_message_contents_get_matching_rule_iter, %i[pointer int32], :pointer
168
+ attach_function :pactffi_request_contents_get_matching_rule_iter, %i[pointer int32], :pointer
169
+ attach_function :pactffi_response_contents_get_matching_rule_iter, %i[pointer int32], :pointer
170
+ attach_function :pactffi_message_contents_get_generators_iter, %i[pointer int32], :pointer
171
+ attach_function :pactffi_request_contents_get_generators_iter, %i[pointer int32], :pointer
172
+ attach_function :pactffi_response_contents_get_generators_iter, %i[pointer int32], :pointer
173
+ attach_function :pactffi_parse_matcher_definition, %i[string], :pointer
174
+ attach_function :pactffi_matcher_definition_error, %i[pointer], :string
175
+ attach_function :pactffi_matcher_definition_value, %i[pointer], :string
176
+ attach_function :pactffi_matcher_definition_delete, %i[pointer], :void
177
+ attach_function :pactffi_matcher_definition_generator, %i[pointer], :pointer
178
+ attach_function :pactffi_matcher_definition_value_type, %i[pointer], :int32
179
+ attach_function :pactffi_matching_rule_iter_delete, %i[pointer], :void
180
+ attach_function :pactffi_matcher_definition_iter, %i[pointer], :pointer
181
+ attach_function :pactffi_matching_rule_iter_next, %i[pointer], :pointer
182
+ attach_function :pactffi_matching_rule_id, %i[pointer], :uint16
183
+ attach_function :pactffi_matching_rule_value, %i[pointer], :string
184
+ attach_function :pactffi_matching_rule_pointer, %i[pointer], :pointer
185
+ attach_function :pactffi_matching_rule_reference_name, %i[pointer], :string
186
+ attach_function :pactffi_validate_datetime, %i[string string], :int32
187
+ attach_function :pactffi_generator_to_json, %i[pointer], :string
188
+ attach_function :pactffi_generator_generate_string, %i[pointer string], :string
189
+ attach_function :pactffi_generator_generate_integer, %i[pointer string], :uint16
190
+ attach_function :pactffi_generators_iter_delete, %i[pointer], :void
191
+ attach_function :pactffi_generators_iter_next, %i[pointer], :pointer
192
+ attach_function :pactffi_generators_iter_pair_delete, %i[pointer], :void
193
+ attach_function :pactffi_sync_http_new, %i[], :pointer
194
+ attach_function :pactffi_sync_http_delete, %i[pointer], :void
195
+ attach_function :pactffi_sync_http_get_request, %i[pointer], :pointer
196
+ attach_function :pactffi_sync_http_get_request_contents, %i[pointer], :string
197
+ attach_function :pactffi_sync_http_set_request_contents, %i[pointer string string], :void
198
+ attach_function :pactffi_sync_http_get_request_contents_length, %i[pointer], :size_t
199
+ attach_function :pactffi_sync_http_get_request_contents_bin, %i[pointer], :pointer
200
+ attach_function :pactffi_sync_http_set_request_contents_bin, %i[pointer pointer size_t string], :void
201
+ attach_function :pactffi_sync_http_get_response, %i[pointer], :pointer
202
+ attach_function :pactffi_sync_http_get_response_contents, %i[pointer], :string
203
+ attach_function :pactffi_sync_http_set_response_contents, %i[pointer string string], :void
204
+ attach_function :pactffi_sync_http_get_response_contents_length, %i[pointer], :size_t
205
+ attach_function :pactffi_sync_http_get_response_contents_bin, %i[pointer], :pointer
206
+ attach_function :pactffi_sync_http_set_response_contents_bin, %i[pointer pointer size_t string], :void
207
+ attach_function :pactffi_sync_http_get_description, %i[pointer], :string
208
+ attach_function :pactffi_sync_http_set_description, %i[pointer string], :int32
209
+ attach_function :pactffi_sync_http_get_provider_state, %i[pointer uint32_type], :pointer
210
+ attach_function :pactffi_sync_http_get_provider_state_iter, %i[pointer], :pointer
211
+ attach_function :pactffi_pact_interaction_as_synchronous_http, %i[pointer], :pointer
212
+ attach_function :pactffi_pact_interaction_as_message, %i[pointer], :pointer
213
+ attach_function :pactffi_pact_interaction_as_asynchronous_message, %i[pointer], :pointer
214
+ attach_function :pactffi_pact_interaction_as_synchronous_message, %i[pointer], :pointer
215
+ attach_function :pactffi_pact_message_iter_delete, %i[pointer], :void
216
+ attach_function :pactffi_pact_message_iter_next, %i[pointer], :pointer
217
+ attach_function :pactffi_pact_sync_message_iter_next, %i[pointer], :pointer
218
+ attach_function :pactffi_pact_sync_message_iter_delete, %i[pointer], :void
219
+ attach_function :pactffi_pact_sync_http_iter_next, %i[pointer], :pointer
220
+ attach_function :pactffi_pact_sync_http_iter_delete, %i[pointer], :void
221
+ attach_function :pactffi_pact_interaction_iter_next, %i[pointer], :pointer
222
+ attach_function :pactffi_pact_interaction_iter_delete, %i[pointer], :void
223
+ attach_function :pactffi_matching_rule_to_json, %i[pointer], :string
224
+ attach_function :pactffi_matching_rules_iter_delete, %i[pointer], :void
225
+ attach_function :pactffi_matching_rules_iter_next, %i[pointer], :pointer
226
+ attach_function :pactffi_matching_rules_iter_pair_delete, %i[pointer], :void
227
+ attach_function :pactffi_message_new, %i[], :pointer
228
+ attach_function :pactffi_message_new_from_json, %i[uint32_type string int32], :pointer
229
+ attach_function :pactffi_message_new_from_body, %i[string string], :pointer
230
+ attach_function :pactffi_message_delete, %i[pointer], :void
231
+ attach_function :pactffi_message_get_contents, %i[pointer], :string
232
+ attach_function :pactffi_message_set_contents, %i[pointer string string], :void
233
+ attach_function :pactffi_message_get_contents_length, %i[pointer], :size_t
234
+ attach_function :pactffi_message_get_contents_bin, %i[pointer], :pointer
235
+ attach_function :pactffi_message_set_contents_bin, %i[pointer pointer size_t string], :void
236
+ attach_function :pactffi_message_get_description, %i[pointer], :string
237
+ attach_function :pactffi_message_set_description, %i[pointer string], :int32
238
+ attach_function :pactffi_message_get_provider_state, %i[pointer uint32_type], :pointer
239
+ attach_function :pactffi_message_get_provider_state_iter, %i[pointer], :pointer
240
+ attach_function :pactffi_provider_state_iter_next, %i[pointer], :pointer
241
+ attach_function :pactffi_provider_state_iter_delete, %i[pointer], :void
242
+ attach_function :pactffi_message_find_metadata, %i[pointer string], :string
243
+ attach_function :pactffi_message_insert_metadata, %i[pointer string string], :int32
244
+ attach_function :pactffi_message_metadata_iter_next, %i[pointer], :pointer
245
+ attach_function :pactffi_message_get_metadata_iter, %i[pointer], :pointer
246
+ attach_function :pactffi_message_metadata_iter_delete, %i[pointer], :void
247
+ attach_function :pactffi_message_metadata_pair_delete, %i[pointer], :void
248
+ attach_function :pactffi_message_pact_new_from_json, %i[string string], :pointer
249
+ attach_function :pactffi_message_pact_delete, %i[pointer], :void
250
+ attach_function :pactffi_message_pact_get_consumer, %i[pointer], :pointer
251
+ attach_function :pactffi_message_pact_get_provider, %i[pointer], :pointer
252
+ attach_function :pactffi_message_pact_get_message_iter, %i[pointer], :pointer
253
+ attach_function :pactffi_message_pact_message_iter_next, %i[pointer], :pointer
254
+ attach_function :pactffi_message_pact_message_iter_delete, %i[pointer], :void
255
+ attach_function :pactffi_message_pact_find_metadata, %i[pointer string string], :string
256
+ attach_function :pactffi_message_pact_get_metadata_iter, %i[pointer], :pointer
257
+ attach_function :pactffi_message_pact_metadata_iter_next, %i[pointer], :pointer
258
+ attach_function :pactffi_message_pact_metadata_iter_delete, %i[pointer], :void
259
+ attach_function :pactffi_message_pact_metadata_triple_delete, %i[pointer], :void
260
+ attach_function :pactffi_provider_get_name, %i[pointer], :string
261
+ attach_function :pactffi_pact_get_provider, %i[pointer], :pointer
262
+ attach_function :pactffi_pact_provider_delete, %i[pointer], :void
263
+ attach_function :pactffi_provider_state_get_name, %i[pointer], :string
264
+ attach_function :pactffi_provider_state_get_param_iter, %i[pointer], :pointer
265
+ attach_function :pactffi_provider_state_param_iter_next, %i[pointer], :pointer
266
+ attach_function :pactffi_provider_state_delete, %i[pointer], :void
267
+ attach_function :pactffi_provider_state_param_iter_delete, %i[pointer], :void
268
+ attach_function :pactffi_provider_state_param_pair_delete, %i[pointer], :void
269
+ attach_function :pactffi_sync_message_new, %i[], :pointer
270
+ attach_function :pactffi_sync_message_delete, %i[pointer], :void
271
+ attach_function :pactffi_sync_message_get_request_contents_str, %i[pointer], :string
272
+ attach_function :pactffi_sync_message_set_request_contents_str, %i[pointer string string], :void
273
+ attach_function :pactffi_sync_message_get_request_contents_length, %i[pointer], :size_t
274
+ attach_function :pactffi_sync_message_get_request_contents_bin, %i[pointer], :pointer
275
+ attach_function :pactffi_sync_message_set_request_contents_bin, %i[pointer pointer size_t string], :void
276
+ attach_function :pactffi_sync_message_get_request_contents, %i[pointer], :pointer
277
+ attach_function :pactffi_sync_message_get_number_responses, %i[pointer], :size_t
278
+ attach_function :pactffi_sync_message_get_response_contents_str, %i[pointer size_t], :string
279
+ attach_function :pactffi_sync_message_set_response_contents_str, %i[pointer size_t string string], :void
280
+ attach_function :pactffi_sync_message_get_response_contents_length, %i[pointer size_t], :size_t
281
+ attach_function :pactffi_sync_message_get_response_contents_bin, %i[pointer size_t], :pointer
282
+ attach_function :pactffi_sync_message_set_response_contents_bin, %i[pointer size_t pointer size_t string], :void
283
+ attach_function :pactffi_sync_message_get_response_contents, %i[pointer size_t], :pointer
284
+ attach_function :pactffi_sync_message_get_description, %i[pointer], :string
285
+ attach_function :pactffi_sync_message_set_description, %i[pointer string], :int32
286
+ attach_function :pactffi_sync_message_get_provider_state, %i[pointer uint32_type], :pointer
287
+ attach_function :pactffi_sync_message_get_provider_state_iter, %i[pointer], :pointer
288
+ attach_function :pactffi_string_delete, %i[string], :void
289
+ attach_function :pactffi_create_mock_server, %i[string string bool], :int32
290
+ attach_function :pactffi_get_tls_ca_certificate, %i[], :string
291
+ attach_function :pactffi_create_mock_server_for_pact, %i[uint16 string bool], :int32
292
+ attach_function :pactffi_create_mock_server_for_transport, %i[uint16 string uint16 string string], :int32
293
+ attach_function :pactffi_mock_server_matched, %i[int32], :bool
294
+ attach_function :pactffi_mock_server_mismatches, %i[int32], :string
295
+ attach_function :pactffi_cleanup_mock_server, %i[int32], :bool
296
+ attach_function :pactffi_write_pact_file, %i[int32 string bool], :int32
297
+ attach_function :pactffi_mock_server_logs, %i[int32], :string
298
+ attach_function :pactffi_generate_datetime_string, %i[string], :pointer
299
+ attach_function :pactffi_check_regex, %i[string string], :bool
300
+ attach_function :pactffi_generate_regex_value, %i[string], :pointer
301
+ attach_function :pactffi_free_string, %i[string], :void
302
+ attach_function :pactffi_new_pact, %i[string string], :uint16
303
+ attach_function :pactffi_new_interaction, %i[uint16 string], :uint32_type
304
+ attach_function :pactffi_new_message_interaction, %i[uint16 string], :uint32_type
305
+ attach_function :pactffi_new_sync_message_interaction, %i[uint16 string], :uint32_type
306
+ attach_function :pactffi_upon_receiving, %i[uint32_type string], :bool
307
+ attach_function :pactffi_given, %i[uint32_type string], :bool
308
+ attach_function :pactffi_interaction_test_name, %i[uint32_type string], :uint32_type
309
+ attach_function :pactffi_given_with_param, %i[uint32_type string string string], :bool
310
+ attach_function :pactffi_with_request, %i[uint32_type string string], :bool
311
+ attach_function :pactffi_with_query_parameter, %i[uint32_type string size_t string], :bool
312
+ attach_function :pactffi_with_query_parameter_v2, %i[uint32_type string size_t string], :bool
313
+ attach_function :pactffi_with_specification, %i[uint16 int32], :bool
314
+ attach_function :pactffi_with_pact_metadata, %i[uint16 string string string], :bool
315
+ attach_function :pactffi_with_header, %i[uint32_type int32 string size_t string], :bool
316
+ attach_function :pactffi_with_header_v2, %i[uint32_type int32 string size_t string], :bool
317
+ attach_function :pactffi_response_status, %i[uint32_type uint16], :bool
318
+ attach_function :pactffi_with_body, %i[uint32_type int32 string string], :bool
319
+ attach_function :pactffi_with_binary_file, %i[uint32_type int32 string pointer size_t], :bool
320
+ attach_function :pactffi_with_multipart_file, %i[uint32_type int32 string string string], :pointer
321
+ attach_function :pactffi_pact_handle_get_message_iter, %i[uint16], :pointer
322
+ attach_function :pactffi_pact_handle_get_sync_message_iter, %i[uint16], :pointer
323
+ attach_function :pactffi_pact_handle_get_sync_http_iter, %i[uint16], :pointer
324
+ attach_function :pactffi_new_message_pact, %i[string string], :uint16
325
+ attach_function :pactffi_new_message, %i[uint16 string], :uint32_type
326
+ attach_function :pactffi_message_expects_to_receive, %i[uint32_type string], :void
327
+ attach_function :pactffi_message_given, %i[uint32_type string], :void
328
+ attach_function :pactffi_message_given_with_param, %i[uint32_type string string string], :void
329
+ attach_function :pactffi_message_with_contents, %i[uint32_type string pointer size_t], :void
330
+ attach_function :pactffi_message_with_metadata, %i[uint32_type string string], :void
331
+ attach_function :pactffi_message_reify, %i[uint32_type], :string
332
+ attach_function :pactffi_write_message_pact_file, %i[uint16 string bool], :int32
333
+ attach_function :pactffi_with_message_pact_metadata, %i[uint16 string string string], :void
334
+ attach_function :pactffi_pact_handle_write_file, %i[uint16 string bool], :int32
335
+ attach_function :pactffi_new_async_message, %i[uint16 string], :uint32_type
336
+ attach_function :pactffi_free_pact_handle, %i[uint16], :uint32_type
337
+ attach_function :pactffi_free_message_pact_handle, %i[uint16], :uint32_type
338
+ attach_function :pactffi_verify, %i[string], :int32
339
+ attach_function :pactffi_verifier_new, %i[], :pointer
340
+ attach_function :pactffi_verifier_new_for_application, %i[string string], :pointer
341
+ attach_function :pactffi_verifier_shutdown, %i[pointer], :void
342
+ attach_function :pactffi_verifier_set_provider_info, %i[pointer string string string uint16 string], :void
343
+ attach_function :pactffi_verifier_add_provider_transport, %i[pointer string uint16 string string], :void
344
+ attach_function :pactffi_verifier_set_filter_info, %i[pointer string string uint8], :void
345
+ attach_function :pactffi_verifier_set_provider_state, %i[pointer string uint8 uint8], :void
346
+ attach_function :pactffi_verifier_set_verification_options, %i[pointer uint8 ulong_long], :int32
347
+ attach_function :pactffi_verifier_set_coloured_output, %i[pointer uint8], :int32
348
+ attach_function :pactffi_verifier_set_no_pacts_is_error, %i[pointer uint8], :int32
349
+ attach_function :pactffi_verifier_set_publish_options, %i[pointer string string pointer uint16 string], :int32
350
+ attach_function :pactffi_verifier_set_consumer_filters, %i[pointer pointer uint16], :void
351
+ attach_function :pactffi_verifier_add_custom_header, %i[pointer string string], :void
352
+ attach_function :pactffi_verifier_add_file_source, %i[pointer string], :void
353
+ attach_function :pactffi_verifier_add_directory_source, %i[pointer string], :void
354
+ attach_function :pactffi_verifier_url_source, %i[pointer string string string string], :void
355
+ attach_function :pactffi_verifier_broker_source, %i[pointer string string string string], :void
356
+ attach_function :pactffi_verifier_broker_source_with_selectors,
357
+ %i[pointer string string string string uint8 string pointer uint16 string pointer uint16 pointer uint16], :void
358
+ attach_function :pactffi_verifier_execute, %i[pointer], :int32
359
+ attach_function :pactffi_verifier_cli_args, %i[], :string
360
+ attach_function :pactffi_verifier_logs, %i[pointer], :string
361
+ attach_function :pactffi_verifier_logs_for_provider, %i[string], :string
362
+ attach_function :pactffi_verifier_output, %i[pointer uint8], :string
363
+ attach_function :pactffi_verifier_json, %i[pointer], :string
364
+ attach_function :pactffi_using_plugin, %i[uint16 string string], :uint32_type
365
+ attach_function :pactffi_cleanup_plugins, %i[uint16], :void
366
+ attach_function :pactffi_interaction_contents, %i[uint32_type int32 string string], :uint32_type
367
+ attach_function :pactffi_matches_string_value, %i[pointer string string uint8], :string
368
+ attach_function :pactffi_matches_u64_value, %i[pointer ulong_long ulong_long uint8], :string
369
+ attach_function :pactffi_matches_i64_value, %i[pointer int64 int64 uint8], :string
370
+ attach_function :pactffi_matches_f64_value, %i[pointer double double uint8], :string
371
+ attach_function :pactffi_matches_bool_value, %i[pointer uint8 uint8 uint8], :string
372
+ attach_function :pactffi_matches_binary_value, %i[pointer pointer ulong_long pointer ulong_long uint8], :string
373
+ attach_function :pactffi_matches_json_value, %i[pointer string string uint8], :string
374
+ end