• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pact-foundation / pact-go / 10729921438

05 Sep 2024 11:54PM UTC coverage: 31.765% (+2.5%) from 29.294%
10729921438

Pull #455

github

YOU54F
chore: fix golint errors / remove ci lib.go exclusion
Pull Request #455: Feat/purego

398 of 442 new or added lines in 5 files covered. (90.05%)

2 existing lines in 2 files now uncovered.

2045 of 6438 relevant lines covered (31.76%)

16.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

97.58
/internal/native/lib.go
1
// Package native contains the c bindings into the Pact Reference types.
2
package native
3

4
import (
5
        "fmt"
6
        "os"
7
        "path/filepath"
8
        "runtime"
9
        "unsafe"
10

11
        "github.com/ebitengine/purego"
12
)
13

14
func getSystemLibrary() string {
12✔
15
        switch runtime.GOOS {
12✔
16
        case "darwin":
8✔
17
                return "libpact_ffi.dylib"
8✔
18
        case "linux":
4✔
19
                return "libpact_ffi.so"
4✔
NEW
20
        case "windows":
×
NEW
21
                return "pact_ffi.dll"
×
NEW
22
        default:
×
NEW
23
                panic(fmt.Errorf("GOOS=%s is not supported", runtime.GOOS))
×
24
        }
25
}
26

27
type (
28
        size_t uintptr
29
)
30

31
var pactffi_version func() string
32
var pactffi_init func(string)
33
var pactffi_init_with_log_level func(string)
34
var pactffi_enable_ansi_support func()
35
var pactffi_log_message func(string, string, string)
36
var pactffi_match_message func(uintptr, uintptr) uintptr
37
var pactffi_mismatches_get_iter func(uintptr) uintptr
38
var pactffi_mismatches_delete func(uintptr)
39
var pactffi_mismatches_iter_next func(uintptr) uintptr
40
var pactffi_mismatches_iter_delete func(uintptr)
41
var pactffi_mismatch_to_json func(uintptr) string
42
var pactffi_mismatch_type func(uintptr) string
43
var pactffi_mismatch_summary func(uintptr) string
44
var pactffi_mismatch_description func(uintptr) string
45
var pactffi_mismatch_ansi_description func(uintptr) string
46
var pactffi_get_error_message func(string, int32) int32
47
var pactffi_log_to_stdout func(int32) int32
48
var pactffi_log_to_stderr func(int32) int32
49
var pactffi_log_to_file func(string, int32) int32
50
var pactffi_log_to_buffer func(int32) int32
51
var pactffi_logger_init func()
52
var pactffi_logger_attach_sink func(string, int32) int32
53
var pactffi_logger_apply func() int32
54
var pactffi_fetch_log_buffer func(string) string
55
var pactffi_parse_pact_json func(string) uintptr
56
var pactffi_pact_model_delete func(uintptr)
57
var pactffi_pact_model_interaction_iterator func(uintptr) uintptr
58
var pactffi_pact_spec_version func(uintptr) int32
59
var pactffi_pact_interaction_delete func(uintptr)
60
var pactffi_async_message_new func() uintptr
61
var pactffi_async_message_delete func(uintptr)
62
var pactffi_async_message_get_contents func(uintptr) uintptr
63
var pactffi_async_message_get_contents_str func(uintptr) string
64
var pactffi_async_message_set_contents_str func(uintptr, string, string)
65
var pactffi_async_message_get_contents_length func(uintptr) size_t
66
var pactffi_async_message_get_contents_bin func(uintptr) uintptr
67
var pactffi_async_message_set_contents_bin func(uintptr, uintptr, size_t, string)
68
var pactffi_async_message_get_description func(uintptr) string
69
var pactffi_async_message_set_description func(uintptr, string) int32
70
var pactffi_async_message_get_provider_state func(uintptr, uint32) uintptr
71
var pactffi_async_message_get_provider_state_iter func(uintptr) uintptr
72
var pactffi_consumer_get_name func(uintptr) string
73
var pactffi_pact_get_consumer func(uintptr) uintptr
74
var pactffi_pact_consumer_delete func(uintptr)
75
var pactffi_message_contents_get_contents_str func(uintptr) string
76
var pactffi_message_contents_set_contents_str func(uintptr, string, string)
77
var pactffi_message_contents_get_contents_length func(uintptr) size_t
78
var pactffi_message_contents_get_contents_bin func(uintptr) uintptr
79
var pactffi_message_contents_set_contents_bin func(uintptr, uintptr, size_t, string)
80
var pactffi_message_contents_get_metadata_iter func(uintptr) uintptr
81
var pactffi_message_contents_get_matching_rule_iter func(uintptr, int32) uintptr
82
var pactffi_request_contents_get_matching_rule_iter func(uintptr, int32) uintptr
83
var pactffi_response_contents_get_matching_rule_iter func(uintptr, int32) uintptr
84
var pactffi_message_contents_get_generators_iter func(uintptr, int32) uintptr
85
var pactffi_request_contents_get_generators_iter func(uintptr, int32) uintptr
86
var pactffi_response_contents_get_generators_iter func(uintptr, int32) uintptr
87
var pactffi_parse_matcher_definition func(string) uintptr
88
var pactffi_matcher_definition_error func(uintptr) string
89
var pactffi_matcher_definition_value func(uintptr) string
90
var pactffi_matcher_definition_delete func(uintptr)
91
var pactffi_matcher_definition_generator func(uintptr) uintptr
92
var pactffi_matcher_definition_value_type func(uintptr) int32
93
var pactffi_matching_rule_iter_delete func(uintptr)
94
var pactffi_matcher_definition_iter func(uintptr) uintptr
95
var pactffi_matching_rule_iter_next func(uintptr) uintptr
96
var pactffi_matching_rule_id func(uintptr) uint16
97
var pactffi_matching_rule_value func(uintptr) string
98
var pactffi_matching_rule_pointer func(uintptr) uintptr
99
var pactffi_matching_rule_reference_name func(uintptr) string
100
var pactffi_validate_datetime func(string, string) int32
101
var pactffi_generator_to_json func(uintptr) string
102
var pactffi_generator_generate_string func(uintptr, string) string
103
var pactffi_generator_generate_integer func(uintptr, string) uint16
104
var pactffi_generators_iter_delete func(uintptr)
105
var pactffi_generators_iter_next func(uintptr) uintptr
106
var pactffi_generators_iter_pair_delete func(uintptr)
107
var pactffi_sync_http_new func() uintptr
108
var pactffi_sync_http_delete func(uintptr)
109
var pactffi_sync_http_get_request func(uintptr) uintptr
110
var pactffi_sync_http_get_request_contents func(uintptr) string
111
var pactffi_sync_http_set_request_contents func(uintptr, string, string)
112
var pactffi_sync_http_get_request_contents_length func(uintptr) size_t
113
var pactffi_sync_http_get_request_contents_bin func(uintptr) uintptr
114
var pactffi_sync_http_set_request_contents_bin func(uintptr, uintptr, size_t, string)
115
var pactffi_sync_http_get_response func(uintptr) uintptr
116
var pactffi_sync_http_get_response_contents func(uintptr) string
117
var pactffi_sync_http_set_response_contents func(uintptr, string, string)
118
var pactffi_sync_http_get_response_contents_length func(uintptr) size_t
119
var pactffi_sync_http_get_response_contents_bin func(uintptr) uintptr
120
var pactffi_sync_http_set_response_contents_bin func(uintptr, uintptr, size_t, string)
121
var pactffi_sync_http_get_description func(uintptr) string
122
var pactffi_sync_http_set_description func(uintptr, string) int32
123
var pactffi_sync_http_get_provider_state func(uintptr, uint32) uintptr
124
var pactffi_sync_http_get_provider_state_iter func(uintptr) uintptr
125
var pactffi_pact_interaction_as_synchronous_http func(uintptr) uintptr
126
var pactffi_pact_interaction_as_message func(uintptr) uintptr
127
var pactffi_pact_interaction_as_asynchronous_message func(uintptr) uintptr
128
var pactffi_pact_interaction_as_synchronous_message func(uintptr) uintptr
129
var pactffi_pact_message_iter_delete func(uintptr)
130
var pactffi_pact_message_iter_next func(uintptr) uintptr
131
var pactffi_pact_sync_message_iter_next func(uintptr) uintptr
132
var pactffi_pact_sync_message_iter_delete func(uintptr)
133
var pactffi_pact_sync_http_iter_next func(uintptr) uintptr
134
var pactffi_pact_sync_http_iter_delete func(uintptr)
135
var pactffi_pact_interaction_iter_next func(uintptr) uintptr
136
var pactffi_pact_interaction_iter_delete func(uintptr)
137
var pactffi_matching_rule_to_json func(uintptr) string
138
var pactffi_matching_rules_iter_delete func(uintptr)
139
var pactffi_matching_rules_iter_next func(uintptr) uintptr
140
var pactffi_matching_rules_iter_pair_delete func(uintptr)
141
var pactffi_message_new func() uintptr
142
var pactffi_message_new_from_json func(uint32, string, int32) uintptr
143
var pactffi_message_new_from_body func(string, string) uintptr
144
var pactffi_message_delete func(uintptr)
145
var pactffi_message_get_contents func(uintptr) string
146
var pactffi_message_set_contents func(uintptr, string, string)
147
var pactffi_message_get_contents_length func(uintptr) size_t
148
var pactffi_message_get_contents_bin func(uintptr) uintptr
149
var pactffi_message_set_contents_bin func(uintptr, uintptr, size_t, string)
150
var pactffi_message_get_description func(uintptr) string
151
var pactffi_message_set_description func(uintptr, string) int32
152
var pactffi_message_get_provider_state func(uintptr, uint32) uintptr
153
var pactffi_message_get_provider_state_iter func(uintptr) uintptr
154
var pactffi_provider_state_iter_next func(uintptr) uintptr
155
var pactffi_provider_state_iter_delete func(uintptr)
156
var pactffi_message_find_metadata func(uintptr, string) string
157
var pactffi_message_insert_metadata func(uintptr, string, string) int32
158
var pactffi_message_metadata_iter_next func(uintptr) uintptr
159
var pactffi_message_get_metadata_iter func(uintptr) uintptr
160
var pactffi_message_metadata_iter_delete func(uintptr)
161
var pactffi_message_metadata_pair_delete func(uintptr)
162
var pactffi_message_pact_new_from_json func(string, string) uintptr
163
var pactffi_message_pact_delete func(uintptr)
164
var pactffi_message_pact_get_consumer func(uintptr) uintptr
165
var pactffi_message_pact_get_provider func(uintptr) uintptr
166
var pactffi_message_pact_get_message_iter func(uintptr) uintptr
167
var pactffi_message_pact_message_iter_next func(uintptr) uintptr
168
var pactffi_message_pact_message_iter_delete func(uintptr)
169
var pactffi_message_pact_find_metadata func(uintptr, string, string) string
170
var pactffi_message_pact_get_metadata_iter func(uintptr) uintptr
171
var pactffi_message_pact_metadata_iter_next func(uintptr) uintptr
172
var pactffi_message_pact_metadata_iter_delete func(uintptr)
173
var pactffi_message_pact_metadata_triple_delete func(uintptr)
174
var pactffi_provider_get_name func(uintptr) string
175
var pactffi_pact_get_provider func(uintptr) uintptr
176
var pactffi_pact_provider_delete func(uintptr)
177
var pactffi_provider_state_get_name func(uintptr) string
178
var pactffi_provider_state_get_param_iter func(uintptr) uintptr
179
var pactffi_provider_state_param_iter_next func(uintptr) uintptr
180
var pactffi_provider_state_delete func(uintptr)
181
var pactffi_provider_state_param_iter_delete func(uintptr)
182
var pactffi_provider_state_param_pair_delete func(uintptr)
183
var pactffi_sync_message_new func() uintptr
184
var pactffi_sync_message_delete func(uintptr)
185
var pactffi_sync_message_get_request_contents_str func(uintptr) string
186
var pactffi_sync_message_set_request_contents_str func(uintptr, string, string)
187
var pactffi_sync_message_get_request_contents_length func(uintptr) size_t
188
var pactffi_sync_message_get_request_contents_bin func(uintptr) uintptr
189
var pactffi_sync_message_set_request_contents_bin func(uintptr, uintptr, size_t, string)
190
var pactffi_sync_message_get_request_contents func(uintptr) uintptr
191
var pactffi_sync_message_get_number_responses func(uintptr) size_t
192
var pactffi_sync_message_get_response_contents_str func(uintptr, size_t) string
193
var pactffi_sync_message_set_response_contents_str func(uintptr, size_t, string, string)
194
var pactffi_sync_message_get_response_contents_length func(uintptr, size_t) size_t
195
var pactffi_sync_message_get_response_contents_bin func(uintptr, size_t) uintptr
196
var pactffi_sync_message_set_response_contents_bin func(uintptr, size_t, uintptr, size_t, string)
197
var pactffi_sync_message_get_response_contents func(uintptr, size_t) uintptr
198
var pactffi_sync_message_get_description func(uintptr) string
199
var pactffi_sync_message_set_description func(uintptr, string) int32
200
var pactffi_sync_message_get_provider_state func(uintptr, uint32) uintptr
201
var pactffi_sync_message_get_provider_state_iter func(uintptr) uintptr
202
var pactffi_string_delete func(string)
203
var pactffi_create_mock_server func(string, string, bool) int32
204
var pactffi_get_tls_ca_certificate func() string
205
var pactffi_create_mock_server_for_pact func(uintptr, string, bool) int32
206
var pactffi_create_mock_server_for_transport func(uintptr, string, uint16, string, string) int32
207
var pactffi_mock_server_matched func(int32) bool
208
var pactffi_mock_server_mismatches func(int32) string
209
var pactffi_cleanup_mock_server func(int32) bool
210
var pactffi_write_pact_file func(int32, string, bool) int32
211
var pactffi_mock_server_logs func(int32) string
212
var pactffi_generate_datetime_string func(string) uintptr
213
var pactffi_check_regex func(string, string) bool
214
var pactffi_generate_regex_value func(string) uintptr
215
var pactffi_free_string func(uintptr)
216
var pactffi_new_pact func(string, string) uintptr
217
var pactffi_pact_handle_to_pointer func(uint16) uintptr
218
var pactffi_new_interaction func(uintptr, string) uintptr
219
var pactffi_new_message_interaction func(uintptr, string) uintptr
220
var pactffi_new_sync_message_interaction func(uintptr, string) uintptr
221
var pactffi_upon_receiving func(uintptr, string) bool
222
var pactffi_given func(uintptr, string) bool
223
var pactffi_interaction_test_name func(uint32, string) uint32
224
var pactffi_given_with_param func(uintptr, string, string, string) bool
225
var pactffi_given_with_params func(uintptr, string, string) int32
226
var pactffi_with_request func(uintptr, string, string) bool
227
var pactffi_with_query_parameter func(uintptr, string, int, string) bool
228
var pactffi_with_query_parameter_v2 func(uintptr, string, int, string) bool
229
var pactffi_with_specification func(uintptr, int32) bool
230
var pactffi_handle_get_pact_spec_version func(uint16) int32
231
var pactffi_with_pact_metadata func(uintptr, string, string, string) bool
232
var pactffi_with_header func(uintptr, int32, string, int, string) bool
233
var pactffi_with_header_v2 func(uintptr, int32, string, int, string) bool
234
var pactffi_set_header func(uint32, int32, string, string) bool
235
var pactffi_response_status func(uintptr, uint16) bool
236
var pactffi_response_status_v2 func(uintptr, string) bool
237
var pactffi_with_body func(uintptr, int32, string, string) bool
238
var pactffi_with_binary_body func(uint32, int32, string, string, size_t) bool
239
var pactffi_with_binary_file func(uintptr, int32, string, string, size_t) bool
240
var pactffi_with_matching_rules func(uint32, int32, string) bool
241
var pactffi_with_multipart_file_v2 func(uint32, int32, string, string, string, string) uintptr
242
var pactffi_with_multipart_file func(uintptr, int32, string, string, string) uintptr
243
var pactffi_pact_handle_get_message_iter func(uintptr) uintptr
244
var pactffi_pact_handle_get_sync_message_iter func(uintptr) uintptr
245
var pactffi_pact_handle_get_sync_http_iter func(uint16) uintptr
246
var pactffi_new_message_pact func(string, string) uintptr
247
var pactffi_new_message func(uint16, string) uint32
248
var pactffi_message_expects_to_receive func(uintptr, string)
249
var pactffi_message_given func(uintptr, string)
250
var pactffi_message_given_with_param func(uintptr, string, string, string)
251
var pactffi_message_with_contents func(uintptr, string, uintptr, size_t)
252
var pactffi_message_with_metadata func(uintptr, string, string)
253
var pactffi_message_with_metadata_v2 func(uint32, string, string)
254
var pactffi_message_reify func(uint32) string
255
var pactffi_write_message_pact_file func(uintptr, string, bool) int32
256
var pactffi_with_message_pact_metadata func(uintptr, string, string, string)
257
var pactffi_pact_handle_write_file func(uint16, string, bool) int32
258
var pactffi_new_async_message func(uint16, string) uint32
259
var pactffi_free_pact_handle func(uint16) uint32
260
var pactffi_free_message_pact_handle func(uint16) uint32
261
var pactffi_verify func(string) int32
262
var pactffi_verifier_new func() uintptr
263
var pactffi_verifier_new_for_application func(string, string) uintptr
264
var pactffi_verifier_shutdown func(uintptr)
265
var pactffi_verifier_set_provider_info func(uintptr, string, string, string, uint16, string)
266
var pactffi_verifier_add_provider_transport func(uintptr, string, uint16, string, string)
267
var pactffi_verifier_set_filter_info func(uintptr, string, string, uint8)
268
var pactffi_verifier_set_provider_state func(uintptr, string, uint8, uint8)
269
var pactffi_verifier_set_verification_options func(uintptr, uint8, uint64) int32
270
var pactffi_verifier_set_coloured_output func(uintptr, uint8) int32
271
var pactffi_verifier_set_no_pacts_is_error func(uintptr, uint8) int32
272
var pactffi_verifier_set_publish_options func(uintptr, string, string, []*byte, uint16, string) int32
273
var pactffi_verifier_set_consumer_filters func(uintptr, []*byte, uint16)
274
var pactffi_verifier_add_custom_header func(uintptr, string, string)
275
var pactffi_verifier_add_file_source func(uintptr, string)
276
var pactffi_verifier_add_directory_source func(uintptr, string)
277
var pactffi_verifier_url_source func(uintptr, string, string, string, string)
278
var pactffi_verifier_broker_source func(uintptr, string, string, string, string)
279
var pactffi_verifier_broker_source_with_selectors func(uintptr, string, string, string, string, uint8, string, []*byte, uint16, string, []*byte, uint16, []*byte, uint16)
280
var pactffi_verifier_execute func(uintptr) int32
281
var pactffi_verifier_cli_args func() string
282
var pactffi_verifier_logs func(uintptr) string
283
var pactffi_verifier_logs_for_provider func(string) string
284
var pactffi_verifier_output func(uintptr, uint8) string
285
var pactffi_verifier_json func(uintptr) string
286
var pactffi_using_plugin func(uintptr, string, string) uint32
287
var pactffi_cleanup_plugins func(uintptr)
288
var pactffi_interaction_contents func(uintptr, int32, string, string) uint32
289
var pactffi_matches_string_value func(uintptr, string, string, uint8) string
290
var pactffi_matches_u64_value func(uintptr, uint64, uint64, uint8) string
291
var pactffi_matches_i64_value func(uintptr, int64, int64, uint8) string
292
var pactffi_matches_f64_value func(uintptr, float64, float64, uint8) string
293
var pactffi_matches_bool_value func(uintptr, uint8, uint8, uint8) string
294
var pactffi_matches_binary_value func(uintptr, uintptr, uint64, uintptr, uint64, uint8) string
295
var pactffi_matches_json_value func(uintptr, string, string, uint8) string
296

297
func init() {
12✔
298
        libpact_ffi, err := openLibrary(filepath.Join(os.Getenv("PACT_LD_LIBRARY_PATH"), getSystemLibrary()))
12✔
299
        if err != nil {
12✔
NEW
300
                panic(err)
×
301
        }
302
        purego.RegisterLibFunc(&pactffi_version, libpact_ffi, "pactffi_version")
12✔
303
        purego.RegisterLibFunc(&pactffi_init, libpact_ffi, "pactffi_init")
12✔
304
        purego.RegisterLibFunc(&pactffi_init_with_log_level, libpact_ffi, "pactffi_init_with_log_level")
12✔
305
        purego.RegisterLibFunc(&pactffi_enable_ansi_support, libpact_ffi, "pactffi_enable_ansi_support")
12✔
306
        purego.RegisterLibFunc(&pactffi_log_message, libpact_ffi, "pactffi_log_message")
12✔
307
        purego.RegisterLibFunc(&pactffi_match_message, libpact_ffi, "pactffi_match_message")
12✔
308
        purego.RegisterLibFunc(&pactffi_mismatches_get_iter, libpact_ffi, "pactffi_mismatches_get_iter")
12✔
309
        purego.RegisterLibFunc(&pactffi_mismatches_delete, libpact_ffi, "pactffi_mismatches_delete")
12✔
310
        purego.RegisterLibFunc(&pactffi_mismatches_iter_next, libpact_ffi, "pactffi_mismatches_iter_next")
12✔
311
        purego.RegisterLibFunc(&pactffi_mismatches_iter_delete, libpact_ffi, "pactffi_mismatches_iter_delete")
12✔
312
        purego.RegisterLibFunc(&pactffi_mismatch_to_json, libpact_ffi, "pactffi_mismatch_to_json")
12✔
313
        purego.RegisterLibFunc(&pactffi_mismatch_type, libpact_ffi, "pactffi_mismatch_type")
12✔
314
        purego.RegisterLibFunc(&pactffi_mismatch_summary, libpact_ffi, "pactffi_mismatch_summary")
12✔
315
        purego.RegisterLibFunc(&pactffi_mismatch_description, libpact_ffi, "pactffi_mismatch_description")
12✔
316
        purego.RegisterLibFunc(&pactffi_mismatch_ansi_description, libpact_ffi, "pactffi_mismatch_ansi_description")
12✔
317
        purego.RegisterLibFunc(&pactffi_get_error_message, libpact_ffi, "pactffi_get_error_message")
12✔
318
        purego.RegisterLibFunc(&pactffi_log_to_stdout, libpact_ffi, "pactffi_log_to_stdout")
12✔
319
        purego.RegisterLibFunc(&pactffi_log_to_stderr, libpact_ffi, "pactffi_log_to_stderr")
12✔
320
        purego.RegisterLibFunc(&pactffi_log_to_file, libpact_ffi, "pactffi_log_to_file")
12✔
321
        purego.RegisterLibFunc(&pactffi_log_to_buffer, libpact_ffi, "pactffi_log_to_buffer")
12✔
322
        purego.RegisterLibFunc(&pactffi_logger_init, libpact_ffi, "pactffi_logger_init")
12✔
323
        purego.RegisterLibFunc(&pactffi_logger_attach_sink, libpact_ffi, "pactffi_logger_attach_sink")
12✔
324
        purego.RegisterLibFunc(&pactffi_logger_apply, libpact_ffi, "pactffi_logger_apply")
12✔
325
        purego.RegisterLibFunc(&pactffi_fetch_log_buffer, libpact_ffi, "pactffi_fetch_log_buffer")
12✔
326
        purego.RegisterLibFunc(&pactffi_parse_pact_json, libpact_ffi, "pactffi_parse_pact_json")
12✔
327
        purego.RegisterLibFunc(&pactffi_pact_model_delete, libpact_ffi, "pactffi_pact_model_delete")
12✔
328
        purego.RegisterLibFunc(&pactffi_pact_model_interaction_iterator, libpact_ffi, "pactffi_pact_model_interaction_iterator")
12✔
329
        purego.RegisterLibFunc(&pactffi_pact_spec_version, libpact_ffi, "pactffi_pact_spec_version")
12✔
330
        purego.RegisterLibFunc(&pactffi_pact_interaction_delete, libpact_ffi, "pactffi_pact_interaction_delete")
12✔
331
        purego.RegisterLibFunc(&pactffi_async_message_new, libpact_ffi, "pactffi_async_message_new")
12✔
332
        purego.RegisterLibFunc(&pactffi_async_message_delete, libpact_ffi, "pactffi_async_message_delete")
12✔
333
        purego.RegisterLibFunc(&pactffi_async_message_get_contents, libpact_ffi, "pactffi_async_message_get_contents")
12✔
334
        purego.RegisterLibFunc(&pactffi_async_message_get_contents_str, libpact_ffi, "pactffi_async_message_get_contents_str")
12✔
335
        purego.RegisterLibFunc(&pactffi_async_message_set_contents_str, libpact_ffi, "pactffi_async_message_set_contents_str")
12✔
336
        purego.RegisterLibFunc(&pactffi_async_message_get_contents_length, libpact_ffi, "pactffi_async_message_get_contents_length")
12✔
337
        purego.RegisterLibFunc(&pactffi_async_message_get_contents_bin, libpact_ffi, "pactffi_async_message_get_contents_bin")
12✔
338
        purego.RegisterLibFunc(&pactffi_async_message_set_contents_bin, libpact_ffi, "pactffi_async_message_set_contents_bin")
12✔
339
        purego.RegisterLibFunc(&pactffi_async_message_get_description, libpact_ffi, "pactffi_async_message_get_description")
12✔
340
        purego.RegisterLibFunc(&pactffi_async_message_set_description, libpact_ffi, "pactffi_async_message_set_description")
12✔
341
        purego.RegisterLibFunc(&pactffi_async_message_get_provider_state, libpact_ffi, "pactffi_async_message_get_provider_state")
12✔
342
        purego.RegisterLibFunc(&pactffi_async_message_get_provider_state_iter, libpact_ffi, "pactffi_async_message_get_provider_state_iter")
12✔
343
        purego.RegisterLibFunc(&pactffi_consumer_get_name, libpact_ffi, "pactffi_consumer_get_name")
12✔
344
        purego.RegisterLibFunc(&pactffi_pact_get_consumer, libpact_ffi, "pactffi_pact_get_consumer")
12✔
345
        purego.RegisterLibFunc(&pactffi_pact_consumer_delete, libpact_ffi, "pactffi_pact_consumer_delete")
12✔
346
        purego.RegisterLibFunc(&pactffi_message_contents_get_contents_str, libpact_ffi, "pactffi_message_contents_get_contents_str")
12✔
347
        purego.RegisterLibFunc(&pactffi_message_contents_set_contents_str, libpact_ffi, "pactffi_message_contents_set_contents_str")
12✔
348
        purego.RegisterLibFunc(&pactffi_message_contents_get_contents_length, libpact_ffi, "pactffi_message_contents_get_contents_length")
12✔
349
        purego.RegisterLibFunc(&pactffi_message_contents_get_contents_bin, libpact_ffi, "pactffi_message_contents_get_contents_bin")
12✔
350
        purego.RegisterLibFunc(&pactffi_message_contents_set_contents_bin, libpact_ffi, "pactffi_message_contents_set_contents_bin")
12✔
351
        purego.RegisterLibFunc(&pactffi_message_contents_get_metadata_iter, libpact_ffi, "pactffi_message_contents_get_metadata_iter")
12✔
352
        purego.RegisterLibFunc(&pactffi_message_contents_get_matching_rule_iter, libpact_ffi, "pactffi_message_contents_get_matching_rule_iter")
12✔
353
        purego.RegisterLibFunc(&pactffi_request_contents_get_matching_rule_iter, libpact_ffi, "pactffi_request_contents_get_matching_rule_iter")
12✔
354
        purego.RegisterLibFunc(&pactffi_response_contents_get_matching_rule_iter, libpact_ffi, "pactffi_response_contents_get_matching_rule_iter")
12✔
355
        purego.RegisterLibFunc(&pactffi_message_contents_get_generators_iter, libpact_ffi, "pactffi_message_contents_get_generators_iter")
12✔
356
        purego.RegisterLibFunc(&pactffi_request_contents_get_generators_iter, libpact_ffi, "pactffi_request_contents_get_generators_iter")
12✔
357
        purego.RegisterLibFunc(&pactffi_response_contents_get_generators_iter, libpact_ffi, "pactffi_response_contents_get_generators_iter")
12✔
358
        purego.RegisterLibFunc(&pactffi_parse_matcher_definition, libpact_ffi, "pactffi_parse_matcher_definition")
12✔
359
        purego.RegisterLibFunc(&pactffi_matcher_definition_error, libpact_ffi, "pactffi_matcher_definition_error")
12✔
360
        purego.RegisterLibFunc(&pactffi_matcher_definition_value, libpact_ffi, "pactffi_matcher_definition_value")
12✔
361
        purego.RegisterLibFunc(&pactffi_matcher_definition_delete, libpact_ffi, "pactffi_matcher_definition_delete")
12✔
362
        purego.RegisterLibFunc(&pactffi_matcher_definition_generator, libpact_ffi, "pactffi_matcher_definition_generator")
12✔
363
        purego.RegisterLibFunc(&pactffi_matcher_definition_value_type, libpact_ffi, "pactffi_matcher_definition_value_type")
12✔
364
        purego.RegisterLibFunc(&pactffi_matching_rule_iter_delete, libpact_ffi, "pactffi_matching_rule_iter_delete")
12✔
365
        purego.RegisterLibFunc(&pactffi_matcher_definition_iter, libpact_ffi, "pactffi_matcher_definition_iter")
12✔
366
        purego.RegisterLibFunc(&pactffi_matching_rule_iter_next, libpact_ffi, "pactffi_matching_rule_iter_next")
12✔
367
        purego.RegisterLibFunc(&pactffi_matching_rule_id, libpact_ffi, "pactffi_matching_rule_id")
12✔
368
        purego.RegisterLibFunc(&pactffi_matching_rule_value, libpact_ffi, "pactffi_matching_rule_value")
12✔
369
        purego.RegisterLibFunc(&pactffi_matching_rule_pointer, libpact_ffi, "pactffi_matching_rule_pointer")
12✔
370
        purego.RegisterLibFunc(&pactffi_matching_rule_reference_name, libpact_ffi, "pactffi_matching_rule_reference_name")
12✔
371
        purego.RegisterLibFunc(&pactffi_validate_datetime, libpact_ffi, "pactffi_validate_datetime")
12✔
372
        purego.RegisterLibFunc(&pactffi_generator_to_json, libpact_ffi, "pactffi_generator_to_json")
12✔
373
        purego.RegisterLibFunc(&pactffi_generator_generate_string, libpact_ffi, "pactffi_generator_generate_string")
12✔
374
        purego.RegisterLibFunc(&pactffi_generator_generate_integer, libpact_ffi, "pactffi_generator_generate_integer")
12✔
375
        purego.RegisterLibFunc(&pactffi_generators_iter_delete, libpact_ffi, "pactffi_generators_iter_delete")
12✔
376
        purego.RegisterLibFunc(&pactffi_generators_iter_next, libpact_ffi, "pactffi_generators_iter_next")
12✔
377
        purego.RegisterLibFunc(&pactffi_generators_iter_pair_delete, libpact_ffi, "pactffi_generators_iter_pair_delete")
12✔
378
        purego.RegisterLibFunc(&pactffi_sync_http_new, libpact_ffi, "pactffi_sync_http_new")
12✔
379
        purego.RegisterLibFunc(&pactffi_sync_http_delete, libpact_ffi, "pactffi_sync_http_delete")
12✔
380
        purego.RegisterLibFunc(&pactffi_sync_http_get_request, libpact_ffi, "pactffi_sync_http_get_request")
12✔
381
        purego.RegisterLibFunc(&pactffi_sync_http_get_request_contents, libpact_ffi, "pactffi_sync_http_get_request_contents")
12✔
382
        purego.RegisterLibFunc(&pactffi_sync_http_set_request_contents, libpact_ffi, "pactffi_sync_http_set_request_contents")
12✔
383
        purego.RegisterLibFunc(&pactffi_sync_http_get_request_contents_length, libpact_ffi, "pactffi_sync_http_get_request_contents_length")
12✔
384
        purego.RegisterLibFunc(&pactffi_sync_http_get_request_contents_bin, libpact_ffi, "pactffi_sync_http_get_request_contents_bin")
12✔
385
        purego.RegisterLibFunc(&pactffi_sync_http_set_request_contents_bin, libpact_ffi, "pactffi_sync_http_set_request_contents_bin")
12✔
386
        purego.RegisterLibFunc(&pactffi_sync_http_get_response, libpact_ffi, "pactffi_sync_http_get_response")
12✔
387
        purego.RegisterLibFunc(&pactffi_sync_http_get_response_contents, libpact_ffi, "pactffi_sync_http_get_response_contents")
12✔
388
        purego.RegisterLibFunc(&pactffi_sync_http_set_response_contents, libpact_ffi, "pactffi_sync_http_set_response_contents")
12✔
389
        purego.RegisterLibFunc(&pactffi_sync_http_get_response_contents_length, libpact_ffi, "pactffi_sync_http_get_response_contents_length")
12✔
390
        purego.RegisterLibFunc(&pactffi_sync_http_get_response_contents_bin, libpact_ffi, "pactffi_sync_http_get_response_contents_bin")
12✔
391
        purego.RegisterLibFunc(&pactffi_sync_http_set_response_contents_bin, libpact_ffi, "pactffi_sync_http_set_response_contents_bin")
12✔
392
        purego.RegisterLibFunc(&pactffi_sync_http_get_description, libpact_ffi, "pactffi_sync_http_get_description")
12✔
393
        purego.RegisterLibFunc(&pactffi_sync_http_set_description, libpact_ffi, "pactffi_sync_http_set_description")
12✔
394
        purego.RegisterLibFunc(&pactffi_sync_http_get_provider_state, libpact_ffi, "pactffi_sync_http_get_provider_state")
12✔
395
        purego.RegisterLibFunc(&pactffi_sync_http_get_provider_state_iter, libpact_ffi, "pactffi_sync_http_get_provider_state_iter")
12✔
396
        purego.RegisterLibFunc(&pactffi_pact_interaction_as_synchronous_http, libpact_ffi, "pactffi_pact_interaction_as_synchronous_http")
12✔
397
        purego.RegisterLibFunc(&pactffi_pact_interaction_as_message, libpact_ffi, "pactffi_pact_interaction_as_message")
12✔
398
        purego.RegisterLibFunc(&pactffi_pact_interaction_as_asynchronous_message, libpact_ffi, "pactffi_pact_interaction_as_asynchronous_message")
12✔
399
        purego.RegisterLibFunc(&pactffi_pact_interaction_as_synchronous_message, libpact_ffi, "pactffi_pact_interaction_as_synchronous_message")
12✔
400
        purego.RegisterLibFunc(&pactffi_pact_message_iter_delete, libpact_ffi, "pactffi_pact_message_iter_delete")
12✔
401
        purego.RegisterLibFunc(&pactffi_pact_message_iter_next, libpact_ffi, "pactffi_pact_message_iter_next")
12✔
402
        purego.RegisterLibFunc(&pactffi_pact_sync_message_iter_next, libpact_ffi, "pactffi_pact_sync_message_iter_next")
12✔
403
        purego.RegisterLibFunc(&pactffi_pact_sync_message_iter_delete, libpact_ffi, "pactffi_pact_sync_message_iter_delete")
12✔
404
        purego.RegisterLibFunc(&pactffi_pact_sync_http_iter_next, libpact_ffi, "pactffi_pact_sync_http_iter_next")
12✔
405
        purego.RegisterLibFunc(&pactffi_pact_sync_http_iter_delete, libpact_ffi, "pactffi_pact_sync_http_iter_delete")
12✔
406
        purego.RegisterLibFunc(&pactffi_pact_interaction_iter_next, libpact_ffi, "pactffi_pact_interaction_iter_next")
12✔
407
        purego.RegisterLibFunc(&pactffi_pact_interaction_iter_delete, libpact_ffi, "pactffi_pact_interaction_iter_delete")
12✔
408
        purego.RegisterLibFunc(&pactffi_matching_rule_to_json, libpact_ffi, "pactffi_matching_rule_to_json")
12✔
409
        purego.RegisterLibFunc(&pactffi_matching_rules_iter_delete, libpact_ffi, "pactffi_matching_rules_iter_delete")
12✔
410
        purego.RegisterLibFunc(&pactffi_matching_rules_iter_next, libpact_ffi, "pactffi_matching_rules_iter_next")
12✔
411
        purego.RegisterLibFunc(&pactffi_matching_rules_iter_pair_delete, libpact_ffi, "pactffi_matching_rules_iter_pair_delete")
12✔
412
        purego.RegisterLibFunc(&pactffi_message_new, libpact_ffi, "pactffi_message_new")
12✔
413
        purego.RegisterLibFunc(&pactffi_message_new_from_json, libpact_ffi, "pactffi_message_new_from_json")
12✔
414
        purego.RegisterLibFunc(&pactffi_message_new_from_body, libpact_ffi, "pactffi_message_new_from_body")
12✔
415
        purego.RegisterLibFunc(&pactffi_message_delete, libpact_ffi, "pactffi_message_delete")
12✔
416
        purego.RegisterLibFunc(&pactffi_message_get_contents, libpact_ffi, "pactffi_message_get_contents")
12✔
417
        purego.RegisterLibFunc(&pactffi_message_set_contents, libpact_ffi, "pactffi_message_set_contents")
12✔
418
        purego.RegisterLibFunc(&pactffi_message_get_contents_length, libpact_ffi, "pactffi_message_get_contents_length")
12✔
419
        purego.RegisterLibFunc(&pactffi_message_get_contents_bin, libpact_ffi, "pactffi_message_get_contents_bin")
12✔
420
        purego.RegisterLibFunc(&pactffi_message_set_contents_bin, libpact_ffi, "pactffi_message_set_contents_bin")
12✔
421
        purego.RegisterLibFunc(&pactffi_message_get_description, libpact_ffi, "pactffi_message_get_description")
12✔
422
        purego.RegisterLibFunc(&pactffi_message_set_description, libpact_ffi, "pactffi_message_set_description")
12✔
423
        purego.RegisterLibFunc(&pactffi_message_get_provider_state, libpact_ffi, "pactffi_message_get_provider_state")
12✔
424
        purego.RegisterLibFunc(&pactffi_message_get_provider_state_iter, libpact_ffi, "pactffi_message_get_provider_state_iter")
12✔
425
        purego.RegisterLibFunc(&pactffi_provider_state_iter_next, libpact_ffi, "pactffi_provider_state_iter_next")
12✔
426
        purego.RegisterLibFunc(&pactffi_provider_state_iter_delete, libpact_ffi, "pactffi_provider_state_iter_delete")
12✔
427
        purego.RegisterLibFunc(&pactffi_message_find_metadata, libpact_ffi, "pactffi_message_find_metadata")
12✔
428
        purego.RegisterLibFunc(&pactffi_message_insert_metadata, libpact_ffi, "pactffi_message_insert_metadata")
12✔
429
        purego.RegisterLibFunc(&pactffi_message_metadata_iter_next, libpact_ffi, "pactffi_message_metadata_iter_next")
12✔
430
        purego.RegisterLibFunc(&pactffi_message_get_metadata_iter, libpact_ffi, "pactffi_message_get_metadata_iter")
12✔
431
        purego.RegisterLibFunc(&pactffi_message_metadata_iter_delete, libpact_ffi, "pactffi_message_metadata_iter_delete")
12✔
432
        purego.RegisterLibFunc(&pactffi_message_metadata_pair_delete, libpact_ffi, "pactffi_message_metadata_pair_delete")
12✔
433
        purego.RegisterLibFunc(&pactffi_message_pact_new_from_json, libpact_ffi, "pactffi_message_pact_new_from_json")
12✔
434
        purego.RegisterLibFunc(&pactffi_message_pact_delete, libpact_ffi, "pactffi_message_pact_delete")
12✔
435
        purego.RegisterLibFunc(&pactffi_message_pact_get_consumer, libpact_ffi, "pactffi_message_pact_get_consumer")
12✔
436
        purego.RegisterLibFunc(&pactffi_message_pact_get_provider, libpact_ffi, "pactffi_message_pact_get_provider")
12✔
437
        purego.RegisterLibFunc(&pactffi_message_pact_get_message_iter, libpact_ffi, "pactffi_message_pact_get_message_iter")
12✔
438
        purego.RegisterLibFunc(&pactffi_message_pact_message_iter_next, libpact_ffi, "pactffi_message_pact_message_iter_next")
12✔
439
        purego.RegisterLibFunc(&pactffi_message_pact_message_iter_delete, libpact_ffi, "pactffi_message_pact_message_iter_delete")
12✔
440
        purego.RegisterLibFunc(&pactffi_message_pact_find_metadata, libpact_ffi, "pactffi_message_pact_find_metadata")
12✔
441
        purego.RegisterLibFunc(&pactffi_message_pact_get_metadata_iter, libpact_ffi, "pactffi_message_pact_get_metadata_iter")
12✔
442
        purego.RegisterLibFunc(&pactffi_message_pact_metadata_iter_next, libpact_ffi, "pactffi_message_pact_metadata_iter_next")
12✔
443
        purego.RegisterLibFunc(&pactffi_message_pact_metadata_iter_delete, libpact_ffi, "pactffi_message_pact_metadata_iter_delete")
12✔
444
        purego.RegisterLibFunc(&pactffi_message_pact_metadata_triple_delete, libpact_ffi, "pactffi_message_pact_metadata_triple_delete")
12✔
445
        purego.RegisterLibFunc(&pactffi_provider_get_name, libpact_ffi, "pactffi_provider_get_name")
12✔
446
        purego.RegisterLibFunc(&pactffi_pact_get_provider, libpact_ffi, "pactffi_pact_get_provider")
12✔
447
        purego.RegisterLibFunc(&pactffi_pact_provider_delete, libpact_ffi, "pactffi_pact_provider_delete")
12✔
448
        purego.RegisterLibFunc(&pactffi_provider_state_get_name, libpact_ffi, "pactffi_provider_state_get_name")
12✔
449
        purego.RegisterLibFunc(&pactffi_provider_state_get_param_iter, libpact_ffi, "pactffi_provider_state_get_param_iter")
12✔
450
        purego.RegisterLibFunc(&pactffi_provider_state_param_iter_next, libpact_ffi, "pactffi_provider_state_param_iter_next")
12✔
451
        purego.RegisterLibFunc(&pactffi_provider_state_delete, libpact_ffi, "pactffi_provider_state_delete")
12✔
452
        purego.RegisterLibFunc(&pactffi_provider_state_param_iter_delete, libpact_ffi, "pactffi_provider_state_param_iter_delete")
12✔
453
        purego.RegisterLibFunc(&pactffi_provider_state_param_pair_delete, libpact_ffi, "pactffi_provider_state_param_pair_delete")
12✔
454
        purego.RegisterLibFunc(&pactffi_sync_message_new, libpact_ffi, "pactffi_sync_message_new")
12✔
455
        purego.RegisterLibFunc(&pactffi_sync_message_delete, libpact_ffi, "pactffi_sync_message_delete")
12✔
456
        purego.RegisterLibFunc(&pactffi_sync_message_get_request_contents_str, libpact_ffi, "pactffi_sync_message_get_request_contents_str")
12✔
457
        purego.RegisterLibFunc(&pactffi_sync_message_set_request_contents_str, libpact_ffi, "pactffi_sync_message_set_request_contents_str")
12✔
458
        purego.RegisterLibFunc(&pactffi_sync_message_get_request_contents_length, libpact_ffi, "pactffi_sync_message_get_request_contents_length")
12✔
459
        purego.RegisterLibFunc(&pactffi_sync_message_get_request_contents_bin, libpact_ffi, "pactffi_sync_message_get_request_contents_bin")
12✔
460
        purego.RegisterLibFunc(&pactffi_sync_message_set_request_contents_bin, libpact_ffi, "pactffi_sync_message_set_request_contents_bin")
12✔
461
        purego.RegisterLibFunc(&pactffi_sync_message_get_request_contents, libpact_ffi, "pactffi_sync_message_get_request_contents")
12✔
462
        purego.RegisterLibFunc(&pactffi_sync_message_get_number_responses, libpact_ffi, "pactffi_sync_message_get_number_responses")
12✔
463
        purego.RegisterLibFunc(&pactffi_sync_message_get_response_contents_str, libpact_ffi, "pactffi_sync_message_get_response_contents_str")
12✔
464
        purego.RegisterLibFunc(&pactffi_sync_message_set_response_contents_str, libpact_ffi, "pactffi_sync_message_set_response_contents_str")
12✔
465
        purego.RegisterLibFunc(&pactffi_sync_message_get_response_contents_length, libpact_ffi, "pactffi_sync_message_get_response_contents_length")
12✔
466
        purego.RegisterLibFunc(&pactffi_sync_message_get_response_contents_bin, libpact_ffi, "pactffi_sync_message_get_response_contents_bin")
12✔
467
        purego.RegisterLibFunc(&pactffi_sync_message_set_response_contents_bin, libpact_ffi, "pactffi_sync_message_set_response_contents_bin")
12✔
468
        purego.RegisterLibFunc(&pactffi_sync_message_get_response_contents, libpact_ffi, "pactffi_sync_message_get_response_contents")
12✔
469
        purego.RegisterLibFunc(&pactffi_sync_message_get_description, libpact_ffi, "pactffi_sync_message_get_description")
12✔
470
        purego.RegisterLibFunc(&pactffi_sync_message_set_description, libpact_ffi, "pactffi_sync_message_set_description")
12✔
471
        purego.RegisterLibFunc(&pactffi_sync_message_get_provider_state, libpact_ffi, "pactffi_sync_message_get_provider_state")
12✔
472
        purego.RegisterLibFunc(&pactffi_sync_message_get_provider_state_iter, libpact_ffi, "pactffi_sync_message_get_provider_state_iter")
12✔
473
        purego.RegisterLibFunc(&pactffi_string_delete, libpact_ffi, "pactffi_string_delete")
12✔
474
        purego.RegisterLibFunc(&pactffi_create_mock_server, libpact_ffi, "pactffi_create_mock_server")
12✔
475
        purego.RegisterLibFunc(&pactffi_get_tls_ca_certificate, libpact_ffi, "pactffi_get_tls_ca_certificate")
12✔
476
        purego.RegisterLibFunc(&pactffi_create_mock_server_for_pact, libpact_ffi, "pactffi_create_mock_server_for_pact")
12✔
477
        purego.RegisterLibFunc(&pactffi_create_mock_server_for_transport, libpact_ffi, "pactffi_create_mock_server_for_transport")
12✔
478
        purego.RegisterLibFunc(&pactffi_mock_server_matched, libpact_ffi, "pactffi_mock_server_matched")
12✔
479
        purego.RegisterLibFunc(&pactffi_mock_server_mismatches, libpact_ffi, "pactffi_mock_server_mismatches")
12✔
480
        purego.RegisterLibFunc(&pactffi_cleanup_mock_server, libpact_ffi, "pactffi_cleanup_mock_server")
12✔
481
        purego.RegisterLibFunc(&pactffi_write_pact_file, libpact_ffi, "pactffi_write_pact_file")
12✔
482
        purego.RegisterLibFunc(&pactffi_mock_server_logs, libpact_ffi, "pactffi_mock_server_logs")
12✔
483
        purego.RegisterLibFunc(&pactffi_generate_datetime_string, libpact_ffi, "pactffi_generate_datetime_string")
12✔
484
        purego.RegisterLibFunc(&pactffi_check_regex, libpact_ffi, "pactffi_check_regex")
12✔
485
        purego.RegisterLibFunc(&pactffi_generate_regex_value, libpact_ffi, "pactffi_generate_regex_value")
12✔
486
        purego.RegisterLibFunc(&pactffi_free_string, libpact_ffi, "pactffi_free_string")
12✔
487
        purego.RegisterLibFunc(&pactffi_new_pact, libpact_ffi, "pactffi_new_pact")
12✔
488
        purego.RegisterLibFunc(&pactffi_pact_handle_to_pointer, libpact_ffi, "pactffi_pact_handle_to_pointer")
12✔
489
        purego.RegisterLibFunc(&pactffi_new_interaction, libpact_ffi, "pactffi_new_interaction")
12✔
490
        purego.RegisterLibFunc(&pactffi_new_message_interaction, libpact_ffi, "pactffi_new_message_interaction")
12✔
491
        purego.RegisterLibFunc(&pactffi_new_sync_message_interaction, libpact_ffi, "pactffi_new_sync_message_interaction")
12✔
492
        purego.RegisterLibFunc(&pactffi_upon_receiving, libpact_ffi, "pactffi_upon_receiving")
12✔
493
        purego.RegisterLibFunc(&pactffi_given, libpact_ffi, "pactffi_given")
12✔
494
        purego.RegisterLibFunc(&pactffi_interaction_test_name, libpact_ffi, "pactffi_interaction_test_name")
12✔
495
        purego.RegisterLibFunc(&pactffi_given_with_param, libpact_ffi, "pactffi_given_with_param")
12✔
496
        purego.RegisterLibFunc(&pactffi_given_with_params, libpact_ffi, "pactffi_given_with_params")
12✔
497
        purego.RegisterLibFunc(&pactffi_with_request, libpact_ffi, "pactffi_with_request")
12✔
498
        purego.RegisterLibFunc(&pactffi_with_query_parameter, libpact_ffi, "pactffi_with_query_parameter")
12✔
499
        purego.RegisterLibFunc(&pactffi_with_query_parameter_v2, libpact_ffi, "pactffi_with_query_parameter_v2")
12✔
500
        purego.RegisterLibFunc(&pactffi_with_specification, libpact_ffi, "pactffi_with_specification")
12✔
501
        purego.RegisterLibFunc(&pactffi_handle_get_pact_spec_version, libpact_ffi, "pactffi_handle_get_pact_spec_version")
12✔
502
        purego.RegisterLibFunc(&pactffi_with_pact_metadata, libpact_ffi, "pactffi_with_pact_metadata")
12✔
503
        purego.RegisterLibFunc(&pactffi_with_header, libpact_ffi, "pactffi_with_header")
12✔
504
        purego.RegisterLibFunc(&pactffi_with_header_v2, libpact_ffi, "pactffi_with_header_v2")
12✔
505
        purego.RegisterLibFunc(&pactffi_set_header, libpact_ffi, "pactffi_set_header")
12✔
506
        purego.RegisterLibFunc(&pactffi_response_status, libpact_ffi, "pactffi_response_status")
12✔
507
        purego.RegisterLibFunc(&pactffi_response_status_v2, libpact_ffi, "pactffi_response_status_v2")
12✔
508
        purego.RegisterLibFunc(&pactffi_with_body, libpact_ffi, "pactffi_with_body")
12✔
509
        purego.RegisterLibFunc(&pactffi_with_binary_body, libpact_ffi, "pactffi_with_binary_body")
12✔
510
        purego.RegisterLibFunc(&pactffi_with_binary_file, libpact_ffi, "pactffi_with_binary_file")
12✔
511
        purego.RegisterLibFunc(&pactffi_with_matching_rules, libpact_ffi, "pactffi_with_matching_rules")
12✔
512
        purego.RegisterLibFunc(&pactffi_with_multipart_file_v2, libpact_ffi, "pactffi_with_multipart_file_v2")
12✔
513
        purego.RegisterLibFunc(&pactffi_with_multipart_file, libpact_ffi, "pactffi_with_multipart_file")
12✔
514
        purego.RegisterLibFunc(&pactffi_pact_handle_get_message_iter, libpact_ffi, "pactffi_pact_handle_get_message_iter")
12✔
515
        purego.RegisterLibFunc(&pactffi_pact_handle_get_sync_message_iter, libpact_ffi, "pactffi_pact_handle_get_sync_message_iter")
12✔
516
        purego.RegisterLibFunc(&pactffi_pact_handle_get_sync_http_iter, libpact_ffi, "pactffi_pact_handle_get_sync_http_iter")
12✔
517
        purego.RegisterLibFunc(&pactffi_new_message_pact, libpact_ffi, "pactffi_new_message_pact")
12✔
518
        purego.RegisterLibFunc(&pactffi_new_message, libpact_ffi, "pactffi_new_message")
12✔
519
        purego.RegisterLibFunc(&pactffi_message_expects_to_receive, libpact_ffi, "pactffi_message_expects_to_receive")
12✔
520
        purego.RegisterLibFunc(&pactffi_message_given, libpact_ffi, "pactffi_message_given")
12✔
521
        purego.RegisterLibFunc(&pactffi_message_given_with_param, libpact_ffi, "pactffi_message_given_with_param")
12✔
522
        purego.RegisterLibFunc(&pactffi_message_with_contents, libpact_ffi, "pactffi_message_with_contents")
12✔
523
        purego.RegisterLibFunc(&pactffi_message_with_metadata, libpact_ffi, "pactffi_message_with_metadata")
12✔
524
        purego.RegisterLibFunc(&pactffi_message_with_metadata_v2, libpact_ffi, "pactffi_message_with_metadata_v2")
12✔
525
        purego.RegisterLibFunc(&pactffi_message_reify, libpact_ffi, "pactffi_message_reify")
12✔
526
        purego.RegisterLibFunc(&pactffi_write_message_pact_file, libpact_ffi, "pactffi_write_message_pact_file")
12✔
527
        purego.RegisterLibFunc(&pactffi_with_message_pact_metadata, libpact_ffi, "pactffi_with_message_pact_metadata")
12✔
528
        purego.RegisterLibFunc(&pactffi_pact_handle_write_file, libpact_ffi, "pactffi_pact_handle_write_file")
12✔
529
        purego.RegisterLibFunc(&pactffi_new_async_message, libpact_ffi, "pactffi_new_async_message")
12✔
530
        purego.RegisterLibFunc(&pactffi_free_pact_handle, libpact_ffi, "pactffi_free_pact_handle")
12✔
531
        purego.RegisterLibFunc(&pactffi_free_message_pact_handle, libpact_ffi, "pactffi_free_message_pact_handle")
12✔
532
        purego.RegisterLibFunc(&pactffi_verify, libpact_ffi, "pactffi_verify")
12✔
533
        purego.RegisterLibFunc(&pactffi_verifier_new, libpact_ffi, "pactffi_verifier_new")
12✔
534
        purego.RegisterLibFunc(&pactffi_verifier_new_for_application, libpact_ffi, "pactffi_verifier_new_for_application")
12✔
535
        purego.RegisterLibFunc(&pactffi_verifier_shutdown, libpact_ffi, "pactffi_verifier_shutdown")
12✔
536
        purego.RegisterLibFunc(&pactffi_verifier_set_provider_info, libpact_ffi, "pactffi_verifier_set_provider_info")
12✔
537
        purego.RegisterLibFunc(&pactffi_verifier_add_provider_transport, libpact_ffi, "pactffi_verifier_add_provider_transport")
12✔
538
        purego.RegisterLibFunc(&pactffi_verifier_set_filter_info, libpact_ffi, "pactffi_verifier_set_filter_info")
12✔
539
        purego.RegisterLibFunc(&pactffi_verifier_set_provider_state, libpact_ffi, "pactffi_verifier_set_provider_state")
12✔
540
        purego.RegisterLibFunc(&pactffi_verifier_set_verification_options, libpact_ffi, "pactffi_verifier_set_verification_options")
12✔
541
        purego.RegisterLibFunc(&pactffi_verifier_set_coloured_output, libpact_ffi, "pactffi_verifier_set_coloured_output")
12✔
542
        purego.RegisterLibFunc(&pactffi_verifier_set_no_pacts_is_error, libpact_ffi, "pactffi_verifier_set_no_pacts_is_error")
12✔
543
        purego.RegisterLibFunc(&pactffi_verifier_set_publish_options, libpact_ffi, "pactffi_verifier_set_publish_options")
12✔
544
        purego.RegisterLibFunc(&pactffi_verifier_set_consumer_filters, libpact_ffi, "pactffi_verifier_set_consumer_filters")
12✔
545
        purego.RegisterLibFunc(&pactffi_verifier_add_custom_header, libpact_ffi, "pactffi_verifier_add_custom_header")
12✔
546
        purego.RegisterLibFunc(&pactffi_verifier_add_file_source, libpact_ffi, "pactffi_verifier_add_file_source")
12✔
547
        purego.RegisterLibFunc(&pactffi_verifier_add_directory_source, libpact_ffi, "pactffi_verifier_add_directory_source")
12✔
548
        purego.RegisterLibFunc(&pactffi_verifier_url_source, libpact_ffi, "pactffi_verifier_url_source")
12✔
549
        purego.RegisterLibFunc(&pactffi_verifier_broker_source, libpact_ffi, "pactffi_verifier_broker_source")
12✔
550
        purego.RegisterLibFunc(&pactffi_verifier_broker_source_with_selectors, libpact_ffi, "pactffi_verifier_broker_source_with_selectors")
12✔
551
        purego.RegisterLibFunc(&pactffi_verifier_execute, libpact_ffi, "pactffi_verifier_execute")
12✔
552
        purego.RegisterLibFunc(&pactffi_verifier_cli_args, libpact_ffi, "pactffi_verifier_cli_args")
12✔
553
        purego.RegisterLibFunc(&pactffi_verifier_logs, libpact_ffi, "pactffi_verifier_logs")
12✔
554
        purego.RegisterLibFunc(&pactffi_verifier_logs_for_provider, libpact_ffi, "pactffi_verifier_logs_for_provider")
12✔
555
        purego.RegisterLibFunc(&pactffi_verifier_output, libpact_ffi, "pactffi_verifier_output")
12✔
556
        purego.RegisterLibFunc(&pactffi_verifier_json, libpact_ffi, "pactffi_verifier_json")
12✔
557
        purego.RegisterLibFunc(&pactffi_using_plugin, libpact_ffi, "pactffi_using_plugin")
12✔
558
        purego.RegisterLibFunc(&pactffi_cleanup_plugins, libpact_ffi, "pactffi_cleanup_plugins")
12✔
559
        purego.RegisterLibFunc(&pactffi_interaction_contents, libpact_ffi, "pactffi_interaction_contents")
12✔
560
        purego.RegisterLibFunc(&pactffi_matches_string_value, libpact_ffi, "pactffi_matches_string_value")
12✔
561
        purego.RegisterLibFunc(&pactffi_matches_u64_value, libpact_ffi, "pactffi_matches_u64_value")
12✔
562
        purego.RegisterLibFunc(&pactffi_matches_i64_value, libpact_ffi, "pactffi_matches_i64_value")
12✔
563
        purego.RegisterLibFunc(&pactffi_matches_f64_value, libpact_ffi, "pactffi_matches_f64_value")
12✔
564
        purego.RegisterLibFunc(&pactffi_matches_bool_value, libpact_ffi, "pactffi_matches_bool_value")
12✔
565
        purego.RegisterLibFunc(&pactffi_matches_binary_value, libpact_ffi, "pactffi_matches_binary_value")
12✔
566
        purego.RegisterLibFunc(&pactffi_matches_json_value, libpact_ffi, "pactffi_matches_json_value")
12✔
567
}
568

569
// func main() {
570

571
//         print(pactffi_version())
572
//         pactffi_log_to_stdout(4)
573
//         // pactffi_log_to_file("pact.log", 5)
574

575
//         var verifier_handle = pactffi_verifier_new_for_application("pact-purego", "0.0.1")
576
//         pactffi_verifier_set_provider_info(verifier_handle, "grpc-provider", "http", "localhost", 1234, "/")
577
//         pactffi_verifier_add_file_source(verifier_handle, "no_pact.json")
578
//         // pactffi_verifier_add_file_source(verifier_handle, "pact.json")
579
//         // pactffi_verifier_add_file_source(verifier_handle, "../pacts/Consumer-Alice Service.json")
580
//         // pactffi_verifier_add_file_source(verifier_handle, "../pacts/grpc-consumer-perl-area-calculator-provider.json")
581
//         pactffi_verifier_execute(verifier_handle)
582
//         pactffi_verifier_shutdown(verifier_handle)
583
// }
584

585
// hasSuffix tests whether the string s ends with suffix.
586
func hasSuffix(s, suffix string) bool {
24✔
587
        return len(s) >= len(suffix) && s[len(s)-len(suffix):] == suffix
24✔
588
}
24✔
589

590
// CString converts a go string to *byte that can be passed to C code.
591
func CString(name string) *byte {
24✔
592
        if hasSuffix(name, "\x00") {
24✔
NEW
593
                return &(*(*[]byte)(unsafe.Pointer(&name)))[0]
×
NEW
594
        }
×
595
        b := make([]byte, len(name)+1)
24✔
596
        copy(b, name)
24✔
597
        return &b[0]
24✔
598
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc