linksocks 1.7.1__cp39-cp39-win_amd64.whl

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.

Potentially problematic release.


This version of linksocks might be problematic. Click here for more details.

linksockslib/go.py ADDED
@@ -0,0 +1,4067 @@
1
+
2
+ # python wrapper for package go within overall package linksockslib
3
+ # This is what you import to use the package.
4
+ # File is generated by gopy. Do not edit.
5
+ # gopy.EXE build -vm=C:\Users\RUNNER~1\AppData\Local\Temp\linksocks_pyvenv_8ftxttql\venv\Scripts\python.exe -output=D:\a\linksocks\linksocks\_bindings\python\linksockslib -name=linksockslib -no-make=true ./linksocks_go
6
+
7
+ # the following is required to enable dlopen to open the _go.so file
8
+ import os,sys,inspect,collections
9
+ try:
10
+ import collections.abc as _collections_abc
11
+ except ImportError:
12
+ _collections_abc = collections
13
+
14
+ cwd = os.getcwd()
15
+ currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
16
+ os.chdir(currentdir)
17
+ from . import _linksockslib
18
+
19
+ os.chdir(cwd)
20
+
21
+ # to use this code in your end-user python file, import it as follows:
22
+ # from linksockslib import go
23
+ # and then refer to everything using go. prefix
24
+ # packages imported by this package listed below:
25
+
26
+
27
+ import collections
28
+ try:
29
+ import collections.abc as _collections_abc
30
+ except ImportError:
31
+ _collections_abc = collections
32
+
33
+ class GoClass(object):
34
+ """GoClass is the base class for all GoPy wrapper classes"""
35
+ def __init__(self):
36
+ self.handle = 0
37
+
38
+ # use go.nil for nil pointers
39
+ nil = GoClass()
40
+
41
+ # need to explicitly initialize it
42
+ def main():
43
+ global nil
44
+ nil = GoClass()
45
+
46
+ main()
47
+
48
+ def Init():
49
+ """calls the GoPyInit function, which runs the 'main' code string that was passed using -main arg to gopy"""
50
+ _linksockslib.GoPyInit()
51
+
52
+
53
+
54
+
55
+ # ---- Types ---
56
+
57
+ # Python type for slice []bool
58
+ class Slice_bool(GoClass):
59
+ """"""
60
+ def __init__(self, *args, **kwargs):
61
+ """
62
+ handle=A Go-side object is always initialized with an explicit handle=arg
63
+ otherwise parameter is a python list that we copy from
64
+ """
65
+ self.index = 0
66
+ if len(kwargs) == 1 and 'handle' in kwargs:
67
+ self.handle = kwargs['handle']
68
+ _linksockslib.IncRef(self.handle)
69
+ elif len(args) == 1 and isinstance(args[0], GoClass):
70
+ self.handle = args[0].handle
71
+ _linksockslib.IncRef(self.handle)
72
+ else:
73
+ self.handle = _linksockslib.Slice_bool_CTor()
74
+ _linksockslib.IncRef(self.handle)
75
+ if len(args) > 0:
76
+ if not isinstance(args[0], _collections_abc.Iterable):
77
+ raise TypeError('Slice_bool.__init__ takes a sequence as argument')
78
+ for elt in args[0]:
79
+ self.append(elt)
80
+ def __del__(self):
81
+ _linksockslib.DecRef(self.handle)
82
+ def __str__(self):
83
+ s = 'go.Slice_bool len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
84
+ if len(self) < 120:
85
+ s += ', '.join(map(str, self)) + ']'
86
+ return s
87
+ def __repr__(self):
88
+ return 'go.Slice_bool([' + ', '.join(map(str, self)) + '])'
89
+ def __len__(self):
90
+ return _linksockslib.Slice_bool_len(self.handle)
91
+ def __getitem__(self, key):
92
+ if isinstance(key, slice):
93
+ if key.step == None or key.step == 1:
94
+ st = key.start
95
+ ed = key.stop
96
+ if st == None:
97
+ st = 0
98
+ if ed == None:
99
+ ed = _linksockslib.Slice_bool_len(self.handle)
100
+ return Slice_bool(handle=_linksockslib.Slice_bool_subslice(self.handle, st, ed))
101
+ return [self[ii] for ii in range(*key.indices(len(self)))]
102
+ elif isinstance(key, int):
103
+ if key < 0:
104
+ key += len(self)
105
+ if key < 0 or key >= len(self):
106
+ raise IndexError('slice index out of range')
107
+ return _linksockslib.Slice_bool_elem(self.handle, key)
108
+ else:
109
+ raise TypeError('slice index invalid type')
110
+ def __setitem__(self, idx, value):
111
+ if idx < 0:
112
+ idx += len(self)
113
+ if idx < len(self):
114
+ _linksockslib.Slice_bool_set(self.handle, idx, value)
115
+ return
116
+ raise IndexError('slice index out of range')
117
+ def __iadd__(self, value):
118
+ if not isinstance(value, _collections_abc.Iterable):
119
+ raise TypeError('Slice_bool.__iadd__ takes a sequence as argument')
120
+ for elt in value:
121
+ self.append(elt)
122
+ return self
123
+ def __iter__(self):
124
+ self.index = 0
125
+ return self
126
+ def __next__(self):
127
+ if self.index < len(self):
128
+ rv = _linksockslib.Slice_bool_elem(self.handle, self.index)
129
+ self.index = self.index + 1
130
+ return rv
131
+ raise StopIteration
132
+ def append(self, value):
133
+ _linksockslib.Slice_bool_append(self.handle, value)
134
+ def copy(self, src):
135
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
136
+ mx = min(len(self), len(src))
137
+ for i in range(mx):
138
+ self[i] = src[i]
139
+
140
+ # Python type for slice []byte
141
+ class Slice_byte(GoClass):
142
+ """"""
143
+ def __init__(self, *args, **kwargs):
144
+ """
145
+ handle=A Go-side object is always initialized with an explicit handle=arg
146
+ otherwise parameter is a python list that we copy from
147
+ """
148
+ self.index = 0
149
+ if len(kwargs) == 1 and 'handle' in kwargs:
150
+ self.handle = kwargs['handle']
151
+ _linksockslib.IncRef(self.handle)
152
+ elif len(args) == 1 and isinstance(args[0], GoClass):
153
+ self.handle = args[0].handle
154
+ _linksockslib.IncRef(self.handle)
155
+ else:
156
+ self.handle = _linksockslib.Slice_byte_CTor()
157
+ _linksockslib.IncRef(self.handle)
158
+ if len(args) > 0:
159
+ if not isinstance(args[0], _collections_abc.Iterable):
160
+ raise TypeError('Slice_byte.__init__ takes a sequence as argument')
161
+ for elt in args[0]:
162
+ self.append(elt)
163
+ def __del__(self):
164
+ _linksockslib.DecRef(self.handle)
165
+ def __str__(self):
166
+ s = 'go.Slice_byte len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
167
+ if len(self) < 120:
168
+ s += ', '.join(map(str, self)) + ']'
169
+ return s
170
+ def __repr__(self):
171
+ return 'go.Slice_byte([' + ', '.join(map(str, self)) + '])'
172
+ def __len__(self):
173
+ return _linksockslib.Slice_byte_len(self.handle)
174
+ def __getitem__(self, key):
175
+ if isinstance(key, slice):
176
+ if key.step == None or key.step == 1:
177
+ st = key.start
178
+ ed = key.stop
179
+ if st == None:
180
+ st = 0
181
+ if ed == None:
182
+ ed = _linksockslib.Slice_byte_len(self.handle)
183
+ return Slice_byte(handle=_linksockslib.Slice_byte_subslice(self.handle, st, ed))
184
+ return [self[ii] for ii in range(*key.indices(len(self)))]
185
+ elif isinstance(key, int):
186
+ if key < 0:
187
+ key += len(self)
188
+ if key < 0 or key >= len(self):
189
+ raise IndexError('slice index out of range')
190
+ return _linksockslib.Slice_byte_elem(self.handle, key)
191
+ else:
192
+ raise TypeError('slice index invalid type')
193
+ def __setitem__(self, idx, value):
194
+ if idx < 0:
195
+ idx += len(self)
196
+ if idx < len(self):
197
+ _linksockslib.Slice_byte_set(self.handle, idx, value)
198
+ return
199
+ raise IndexError('slice index out of range')
200
+ def __iadd__(self, value):
201
+ if not isinstance(value, _collections_abc.Iterable):
202
+ raise TypeError('Slice_byte.__iadd__ takes a sequence as argument')
203
+ for elt in value:
204
+ self.append(elt)
205
+ return self
206
+ def __iter__(self):
207
+ self.index = 0
208
+ return self
209
+ def __next__(self):
210
+ if self.index < len(self):
211
+ rv = _linksockslib.Slice_byte_elem(self.handle, self.index)
212
+ self.index = self.index + 1
213
+ return rv
214
+ raise StopIteration
215
+ def append(self, value):
216
+ _linksockslib.Slice_byte_append(self.handle, value)
217
+ def copy(self, src):
218
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
219
+ mx = min(len(self), len(src))
220
+ for i in range(mx):
221
+ self[i] = src[i]
222
+ @staticmethod
223
+ def from_bytes(value):
224
+ """Create a Go []byte object from a Python bytes object"""
225
+ handle = _linksockslib.Slice_byte_from_bytes(value)
226
+ return Slice_byte(handle=handle)
227
+ def __bytes__(self):
228
+ """Convert the slice to a bytes object."""
229
+ return _linksockslib.Slice_byte_to_bytes(self.handle)
230
+
231
+ # Python type for slice []error
232
+ class Slice_error(GoClass):
233
+ """"""
234
+ def __init__(self, *args, **kwargs):
235
+ """
236
+ handle=A Go-side object is always initialized with an explicit handle=arg
237
+ otherwise parameter is a python list that we copy from
238
+ """
239
+ self.index = 0
240
+ if len(kwargs) == 1 and 'handle' in kwargs:
241
+ self.handle = kwargs['handle']
242
+ _linksockslib.IncRef(self.handle)
243
+ elif len(args) == 1 and isinstance(args[0], GoClass):
244
+ self.handle = args[0].handle
245
+ _linksockslib.IncRef(self.handle)
246
+ else:
247
+ self.handle = _linksockslib.Slice_error_CTor()
248
+ _linksockslib.IncRef(self.handle)
249
+ if len(args) > 0:
250
+ if not isinstance(args[0], _collections_abc.Iterable):
251
+ raise TypeError('Slice_error.__init__ takes a sequence as argument')
252
+ for elt in args[0]:
253
+ self.append(elt)
254
+ def __del__(self):
255
+ _linksockslib.DecRef(self.handle)
256
+ def __str__(self):
257
+ s = 'go.Slice_error len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
258
+ if len(self) < 120:
259
+ s += ', '.join(map(str, self)) + ']'
260
+ return s
261
+ def __repr__(self):
262
+ return 'go.Slice_error([' + ', '.join(map(str, self)) + '])'
263
+ def __len__(self):
264
+ return _linksockslib.Slice_error_len(self.handle)
265
+ def __getitem__(self, key):
266
+ if isinstance(key, slice):
267
+ if key.step == None or key.step == 1:
268
+ st = key.start
269
+ ed = key.stop
270
+ if st == None:
271
+ st = 0
272
+ if ed == None:
273
+ ed = _linksockslib.Slice_error_len(self.handle)
274
+ return Slice_error(handle=_linksockslib.Slice_error_subslice(self.handle, st, ed))
275
+ return [self[ii] for ii in range(*key.indices(len(self)))]
276
+ elif isinstance(key, int):
277
+ if key < 0:
278
+ key += len(self)
279
+ if key < 0 or key >= len(self):
280
+ raise IndexError('slice index out of range')
281
+ return _linksockslib.Slice_error_elem(self.handle, key)
282
+ else:
283
+ raise TypeError('slice index invalid type')
284
+ def __setitem__(self, idx, value):
285
+ if idx < 0:
286
+ idx += len(self)
287
+ if idx < len(self):
288
+ _linksockslib.Slice_error_set(self.handle, idx, value)
289
+ return
290
+ raise IndexError('slice index out of range')
291
+ def __iadd__(self, value):
292
+ if not isinstance(value, _collections_abc.Iterable):
293
+ raise TypeError('Slice_error.__iadd__ takes a sequence as argument')
294
+ for elt in value:
295
+ self.append(elt)
296
+ return self
297
+ def __iter__(self):
298
+ self.index = 0
299
+ return self
300
+ def __next__(self):
301
+ if self.index < len(self):
302
+ rv = _linksockslib.Slice_error_elem(self.handle, self.index)
303
+ self.index = self.index + 1
304
+ return rv
305
+ raise StopIteration
306
+ def append(self, value):
307
+ _linksockslib.Slice_error_append(self.handle, value)
308
+ def copy(self, src):
309
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
310
+ mx = min(len(self), len(src))
311
+ for i in range(mx):
312
+ self[i] = src[i]
313
+
314
+ # Python type for slice []float32
315
+ class Slice_float32(GoClass):
316
+ """"""
317
+ def __init__(self, *args, **kwargs):
318
+ """
319
+ handle=A Go-side object is always initialized with an explicit handle=arg
320
+ otherwise parameter is a python list that we copy from
321
+ """
322
+ self.index = 0
323
+ if len(kwargs) == 1 and 'handle' in kwargs:
324
+ self.handle = kwargs['handle']
325
+ _linksockslib.IncRef(self.handle)
326
+ elif len(args) == 1 and isinstance(args[0], GoClass):
327
+ self.handle = args[0].handle
328
+ _linksockslib.IncRef(self.handle)
329
+ else:
330
+ self.handle = _linksockslib.Slice_float32_CTor()
331
+ _linksockslib.IncRef(self.handle)
332
+ if len(args) > 0:
333
+ if not isinstance(args[0], _collections_abc.Iterable):
334
+ raise TypeError('Slice_float32.__init__ takes a sequence as argument')
335
+ for elt in args[0]:
336
+ self.append(elt)
337
+ def __del__(self):
338
+ _linksockslib.DecRef(self.handle)
339
+ def __str__(self):
340
+ s = 'go.Slice_float32 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
341
+ if len(self) < 120:
342
+ s += ', '.join(map(str, self)) + ']'
343
+ return s
344
+ def __repr__(self):
345
+ return 'go.Slice_float32([' + ', '.join(map(str, self)) + '])'
346
+ def __len__(self):
347
+ return _linksockslib.Slice_float32_len(self.handle)
348
+ def __getitem__(self, key):
349
+ if isinstance(key, slice):
350
+ if key.step == None or key.step == 1:
351
+ st = key.start
352
+ ed = key.stop
353
+ if st == None:
354
+ st = 0
355
+ if ed == None:
356
+ ed = _linksockslib.Slice_float32_len(self.handle)
357
+ return Slice_float32(handle=_linksockslib.Slice_float32_subslice(self.handle, st, ed))
358
+ return [self[ii] for ii in range(*key.indices(len(self)))]
359
+ elif isinstance(key, int):
360
+ if key < 0:
361
+ key += len(self)
362
+ if key < 0 or key >= len(self):
363
+ raise IndexError('slice index out of range')
364
+ return _linksockslib.Slice_float32_elem(self.handle, key)
365
+ else:
366
+ raise TypeError('slice index invalid type')
367
+ def __setitem__(self, idx, value):
368
+ if idx < 0:
369
+ idx += len(self)
370
+ if idx < len(self):
371
+ _linksockslib.Slice_float32_set(self.handle, idx, value)
372
+ return
373
+ raise IndexError('slice index out of range')
374
+ def __iadd__(self, value):
375
+ if not isinstance(value, _collections_abc.Iterable):
376
+ raise TypeError('Slice_float32.__iadd__ takes a sequence as argument')
377
+ for elt in value:
378
+ self.append(elt)
379
+ return self
380
+ def __iter__(self):
381
+ self.index = 0
382
+ return self
383
+ def __next__(self):
384
+ if self.index < len(self):
385
+ rv = _linksockslib.Slice_float32_elem(self.handle, self.index)
386
+ self.index = self.index + 1
387
+ return rv
388
+ raise StopIteration
389
+ def append(self, value):
390
+ _linksockslib.Slice_float32_append(self.handle, value)
391
+ def copy(self, src):
392
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
393
+ mx = min(len(self), len(src))
394
+ for i in range(mx):
395
+ self[i] = src[i]
396
+
397
+ # Python type for slice []float64
398
+ class Slice_float64(GoClass):
399
+ """"""
400
+ def __init__(self, *args, **kwargs):
401
+ """
402
+ handle=A Go-side object is always initialized with an explicit handle=arg
403
+ otherwise parameter is a python list that we copy from
404
+ """
405
+ self.index = 0
406
+ if len(kwargs) == 1 and 'handle' in kwargs:
407
+ self.handle = kwargs['handle']
408
+ _linksockslib.IncRef(self.handle)
409
+ elif len(args) == 1 and isinstance(args[0], GoClass):
410
+ self.handle = args[0].handle
411
+ _linksockslib.IncRef(self.handle)
412
+ else:
413
+ self.handle = _linksockslib.Slice_float64_CTor()
414
+ _linksockslib.IncRef(self.handle)
415
+ if len(args) > 0:
416
+ if not isinstance(args[0], _collections_abc.Iterable):
417
+ raise TypeError('Slice_float64.__init__ takes a sequence as argument')
418
+ for elt in args[0]:
419
+ self.append(elt)
420
+ def __del__(self):
421
+ _linksockslib.DecRef(self.handle)
422
+ def __str__(self):
423
+ s = 'go.Slice_float64 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
424
+ if len(self) < 120:
425
+ s += ', '.join(map(str, self)) + ']'
426
+ return s
427
+ def __repr__(self):
428
+ return 'go.Slice_float64([' + ', '.join(map(str, self)) + '])'
429
+ def __len__(self):
430
+ return _linksockslib.Slice_float64_len(self.handle)
431
+ def __getitem__(self, key):
432
+ if isinstance(key, slice):
433
+ if key.step == None or key.step == 1:
434
+ st = key.start
435
+ ed = key.stop
436
+ if st == None:
437
+ st = 0
438
+ if ed == None:
439
+ ed = _linksockslib.Slice_float64_len(self.handle)
440
+ return Slice_float64(handle=_linksockslib.Slice_float64_subslice(self.handle, st, ed))
441
+ return [self[ii] for ii in range(*key.indices(len(self)))]
442
+ elif isinstance(key, int):
443
+ if key < 0:
444
+ key += len(self)
445
+ if key < 0 or key >= len(self):
446
+ raise IndexError('slice index out of range')
447
+ return _linksockslib.Slice_float64_elem(self.handle, key)
448
+ else:
449
+ raise TypeError('slice index invalid type')
450
+ def __setitem__(self, idx, value):
451
+ if idx < 0:
452
+ idx += len(self)
453
+ if idx < len(self):
454
+ _linksockslib.Slice_float64_set(self.handle, idx, value)
455
+ return
456
+ raise IndexError('slice index out of range')
457
+ def __iadd__(self, value):
458
+ if not isinstance(value, _collections_abc.Iterable):
459
+ raise TypeError('Slice_float64.__iadd__ takes a sequence as argument')
460
+ for elt in value:
461
+ self.append(elt)
462
+ return self
463
+ def __iter__(self):
464
+ self.index = 0
465
+ return self
466
+ def __next__(self):
467
+ if self.index < len(self):
468
+ rv = _linksockslib.Slice_float64_elem(self.handle, self.index)
469
+ self.index = self.index + 1
470
+ return rv
471
+ raise StopIteration
472
+ def append(self, value):
473
+ _linksockslib.Slice_float64_append(self.handle, value)
474
+ def copy(self, src):
475
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
476
+ mx = min(len(self), len(src))
477
+ for i in range(mx):
478
+ self[i] = src[i]
479
+
480
+ # Python type for slice []int
481
+ class Slice_int(GoClass):
482
+ """"""
483
+ def __init__(self, *args, **kwargs):
484
+ """
485
+ handle=A Go-side object is always initialized with an explicit handle=arg
486
+ otherwise parameter is a python list that we copy from
487
+ """
488
+ self.index = 0
489
+ if len(kwargs) == 1 and 'handle' in kwargs:
490
+ self.handle = kwargs['handle']
491
+ _linksockslib.IncRef(self.handle)
492
+ elif len(args) == 1 and isinstance(args[0], GoClass):
493
+ self.handle = args[0].handle
494
+ _linksockslib.IncRef(self.handle)
495
+ else:
496
+ self.handle = _linksockslib.Slice_int_CTor()
497
+ _linksockslib.IncRef(self.handle)
498
+ if len(args) > 0:
499
+ if not isinstance(args[0], _collections_abc.Iterable):
500
+ raise TypeError('Slice_int.__init__ takes a sequence as argument')
501
+ for elt in args[0]:
502
+ self.append(elt)
503
+ def __del__(self):
504
+ _linksockslib.DecRef(self.handle)
505
+ def __str__(self):
506
+ s = 'go.Slice_int len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
507
+ if len(self) < 120:
508
+ s += ', '.join(map(str, self)) + ']'
509
+ return s
510
+ def __repr__(self):
511
+ return 'go.Slice_int([' + ', '.join(map(str, self)) + '])'
512
+ def __len__(self):
513
+ return _linksockslib.Slice_int_len(self.handle)
514
+ def __getitem__(self, key):
515
+ if isinstance(key, slice):
516
+ if key.step == None or key.step == 1:
517
+ st = key.start
518
+ ed = key.stop
519
+ if st == None:
520
+ st = 0
521
+ if ed == None:
522
+ ed = _linksockslib.Slice_int_len(self.handle)
523
+ return Slice_int(handle=_linksockslib.Slice_int_subslice(self.handle, st, ed))
524
+ return [self[ii] for ii in range(*key.indices(len(self)))]
525
+ elif isinstance(key, int):
526
+ if key < 0:
527
+ key += len(self)
528
+ if key < 0 or key >= len(self):
529
+ raise IndexError('slice index out of range')
530
+ return _linksockslib.Slice_int_elem(self.handle, key)
531
+ else:
532
+ raise TypeError('slice index invalid type')
533
+ def __setitem__(self, idx, value):
534
+ if idx < 0:
535
+ idx += len(self)
536
+ if idx < len(self):
537
+ _linksockslib.Slice_int_set(self.handle, idx, value)
538
+ return
539
+ raise IndexError('slice index out of range')
540
+ def __iadd__(self, value):
541
+ if not isinstance(value, _collections_abc.Iterable):
542
+ raise TypeError('Slice_int.__iadd__ takes a sequence as argument')
543
+ for elt in value:
544
+ self.append(elt)
545
+ return self
546
+ def __iter__(self):
547
+ self.index = 0
548
+ return self
549
+ def __next__(self):
550
+ if self.index < len(self):
551
+ rv = _linksockslib.Slice_int_elem(self.handle, self.index)
552
+ self.index = self.index + 1
553
+ return rv
554
+ raise StopIteration
555
+ def append(self, value):
556
+ _linksockslib.Slice_int_append(self.handle, value)
557
+ def copy(self, src):
558
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
559
+ mx = min(len(self), len(src))
560
+ for i in range(mx):
561
+ self[i] = src[i]
562
+
563
+ # Python type for slice []int16
564
+ class Slice_int16(GoClass):
565
+ """"""
566
+ def __init__(self, *args, **kwargs):
567
+ """
568
+ handle=A Go-side object is always initialized with an explicit handle=arg
569
+ otherwise parameter is a python list that we copy from
570
+ """
571
+ self.index = 0
572
+ if len(kwargs) == 1 and 'handle' in kwargs:
573
+ self.handle = kwargs['handle']
574
+ _linksockslib.IncRef(self.handle)
575
+ elif len(args) == 1 and isinstance(args[0], GoClass):
576
+ self.handle = args[0].handle
577
+ _linksockslib.IncRef(self.handle)
578
+ else:
579
+ self.handle = _linksockslib.Slice_int16_CTor()
580
+ _linksockslib.IncRef(self.handle)
581
+ if len(args) > 0:
582
+ if not isinstance(args[0], _collections_abc.Iterable):
583
+ raise TypeError('Slice_int16.__init__ takes a sequence as argument')
584
+ for elt in args[0]:
585
+ self.append(elt)
586
+ def __del__(self):
587
+ _linksockslib.DecRef(self.handle)
588
+ def __str__(self):
589
+ s = 'go.Slice_int16 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
590
+ if len(self) < 120:
591
+ s += ', '.join(map(str, self)) + ']'
592
+ return s
593
+ def __repr__(self):
594
+ return 'go.Slice_int16([' + ', '.join(map(str, self)) + '])'
595
+ def __len__(self):
596
+ return _linksockslib.Slice_int16_len(self.handle)
597
+ def __getitem__(self, key):
598
+ if isinstance(key, slice):
599
+ if key.step == None or key.step == 1:
600
+ st = key.start
601
+ ed = key.stop
602
+ if st == None:
603
+ st = 0
604
+ if ed == None:
605
+ ed = _linksockslib.Slice_int16_len(self.handle)
606
+ return Slice_int16(handle=_linksockslib.Slice_int16_subslice(self.handle, st, ed))
607
+ return [self[ii] for ii in range(*key.indices(len(self)))]
608
+ elif isinstance(key, int):
609
+ if key < 0:
610
+ key += len(self)
611
+ if key < 0 or key >= len(self):
612
+ raise IndexError('slice index out of range')
613
+ return _linksockslib.Slice_int16_elem(self.handle, key)
614
+ else:
615
+ raise TypeError('slice index invalid type')
616
+ def __setitem__(self, idx, value):
617
+ if idx < 0:
618
+ idx += len(self)
619
+ if idx < len(self):
620
+ _linksockslib.Slice_int16_set(self.handle, idx, value)
621
+ return
622
+ raise IndexError('slice index out of range')
623
+ def __iadd__(self, value):
624
+ if not isinstance(value, _collections_abc.Iterable):
625
+ raise TypeError('Slice_int16.__iadd__ takes a sequence as argument')
626
+ for elt in value:
627
+ self.append(elt)
628
+ return self
629
+ def __iter__(self):
630
+ self.index = 0
631
+ return self
632
+ def __next__(self):
633
+ if self.index < len(self):
634
+ rv = _linksockslib.Slice_int16_elem(self.handle, self.index)
635
+ self.index = self.index + 1
636
+ return rv
637
+ raise StopIteration
638
+ def append(self, value):
639
+ _linksockslib.Slice_int16_append(self.handle, value)
640
+ def copy(self, src):
641
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
642
+ mx = min(len(self), len(src))
643
+ for i in range(mx):
644
+ self[i] = src[i]
645
+
646
+ # Python type for slice []int32
647
+ class Slice_int32(GoClass):
648
+ """"""
649
+ def __init__(self, *args, **kwargs):
650
+ """
651
+ handle=A Go-side object is always initialized with an explicit handle=arg
652
+ otherwise parameter is a python list that we copy from
653
+ """
654
+ self.index = 0
655
+ if len(kwargs) == 1 and 'handle' in kwargs:
656
+ self.handle = kwargs['handle']
657
+ _linksockslib.IncRef(self.handle)
658
+ elif len(args) == 1 and isinstance(args[0], GoClass):
659
+ self.handle = args[0].handle
660
+ _linksockslib.IncRef(self.handle)
661
+ else:
662
+ self.handle = _linksockslib.Slice_int32_CTor()
663
+ _linksockslib.IncRef(self.handle)
664
+ if len(args) > 0:
665
+ if not isinstance(args[0], _collections_abc.Iterable):
666
+ raise TypeError('Slice_int32.__init__ takes a sequence as argument')
667
+ for elt in args[0]:
668
+ self.append(elt)
669
+ def __del__(self):
670
+ _linksockslib.DecRef(self.handle)
671
+ def __str__(self):
672
+ s = 'go.Slice_int32 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
673
+ if len(self) < 120:
674
+ s += ', '.join(map(str, self)) + ']'
675
+ return s
676
+ def __repr__(self):
677
+ return 'go.Slice_int32([' + ', '.join(map(str, self)) + '])'
678
+ def __len__(self):
679
+ return _linksockslib.Slice_int32_len(self.handle)
680
+ def __getitem__(self, key):
681
+ if isinstance(key, slice):
682
+ if key.step == None or key.step == 1:
683
+ st = key.start
684
+ ed = key.stop
685
+ if st == None:
686
+ st = 0
687
+ if ed == None:
688
+ ed = _linksockslib.Slice_int32_len(self.handle)
689
+ return Slice_int32(handle=_linksockslib.Slice_int32_subslice(self.handle, st, ed))
690
+ return [self[ii] for ii in range(*key.indices(len(self)))]
691
+ elif isinstance(key, int):
692
+ if key < 0:
693
+ key += len(self)
694
+ if key < 0 or key >= len(self):
695
+ raise IndexError('slice index out of range')
696
+ return _linksockslib.Slice_int32_elem(self.handle, key)
697
+ else:
698
+ raise TypeError('slice index invalid type')
699
+ def __setitem__(self, idx, value):
700
+ if idx < 0:
701
+ idx += len(self)
702
+ if idx < len(self):
703
+ _linksockslib.Slice_int32_set(self.handle, idx, value)
704
+ return
705
+ raise IndexError('slice index out of range')
706
+ def __iadd__(self, value):
707
+ if not isinstance(value, _collections_abc.Iterable):
708
+ raise TypeError('Slice_int32.__iadd__ takes a sequence as argument')
709
+ for elt in value:
710
+ self.append(elt)
711
+ return self
712
+ def __iter__(self):
713
+ self.index = 0
714
+ return self
715
+ def __next__(self):
716
+ if self.index < len(self):
717
+ rv = _linksockslib.Slice_int32_elem(self.handle, self.index)
718
+ self.index = self.index + 1
719
+ return rv
720
+ raise StopIteration
721
+ def append(self, value):
722
+ _linksockslib.Slice_int32_append(self.handle, value)
723
+ def copy(self, src):
724
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
725
+ mx = min(len(self), len(src))
726
+ for i in range(mx):
727
+ self[i] = src[i]
728
+
729
+ # Python type for slice []int64
730
+ class Slice_int64(GoClass):
731
+ """"""
732
+ def __init__(self, *args, **kwargs):
733
+ """
734
+ handle=A Go-side object is always initialized with an explicit handle=arg
735
+ otherwise parameter is a python list that we copy from
736
+ """
737
+ self.index = 0
738
+ if len(kwargs) == 1 and 'handle' in kwargs:
739
+ self.handle = kwargs['handle']
740
+ _linksockslib.IncRef(self.handle)
741
+ elif len(args) == 1 and isinstance(args[0], GoClass):
742
+ self.handle = args[0].handle
743
+ _linksockslib.IncRef(self.handle)
744
+ else:
745
+ self.handle = _linksockslib.Slice_int64_CTor()
746
+ _linksockslib.IncRef(self.handle)
747
+ if len(args) > 0:
748
+ if not isinstance(args[0], _collections_abc.Iterable):
749
+ raise TypeError('Slice_int64.__init__ takes a sequence as argument')
750
+ for elt in args[0]:
751
+ self.append(elt)
752
+ def __del__(self):
753
+ _linksockslib.DecRef(self.handle)
754
+ def __str__(self):
755
+ s = 'go.Slice_int64 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
756
+ if len(self) < 120:
757
+ s += ', '.join(map(str, self)) + ']'
758
+ return s
759
+ def __repr__(self):
760
+ return 'go.Slice_int64([' + ', '.join(map(str, self)) + '])'
761
+ def __len__(self):
762
+ return _linksockslib.Slice_int64_len(self.handle)
763
+ def __getitem__(self, key):
764
+ if isinstance(key, slice):
765
+ if key.step == None or key.step == 1:
766
+ st = key.start
767
+ ed = key.stop
768
+ if st == None:
769
+ st = 0
770
+ if ed == None:
771
+ ed = _linksockslib.Slice_int64_len(self.handle)
772
+ return Slice_int64(handle=_linksockslib.Slice_int64_subslice(self.handle, st, ed))
773
+ return [self[ii] for ii in range(*key.indices(len(self)))]
774
+ elif isinstance(key, int):
775
+ if key < 0:
776
+ key += len(self)
777
+ if key < 0 or key >= len(self):
778
+ raise IndexError('slice index out of range')
779
+ return _linksockslib.Slice_int64_elem(self.handle, key)
780
+ else:
781
+ raise TypeError('slice index invalid type')
782
+ def __setitem__(self, idx, value):
783
+ if idx < 0:
784
+ idx += len(self)
785
+ if idx < len(self):
786
+ _linksockslib.Slice_int64_set(self.handle, idx, value)
787
+ return
788
+ raise IndexError('slice index out of range')
789
+ def __iadd__(self, value):
790
+ if not isinstance(value, _collections_abc.Iterable):
791
+ raise TypeError('Slice_int64.__iadd__ takes a sequence as argument')
792
+ for elt in value:
793
+ self.append(elt)
794
+ return self
795
+ def __iter__(self):
796
+ self.index = 0
797
+ return self
798
+ def __next__(self):
799
+ if self.index < len(self):
800
+ rv = _linksockslib.Slice_int64_elem(self.handle, self.index)
801
+ self.index = self.index + 1
802
+ return rv
803
+ raise StopIteration
804
+ def append(self, value):
805
+ _linksockslib.Slice_int64_append(self.handle, value)
806
+ def copy(self, src):
807
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
808
+ mx = min(len(self), len(src))
809
+ for i in range(mx):
810
+ self[i] = src[i]
811
+
812
+ # Python type for slice []int8
813
+ class Slice_int8(GoClass):
814
+ """"""
815
+ def __init__(self, *args, **kwargs):
816
+ """
817
+ handle=A Go-side object is always initialized with an explicit handle=arg
818
+ otherwise parameter is a python list that we copy from
819
+ """
820
+ self.index = 0
821
+ if len(kwargs) == 1 and 'handle' in kwargs:
822
+ self.handle = kwargs['handle']
823
+ _linksockslib.IncRef(self.handle)
824
+ elif len(args) == 1 and isinstance(args[0], GoClass):
825
+ self.handle = args[0].handle
826
+ _linksockslib.IncRef(self.handle)
827
+ else:
828
+ self.handle = _linksockslib.Slice_int8_CTor()
829
+ _linksockslib.IncRef(self.handle)
830
+ if len(args) > 0:
831
+ if not isinstance(args[0], _collections_abc.Iterable):
832
+ raise TypeError('Slice_int8.__init__ takes a sequence as argument')
833
+ for elt in args[0]:
834
+ self.append(elt)
835
+ def __del__(self):
836
+ _linksockslib.DecRef(self.handle)
837
+ def __str__(self):
838
+ s = 'go.Slice_int8 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
839
+ if len(self) < 120:
840
+ s += ', '.join(map(str, self)) + ']'
841
+ return s
842
+ def __repr__(self):
843
+ return 'go.Slice_int8([' + ', '.join(map(str, self)) + '])'
844
+ def __len__(self):
845
+ return _linksockslib.Slice_int8_len(self.handle)
846
+ def __getitem__(self, key):
847
+ if isinstance(key, slice):
848
+ if key.step == None or key.step == 1:
849
+ st = key.start
850
+ ed = key.stop
851
+ if st == None:
852
+ st = 0
853
+ if ed == None:
854
+ ed = _linksockslib.Slice_int8_len(self.handle)
855
+ return Slice_int8(handle=_linksockslib.Slice_int8_subslice(self.handle, st, ed))
856
+ return [self[ii] for ii in range(*key.indices(len(self)))]
857
+ elif isinstance(key, int):
858
+ if key < 0:
859
+ key += len(self)
860
+ if key < 0 or key >= len(self):
861
+ raise IndexError('slice index out of range')
862
+ return _linksockslib.Slice_int8_elem(self.handle, key)
863
+ else:
864
+ raise TypeError('slice index invalid type')
865
+ def __setitem__(self, idx, value):
866
+ if idx < 0:
867
+ idx += len(self)
868
+ if idx < len(self):
869
+ _linksockslib.Slice_int8_set(self.handle, idx, value)
870
+ return
871
+ raise IndexError('slice index out of range')
872
+ def __iadd__(self, value):
873
+ if not isinstance(value, _collections_abc.Iterable):
874
+ raise TypeError('Slice_int8.__iadd__ takes a sequence as argument')
875
+ for elt in value:
876
+ self.append(elt)
877
+ return self
878
+ def __iter__(self):
879
+ self.index = 0
880
+ return self
881
+ def __next__(self):
882
+ if self.index < len(self):
883
+ rv = _linksockslib.Slice_int8_elem(self.handle, self.index)
884
+ self.index = self.index + 1
885
+ return rv
886
+ raise StopIteration
887
+ def append(self, value):
888
+ _linksockslib.Slice_int8_append(self.handle, value)
889
+ def copy(self, src):
890
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
891
+ mx = min(len(self), len(src))
892
+ for i in range(mx):
893
+ self[i] = src[i]
894
+
895
+ # Python type for slice []rune
896
+ class Slice_rune(GoClass):
897
+ """"""
898
+ def __init__(self, *args, **kwargs):
899
+ """
900
+ handle=A Go-side object is always initialized with an explicit handle=arg
901
+ otherwise parameter is a python list that we copy from
902
+ """
903
+ self.index = 0
904
+ if len(kwargs) == 1 and 'handle' in kwargs:
905
+ self.handle = kwargs['handle']
906
+ _linksockslib.IncRef(self.handle)
907
+ elif len(args) == 1 and isinstance(args[0], GoClass):
908
+ self.handle = args[0].handle
909
+ _linksockslib.IncRef(self.handle)
910
+ else:
911
+ self.handle = _linksockslib.Slice_rune_CTor()
912
+ _linksockslib.IncRef(self.handle)
913
+ if len(args) > 0:
914
+ if not isinstance(args[0], _collections_abc.Iterable):
915
+ raise TypeError('Slice_rune.__init__ takes a sequence as argument')
916
+ for elt in args[0]:
917
+ self.append(elt)
918
+ def __del__(self):
919
+ _linksockslib.DecRef(self.handle)
920
+ def __str__(self):
921
+ s = 'go.Slice_rune len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
922
+ if len(self) < 120:
923
+ s += ', '.join(map(str, self)) + ']'
924
+ return s
925
+ def __repr__(self):
926
+ return 'go.Slice_rune([' + ', '.join(map(str, self)) + '])'
927
+ def __len__(self):
928
+ return _linksockslib.Slice_rune_len(self.handle)
929
+ def __getitem__(self, key):
930
+ if isinstance(key, slice):
931
+ if key.step == None or key.step == 1:
932
+ st = key.start
933
+ ed = key.stop
934
+ if st == None:
935
+ st = 0
936
+ if ed == None:
937
+ ed = _linksockslib.Slice_rune_len(self.handle)
938
+ return Slice_rune(handle=_linksockslib.Slice_rune_subslice(self.handle, st, ed))
939
+ return [self[ii] for ii in range(*key.indices(len(self)))]
940
+ elif isinstance(key, int):
941
+ if key < 0:
942
+ key += len(self)
943
+ if key < 0 or key >= len(self):
944
+ raise IndexError('slice index out of range')
945
+ return _linksockslib.Slice_rune_elem(self.handle, key)
946
+ else:
947
+ raise TypeError('slice index invalid type')
948
+ def __setitem__(self, idx, value):
949
+ if idx < 0:
950
+ idx += len(self)
951
+ if idx < len(self):
952
+ _linksockslib.Slice_rune_set(self.handle, idx, value)
953
+ return
954
+ raise IndexError('slice index out of range')
955
+ def __iadd__(self, value):
956
+ if not isinstance(value, _collections_abc.Iterable):
957
+ raise TypeError('Slice_rune.__iadd__ takes a sequence as argument')
958
+ for elt in value:
959
+ self.append(elt)
960
+ return self
961
+ def __iter__(self):
962
+ self.index = 0
963
+ return self
964
+ def __next__(self):
965
+ if self.index < len(self):
966
+ rv = _linksockslib.Slice_rune_elem(self.handle, self.index)
967
+ self.index = self.index + 1
968
+ return rv
969
+ raise StopIteration
970
+ def append(self, value):
971
+ _linksockslib.Slice_rune_append(self.handle, value)
972
+ def copy(self, src):
973
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
974
+ mx = min(len(self), len(src))
975
+ for i in range(mx):
976
+ self[i] = src[i]
977
+
978
+ # Python type for slice []string
979
+ class Slice_string(GoClass):
980
+ """"""
981
+ def __init__(self, *args, **kwargs):
982
+ """
983
+ handle=A Go-side object is always initialized with an explicit handle=arg
984
+ otherwise parameter is a python list that we copy from
985
+ """
986
+ self.index = 0
987
+ if len(kwargs) == 1 and 'handle' in kwargs:
988
+ self.handle = kwargs['handle']
989
+ _linksockslib.IncRef(self.handle)
990
+ elif len(args) == 1 and isinstance(args[0], GoClass):
991
+ self.handle = args[0].handle
992
+ _linksockslib.IncRef(self.handle)
993
+ else:
994
+ self.handle = _linksockslib.Slice_string_CTor()
995
+ _linksockslib.IncRef(self.handle)
996
+ if len(args) > 0:
997
+ if not isinstance(args[0], _collections_abc.Iterable):
998
+ raise TypeError('Slice_string.__init__ takes a sequence as argument')
999
+ for elt in args[0]:
1000
+ self.append(elt)
1001
+ def __del__(self):
1002
+ _linksockslib.DecRef(self.handle)
1003
+ def __str__(self):
1004
+ s = 'go.Slice_string len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
1005
+ if len(self) < 120:
1006
+ s += ', '.join(map(str, self)) + ']'
1007
+ return s
1008
+ def __repr__(self):
1009
+ return 'go.Slice_string([' + ', '.join(map(str, self)) + '])'
1010
+ def __len__(self):
1011
+ return _linksockslib.Slice_string_len(self.handle)
1012
+ def __getitem__(self, key):
1013
+ if isinstance(key, slice):
1014
+ if key.step == None or key.step == 1:
1015
+ st = key.start
1016
+ ed = key.stop
1017
+ if st == None:
1018
+ st = 0
1019
+ if ed == None:
1020
+ ed = _linksockslib.Slice_string_len(self.handle)
1021
+ return Slice_string(handle=_linksockslib.Slice_string_subslice(self.handle, st, ed))
1022
+ return [self[ii] for ii in range(*key.indices(len(self)))]
1023
+ elif isinstance(key, int):
1024
+ if key < 0:
1025
+ key += len(self)
1026
+ if key < 0 or key >= len(self):
1027
+ raise IndexError('slice index out of range')
1028
+ return _linksockslib.Slice_string_elem(self.handle, key)
1029
+ else:
1030
+ raise TypeError('slice index invalid type')
1031
+ def __setitem__(self, idx, value):
1032
+ if idx < 0:
1033
+ idx += len(self)
1034
+ if idx < len(self):
1035
+ _linksockslib.Slice_string_set(self.handle, idx, value)
1036
+ return
1037
+ raise IndexError('slice index out of range')
1038
+ def __iadd__(self, value):
1039
+ if not isinstance(value, _collections_abc.Iterable):
1040
+ raise TypeError('Slice_string.__iadd__ takes a sequence as argument')
1041
+ for elt in value:
1042
+ self.append(elt)
1043
+ return self
1044
+ def __iter__(self):
1045
+ self.index = 0
1046
+ return self
1047
+ def __next__(self):
1048
+ if self.index < len(self):
1049
+ rv = _linksockslib.Slice_string_elem(self.handle, self.index)
1050
+ self.index = self.index + 1
1051
+ return rv
1052
+ raise StopIteration
1053
+ def append(self, value):
1054
+ _linksockslib.Slice_string_append(self.handle, value)
1055
+ def copy(self, src):
1056
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
1057
+ mx = min(len(self), len(src))
1058
+ for i in range(mx):
1059
+ self[i] = src[i]
1060
+
1061
+ # Python type for slice []uint
1062
+ class Slice_uint(GoClass):
1063
+ """"""
1064
+ def __init__(self, *args, **kwargs):
1065
+ """
1066
+ handle=A Go-side object is always initialized with an explicit handle=arg
1067
+ otherwise parameter is a python list that we copy from
1068
+ """
1069
+ self.index = 0
1070
+ if len(kwargs) == 1 and 'handle' in kwargs:
1071
+ self.handle = kwargs['handle']
1072
+ _linksockslib.IncRef(self.handle)
1073
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1074
+ self.handle = args[0].handle
1075
+ _linksockslib.IncRef(self.handle)
1076
+ else:
1077
+ self.handle = _linksockslib.Slice_uint_CTor()
1078
+ _linksockslib.IncRef(self.handle)
1079
+ if len(args) > 0:
1080
+ if not isinstance(args[0], _collections_abc.Iterable):
1081
+ raise TypeError('Slice_uint.__init__ takes a sequence as argument')
1082
+ for elt in args[0]:
1083
+ self.append(elt)
1084
+ def __del__(self):
1085
+ _linksockslib.DecRef(self.handle)
1086
+ def __str__(self):
1087
+ s = 'go.Slice_uint len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
1088
+ if len(self) < 120:
1089
+ s += ', '.join(map(str, self)) + ']'
1090
+ return s
1091
+ def __repr__(self):
1092
+ return 'go.Slice_uint([' + ', '.join(map(str, self)) + '])'
1093
+ def __len__(self):
1094
+ return _linksockslib.Slice_uint_len(self.handle)
1095
+ def __getitem__(self, key):
1096
+ if isinstance(key, slice):
1097
+ if key.step == None or key.step == 1:
1098
+ st = key.start
1099
+ ed = key.stop
1100
+ if st == None:
1101
+ st = 0
1102
+ if ed == None:
1103
+ ed = _linksockslib.Slice_uint_len(self.handle)
1104
+ return Slice_uint(handle=_linksockslib.Slice_uint_subslice(self.handle, st, ed))
1105
+ return [self[ii] for ii in range(*key.indices(len(self)))]
1106
+ elif isinstance(key, int):
1107
+ if key < 0:
1108
+ key += len(self)
1109
+ if key < 0 or key >= len(self):
1110
+ raise IndexError('slice index out of range')
1111
+ return _linksockslib.Slice_uint_elem(self.handle, key)
1112
+ else:
1113
+ raise TypeError('slice index invalid type')
1114
+ def __setitem__(self, idx, value):
1115
+ if idx < 0:
1116
+ idx += len(self)
1117
+ if idx < len(self):
1118
+ _linksockslib.Slice_uint_set(self.handle, idx, value)
1119
+ return
1120
+ raise IndexError('slice index out of range')
1121
+ def __iadd__(self, value):
1122
+ if not isinstance(value, _collections_abc.Iterable):
1123
+ raise TypeError('Slice_uint.__iadd__ takes a sequence as argument')
1124
+ for elt in value:
1125
+ self.append(elt)
1126
+ return self
1127
+ def __iter__(self):
1128
+ self.index = 0
1129
+ return self
1130
+ def __next__(self):
1131
+ if self.index < len(self):
1132
+ rv = _linksockslib.Slice_uint_elem(self.handle, self.index)
1133
+ self.index = self.index + 1
1134
+ return rv
1135
+ raise StopIteration
1136
+ def append(self, value):
1137
+ _linksockslib.Slice_uint_append(self.handle, value)
1138
+ def copy(self, src):
1139
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
1140
+ mx = min(len(self), len(src))
1141
+ for i in range(mx):
1142
+ self[i] = src[i]
1143
+
1144
+ # Python type for slice []uint16
1145
+ class Slice_uint16(GoClass):
1146
+ """"""
1147
+ def __init__(self, *args, **kwargs):
1148
+ """
1149
+ handle=A Go-side object is always initialized with an explicit handle=arg
1150
+ otherwise parameter is a python list that we copy from
1151
+ """
1152
+ self.index = 0
1153
+ if len(kwargs) == 1 and 'handle' in kwargs:
1154
+ self.handle = kwargs['handle']
1155
+ _linksockslib.IncRef(self.handle)
1156
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1157
+ self.handle = args[0].handle
1158
+ _linksockslib.IncRef(self.handle)
1159
+ else:
1160
+ self.handle = _linksockslib.Slice_uint16_CTor()
1161
+ _linksockslib.IncRef(self.handle)
1162
+ if len(args) > 0:
1163
+ if not isinstance(args[0], _collections_abc.Iterable):
1164
+ raise TypeError('Slice_uint16.__init__ takes a sequence as argument')
1165
+ for elt in args[0]:
1166
+ self.append(elt)
1167
+ def __del__(self):
1168
+ _linksockslib.DecRef(self.handle)
1169
+ def __str__(self):
1170
+ s = 'go.Slice_uint16 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
1171
+ if len(self) < 120:
1172
+ s += ', '.join(map(str, self)) + ']'
1173
+ return s
1174
+ def __repr__(self):
1175
+ return 'go.Slice_uint16([' + ', '.join(map(str, self)) + '])'
1176
+ def __len__(self):
1177
+ return _linksockslib.Slice_uint16_len(self.handle)
1178
+ def __getitem__(self, key):
1179
+ if isinstance(key, slice):
1180
+ if key.step == None or key.step == 1:
1181
+ st = key.start
1182
+ ed = key.stop
1183
+ if st == None:
1184
+ st = 0
1185
+ if ed == None:
1186
+ ed = _linksockslib.Slice_uint16_len(self.handle)
1187
+ return Slice_uint16(handle=_linksockslib.Slice_uint16_subslice(self.handle, st, ed))
1188
+ return [self[ii] for ii in range(*key.indices(len(self)))]
1189
+ elif isinstance(key, int):
1190
+ if key < 0:
1191
+ key += len(self)
1192
+ if key < 0 or key >= len(self):
1193
+ raise IndexError('slice index out of range')
1194
+ return _linksockslib.Slice_uint16_elem(self.handle, key)
1195
+ else:
1196
+ raise TypeError('slice index invalid type')
1197
+ def __setitem__(self, idx, value):
1198
+ if idx < 0:
1199
+ idx += len(self)
1200
+ if idx < len(self):
1201
+ _linksockslib.Slice_uint16_set(self.handle, idx, value)
1202
+ return
1203
+ raise IndexError('slice index out of range')
1204
+ def __iadd__(self, value):
1205
+ if not isinstance(value, _collections_abc.Iterable):
1206
+ raise TypeError('Slice_uint16.__iadd__ takes a sequence as argument')
1207
+ for elt in value:
1208
+ self.append(elt)
1209
+ return self
1210
+ def __iter__(self):
1211
+ self.index = 0
1212
+ return self
1213
+ def __next__(self):
1214
+ if self.index < len(self):
1215
+ rv = _linksockslib.Slice_uint16_elem(self.handle, self.index)
1216
+ self.index = self.index + 1
1217
+ return rv
1218
+ raise StopIteration
1219
+ def append(self, value):
1220
+ _linksockslib.Slice_uint16_append(self.handle, value)
1221
+ def copy(self, src):
1222
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
1223
+ mx = min(len(self), len(src))
1224
+ for i in range(mx):
1225
+ self[i] = src[i]
1226
+
1227
+ # Python type for slice []uint32
1228
+ class Slice_uint32(GoClass):
1229
+ """"""
1230
+ def __init__(self, *args, **kwargs):
1231
+ """
1232
+ handle=A Go-side object is always initialized with an explicit handle=arg
1233
+ otherwise parameter is a python list that we copy from
1234
+ """
1235
+ self.index = 0
1236
+ if len(kwargs) == 1 and 'handle' in kwargs:
1237
+ self.handle = kwargs['handle']
1238
+ _linksockslib.IncRef(self.handle)
1239
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1240
+ self.handle = args[0].handle
1241
+ _linksockslib.IncRef(self.handle)
1242
+ else:
1243
+ self.handle = _linksockslib.Slice_uint32_CTor()
1244
+ _linksockslib.IncRef(self.handle)
1245
+ if len(args) > 0:
1246
+ if not isinstance(args[0], _collections_abc.Iterable):
1247
+ raise TypeError('Slice_uint32.__init__ takes a sequence as argument')
1248
+ for elt in args[0]:
1249
+ self.append(elt)
1250
+ def __del__(self):
1251
+ _linksockslib.DecRef(self.handle)
1252
+ def __str__(self):
1253
+ s = 'go.Slice_uint32 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
1254
+ if len(self) < 120:
1255
+ s += ', '.join(map(str, self)) + ']'
1256
+ return s
1257
+ def __repr__(self):
1258
+ return 'go.Slice_uint32([' + ', '.join(map(str, self)) + '])'
1259
+ def __len__(self):
1260
+ return _linksockslib.Slice_uint32_len(self.handle)
1261
+ def __getitem__(self, key):
1262
+ if isinstance(key, slice):
1263
+ if key.step == None or key.step == 1:
1264
+ st = key.start
1265
+ ed = key.stop
1266
+ if st == None:
1267
+ st = 0
1268
+ if ed == None:
1269
+ ed = _linksockslib.Slice_uint32_len(self.handle)
1270
+ return Slice_uint32(handle=_linksockslib.Slice_uint32_subslice(self.handle, st, ed))
1271
+ return [self[ii] for ii in range(*key.indices(len(self)))]
1272
+ elif isinstance(key, int):
1273
+ if key < 0:
1274
+ key += len(self)
1275
+ if key < 0 or key >= len(self):
1276
+ raise IndexError('slice index out of range')
1277
+ return _linksockslib.Slice_uint32_elem(self.handle, key)
1278
+ else:
1279
+ raise TypeError('slice index invalid type')
1280
+ def __setitem__(self, idx, value):
1281
+ if idx < 0:
1282
+ idx += len(self)
1283
+ if idx < len(self):
1284
+ _linksockslib.Slice_uint32_set(self.handle, idx, value)
1285
+ return
1286
+ raise IndexError('slice index out of range')
1287
+ def __iadd__(self, value):
1288
+ if not isinstance(value, _collections_abc.Iterable):
1289
+ raise TypeError('Slice_uint32.__iadd__ takes a sequence as argument')
1290
+ for elt in value:
1291
+ self.append(elt)
1292
+ return self
1293
+ def __iter__(self):
1294
+ self.index = 0
1295
+ return self
1296
+ def __next__(self):
1297
+ if self.index < len(self):
1298
+ rv = _linksockslib.Slice_uint32_elem(self.handle, self.index)
1299
+ self.index = self.index + 1
1300
+ return rv
1301
+ raise StopIteration
1302
+ def append(self, value):
1303
+ _linksockslib.Slice_uint32_append(self.handle, value)
1304
+ def copy(self, src):
1305
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
1306
+ mx = min(len(self), len(src))
1307
+ for i in range(mx):
1308
+ self[i] = src[i]
1309
+
1310
+ # Python type for slice []uint64
1311
+ class Slice_uint64(GoClass):
1312
+ """"""
1313
+ def __init__(self, *args, **kwargs):
1314
+ """
1315
+ handle=A Go-side object is always initialized with an explicit handle=arg
1316
+ otherwise parameter is a python list that we copy from
1317
+ """
1318
+ self.index = 0
1319
+ if len(kwargs) == 1 and 'handle' in kwargs:
1320
+ self.handle = kwargs['handle']
1321
+ _linksockslib.IncRef(self.handle)
1322
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1323
+ self.handle = args[0].handle
1324
+ _linksockslib.IncRef(self.handle)
1325
+ else:
1326
+ self.handle = _linksockslib.Slice_uint64_CTor()
1327
+ _linksockslib.IncRef(self.handle)
1328
+ if len(args) > 0:
1329
+ if not isinstance(args[0], _collections_abc.Iterable):
1330
+ raise TypeError('Slice_uint64.__init__ takes a sequence as argument')
1331
+ for elt in args[0]:
1332
+ self.append(elt)
1333
+ def __del__(self):
1334
+ _linksockslib.DecRef(self.handle)
1335
+ def __str__(self):
1336
+ s = 'go.Slice_uint64 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
1337
+ if len(self) < 120:
1338
+ s += ', '.join(map(str, self)) + ']'
1339
+ return s
1340
+ def __repr__(self):
1341
+ return 'go.Slice_uint64([' + ', '.join(map(str, self)) + '])'
1342
+ def __len__(self):
1343
+ return _linksockslib.Slice_uint64_len(self.handle)
1344
+ def __getitem__(self, key):
1345
+ if isinstance(key, slice):
1346
+ if key.step == None or key.step == 1:
1347
+ st = key.start
1348
+ ed = key.stop
1349
+ if st == None:
1350
+ st = 0
1351
+ if ed == None:
1352
+ ed = _linksockslib.Slice_uint64_len(self.handle)
1353
+ return Slice_uint64(handle=_linksockslib.Slice_uint64_subslice(self.handle, st, ed))
1354
+ return [self[ii] for ii in range(*key.indices(len(self)))]
1355
+ elif isinstance(key, int):
1356
+ if key < 0:
1357
+ key += len(self)
1358
+ if key < 0 or key >= len(self):
1359
+ raise IndexError('slice index out of range')
1360
+ return _linksockslib.Slice_uint64_elem(self.handle, key)
1361
+ else:
1362
+ raise TypeError('slice index invalid type')
1363
+ def __setitem__(self, idx, value):
1364
+ if idx < 0:
1365
+ idx += len(self)
1366
+ if idx < len(self):
1367
+ _linksockslib.Slice_uint64_set(self.handle, idx, value)
1368
+ return
1369
+ raise IndexError('slice index out of range')
1370
+ def __iadd__(self, value):
1371
+ if not isinstance(value, _collections_abc.Iterable):
1372
+ raise TypeError('Slice_uint64.__iadd__ takes a sequence as argument')
1373
+ for elt in value:
1374
+ self.append(elt)
1375
+ return self
1376
+ def __iter__(self):
1377
+ self.index = 0
1378
+ return self
1379
+ def __next__(self):
1380
+ if self.index < len(self):
1381
+ rv = _linksockslib.Slice_uint64_elem(self.handle, self.index)
1382
+ self.index = self.index + 1
1383
+ return rv
1384
+ raise StopIteration
1385
+ def append(self, value):
1386
+ _linksockslib.Slice_uint64_append(self.handle, value)
1387
+ def copy(self, src):
1388
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
1389
+ mx = min(len(self), len(src))
1390
+ for i in range(mx):
1391
+ self[i] = src[i]
1392
+
1393
+ # Python type for slice []uint8
1394
+ class Slice_uint8(GoClass):
1395
+ """"""
1396
+ def __init__(self, *args, **kwargs):
1397
+ """
1398
+ handle=A Go-side object is always initialized with an explicit handle=arg
1399
+ otherwise parameter is a python list that we copy from
1400
+ """
1401
+ self.index = 0
1402
+ if len(kwargs) == 1 and 'handle' in kwargs:
1403
+ self.handle = kwargs['handle']
1404
+ _linksockslib.IncRef(self.handle)
1405
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1406
+ self.handle = args[0].handle
1407
+ _linksockslib.IncRef(self.handle)
1408
+ else:
1409
+ self.handle = _linksockslib.Slice_uint8_CTor()
1410
+ _linksockslib.IncRef(self.handle)
1411
+ if len(args) > 0:
1412
+ if not isinstance(args[0], _collections_abc.Iterable):
1413
+ raise TypeError('Slice_uint8.__init__ takes a sequence as argument')
1414
+ for elt in args[0]:
1415
+ self.append(elt)
1416
+ def __del__(self):
1417
+ _linksockslib.DecRef(self.handle)
1418
+ def __str__(self):
1419
+ s = 'go.Slice_uint8 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
1420
+ if len(self) < 120:
1421
+ s += ', '.join(map(str, self)) + ']'
1422
+ return s
1423
+ def __repr__(self):
1424
+ return 'go.Slice_uint8([' + ', '.join(map(str, self)) + '])'
1425
+ def __len__(self):
1426
+ return _linksockslib.Slice_uint8_len(self.handle)
1427
+ def __getitem__(self, key):
1428
+ if isinstance(key, slice):
1429
+ if key.step == None or key.step == 1:
1430
+ st = key.start
1431
+ ed = key.stop
1432
+ if st == None:
1433
+ st = 0
1434
+ if ed == None:
1435
+ ed = _linksockslib.Slice_uint8_len(self.handle)
1436
+ return Slice_uint8(handle=_linksockslib.Slice_uint8_subslice(self.handle, st, ed))
1437
+ return [self[ii] for ii in range(*key.indices(len(self)))]
1438
+ elif isinstance(key, int):
1439
+ if key < 0:
1440
+ key += len(self)
1441
+ if key < 0 or key >= len(self):
1442
+ raise IndexError('slice index out of range')
1443
+ return _linksockslib.Slice_uint8_elem(self.handle, key)
1444
+ else:
1445
+ raise TypeError('slice index invalid type')
1446
+ def __setitem__(self, idx, value):
1447
+ if idx < 0:
1448
+ idx += len(self)
1449
+ if idx < len(self):
1450
+ _linksockslib.Slice_uint8_set(self.handle, idx, value)
1451
+ return
1452
+ raise IndexError('slice index out of range')
1453
+ def __iadd__(self, value):
1454
+ if not isinstance(value, _collections_abc.Iterable):
1455
+ raise TypeError('Slice_uint8.__iadd__ takes a sequence as argument')
1456
+ for elt in value:
1457
+ self.append(elt)
1458
+ return self
1459
+ def __iter__(self):
1460
+ self.index = 0
1461
+ return self
1462
+ def __next__(self):
1463
+ if self.index < len(self):
1464
+ rv = _linksockslib.Slice_uint8_elem(self.handle, self.index)
1465
+ self.index = self.index + 1
1466
+ return rv
1467
+ raise StopIteration
1468
+ def append(self, value):
1469
+ _linksockslib.Slice_uint8_append(self.handle, value)
1470
+ def copy(self, src):
1471
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
1472
+ mx = min(len(self), len(src))
1473
+ for i in range(mx):
1474
+ self[i] = src[i]
1475
+
1476
+ # ---- External Types Outside of Targeted Packages ---
1477
+
1478
+ # Python type for *tls.ConnectionState
1479
+ class Ptr_tls_ConnectionState(GoClass):
1480
+ """"""
1481
+ def __init__(self, *args, **kwargs):
1482
+ """
1483
+ handle=A Go-side object is always initialized with an explicit handle=arg
1484
+ """
1485
+ if len(kwargs) == 1 and 'handle' in kwargs:
1486
+ self.handle = kwargs['handle']
1487
+ _linksockslib.IncRef(self.handle)
1488
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1489
+ self.handle = args[0].handle
1490
+ _linksockslib.IncRef(self.handle)
1491
+ elif len(args) == 1 and isinstance(args[0], int):
1492
+ self.handle = args[0]
1493
+ _linksockslib.IncRef(self.handle)
1494
+ else:
1495
+ self.handle = 0
1496
+ def __del__(self):
1497
+ _linksockslib.DecRef(self.handle)
1498
+
1499
+
1500
+ # Python type for *x509.CertPool
1501
+ class Ptr_x509_CertPool(GoClass):
1502
+ """"""
1503
+ def __init__(self, *args, **kwargs):
1504
+ """
1505
+ handle=A Go-side object is always initialized with an explicit handle=arg
1506
+ """
1507
+ if len(kwargs) == 1 and 'handle' in kwargs:
1508
+ self.handle = kwargs['handle']
1509
+ _linksockslib.IncRef(self.handle)
1510
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1511
+ self.handle = args[0].handle
1512
+ _linksockslib.IncRef(self.handle)
1513
+ elif len(args) == 1 and isinstance(args[0], int):
1514
+ self.handle = args[0]
1515
+ _linksockslib.IncRef(self.handle)
1516
+ else:
1517
+ self.handle = 0
1518
+ def __del__(self):
1519
+ _linksockslib.DecRef(self.handle)
1520
+
1521
+
1522
+ # Python type for *x509.Certificate
1523
+ class Ptr_x509_Certificate(GoClass):
1524
+ """"""
1525
+ def __init__(self, *args, **kwargs):
1526
+ """
1527
+ handle=A Go-side object is always initialized with an explicit handle=arg
1528
+ """
1529
+ if len(kwargs) == 1 and 'handle' in kwargs:
1530
+ self.handle = kwargs['handle']
1531
+ _linksockslib.IncRef(self.handle)
1532
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1533
+ self.handle = args[0].handle
1534
+ _linksockslib.IncRef(self.handle)
1535
+ elif len(args) == 1 and isinstance(args[0], int):
1536
+ self.handle = args[0]
1537
+ _linksockslib.IncRef(self.handle)
1538
+ else:
1539
+ self.handle = 0
1540
+ def __del__(self):
1541
+ _linksockslib.DecRef(self.handle)
1542
+
1543
+
1544
+ # Python type for *pkix.CertificateList
1545
+ class Ptr_pkix_CertificateList(GoClass):
1546
+ """"""
1547
+ def __init__(self, *args, **kwargs):
1548
+ """
1549
+ handle=A Go-side object is always initialized with an explicit handle=arg
1550
+ """
1551
+ if len(kwargs) == 1 and 'handle' in kwargs:
1552
+ self.handle = kwargs['handle']
1553
+ _linksockslib.IncRef(self.handle)
1554
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1555
+ self.handle = args[0].handle
1556
+ _linksockslib.IncRef(self.handle)
1557
+ elif len(args) == 1 and isinstance(args[0], int):
1558
+ self.handle = args[0]
1559
+ _linksockslib.IncRef(self.handle)
1560
+ else:
1561
+ self.handle = 0
1562
+ def __del__(self):
1563
+ _linksockslib.DecRef(self.handle)
1564
+
1565
+
1566
+ # Python type for *websocket.Conn
1567
+ class Ptr_websocket_Conn(GoClass):
1568
+ """"""
1569
+ def __init__(self, *args, **kwargs):
1570
+ """
1571
+ handle=A Go-side object is always initialized with an explicit handle=arg
1572
+ """
1573
+ if len(kwargs) == 1 and 'handle' in kwargs:
1574
+ self.handle = kwargs['handle']
1575
+ _linksockslib.IncRef(self.handle)
1576
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1577
+ self.handle = args[0].handle
1578
+ _linksockslib.IncRef(self.handle)
1579
+ elif len(args) == 1 and isinstance(args[0], int):
1580
+ self.handle = args[0]
1581
+ _linksockslib.IncRef(self.handle)
1582
+ else:
1583
+ self.handle = 0
1584
+ def __del__(self):
1585
+ _linksockslib.DecRef(self.handle)
1586
+
1587
+
1588
+ # Python type for *websocket.PreparedMessage
1589
+ class Ptr_websocket_PreparedMessage(GoClass):
1590
+ """"""
1591
+ def __init__(self, *args, **kwargs):
1592
+ """
1593
+ handle=A Go-side object is always initialized with an explicit handle=arg
1594
+ """
1595
+ if len(kwargs) == 1 and 'handle' in kwargs:
1596
+ self.handle = kwargs['handle']
1597
+ _linksockslib.IncRef(self.handle)
1598
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1599
+ self.handle = args[0].handle
1600
+ _linksockslib.IncRef(self.handle)
1601
+ elif len(args) == 1 and isinstance(args[0], int):
1602
+ self.handle = args[0]
1603
+ _linksockslib.IncRef(self.handle)
1604
+ else:
1605
+ self.handle = 0
1606
+ def __del__(self):
1607
+ _linksockslib.DecRef(self.handle)
1608
+
1609
+
1610
+ # Python type for *zerolog.Event
1611
+ class Ptr_zerolog_Event(GoClass):
1612
+ """"""
1613
+ def __init__(self, *args, **kwargs):
1614
+ """
1615
+ handle=A Go-side object is always initialized with an explicit handle=arg
1616
+ """
1617
+ if len(kwargs) == 1 and 'handle' in kwargs:
1618
+ self.handle = kwargs['handle']
1619
+ _linksockslib.IncRef(self.handle)
1620
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1621
+ self.handle = args[0].handle
1622
+ _linksockslib.IncRef(self.handle)
1623
+ elif len(args) == 1 and isinstance(args[0], int):
1624
+ self.handle = args[0]
1625
+ _linksockslib.IncRef(self.handle)
1626
+ else:
1627
+ self.handle = 0
1628
+ def __del__(self):
1629
+ _linksockslib.DecRef(self.handle)
1630
+
1631
+
1632
+ # Python type for *zerolog.Logger
1633
+ class Ptr_zerolog_Logger(GoClass):
1634
+ """"""
1635
+ def __init__(self, *args, **kwargs):
1636
+ """
1637
+ handle=A Go-side object is always initialized with an explicit handle=arg
1638
+ """
1639
+ if len(kwargs) == 1 and 'handle' in kwargs:
1640
+ self.handle = kwargs['handle']
1641
+ _linksockslib.IncRef(self.handle)
1642
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1643
+ self.handle = args[0].handle
1644
+ _linksockslib.IncRef(self.handle)
1645
+ elif len(args) == 1 and isinstance(args[0], int):
1646
+ self.handle = args[0]
1647
+ _linksockslib.IncRef(self.handle)
1648
+ else:
1649
+ self.handle = 0
1650
+ def __del__(self):
1651
+ _linksockslib.DecRef(self.handle)
1652
+
1653
+
1654
+ # Python type for *big.Int
1655
+ class Ptr_big_Int(GoClass):
1656
+ """"""
1657
+ def __init__(self, *args, **kwargs):
1658
+ """
1659
+ handle=A Go-side object is always initialized with an explicit handle=arg
1660
+ """
1661
+ if len(kwargs) == 1 and 'handle' in kwargs:
1662
+ self.handle = kwargs['handle']
1663
+ _linksockslib.IncRef(self.handle)
1664
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1665
+ self.handle = args[0].handle
1666
+ _linksockslib.IncRef(self.handle)
1667
+ elif len(args) == 1 and isinstance(args[0], int):
1668
+ self.handle = args[0]
1669
+ _linksockslib.IncRef(self.handle)
1670
+ else:
1671
+ self.handle = 0
1672
+ def __del__(self):
1673
+ _linksockslib.DecRef(self.handle)
1674
+
1675
+
1676
+ # Python type for *rand.Rand
1677
+ class Ptr_rand_Rand(GoClass):
1678
+ """"""
1679
+ def __init__(self, *args, **kwargs):
1680
+ """
1681
+ handle=A Go-side object is always initialized with an explicit handle=arg
1682
+ """
1683
+ if len(kwargs) == 1 and 'handle' in kwargs:
1684
+ self.handle = kwargs['handle']
1685
+ _linksockslib.IncRef(self.handle)
1686
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1687
+ self.handle = args[0].handle
1688
+ _linksockslib.IncRef(self.handle)
1689
+ elif len(args) == 1 and isinstance(args[0], int):
1690
+ self.handle = args[0]
1691
+ _linksockslib.IncRef(self.handle)
1692
+ else:
1693
+ self.handle = 0
1694
+ def __del__(self):
1695
+ _linksockslib.DecRef(self.handle)
1696
+
1697
+
1698
+ # Python type for *multipart.FileHeader
1699
+ class Ptr_multipart_FileHeader(GoClass):
1700
+ """"""
1701
+ def __init__(self, *args, **kwargs):
1702
+ """
1703
+ handle=A Go-side object is always initialized with an explicit handle=arg
1704
+ """
1705
+ if len(kwargs) == 1 and 'handle' in kwargs:
1706
+ self.handle = kwargs['handle']
1707
+ _linksockslib.IncRef(self.handle)
1708
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1709
+ self.handle = args[0].handle
1710
+ _linksockslib.IncRef(self.handle)
1711
+ elif len(args) == 1 and isinstance(args[0], int):
1712
+ self.handle = args[0]
1713
+ _linksockslib.IncRef(self.handle)
1714
+ else:
1715
+ self.handle = 0
1716
+ def __del__(self):
1717
+ _linksockslib.DecRef(self.handle)
1718
+
1719
+
1720
+ # Python type for *multipart.Form
1721
+ class Ptr_multipart_Form(GoClass):
1722
+ """"""
1723
+ def __init__(self, *args, **kwargs):
1724
+ """
1725
+ handle=A Go-side object is always initialized with an explicit handle=arg
1726
+ """
1727
+ if len(kwargs) == 1 and 'handle' in kwargs:
1728
+ self.handle = kwargs['handle']
1729
+ _linksockslib.IncRef(self.handle)
1730
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1731
+ self.handle = args[0].handle
1732
+ _linksockslib.IncRef(self.handle)
1733
+ elif len(args) == 1 and isinstance(args[0], int):
1734
+ self.handle = args[0]
1735
+ _linksockslib.IncRef(self.handle)
1736
+ else:
1737
+ self.handle = 0
1738
+ def __del__(self):
1739
+ _linksockslib.DecRef(self.handle)
1740
+
1741
+
1742
+ # Python type for *multipart.Part
1743
+ class Ptr_multipart_Part(GoClass):
1744
+ """"""
1745
+ def __init__(self, *args, **kwargs):
1746
+ """
1747
+ handle=A Go-side object is always initialized with an explicit handle=arg
1748
+ """
1749
+ if len(kwargs) == 1 and 'handle' in kwargs:
1750
+ self.handle = kwargs['handle']
1751
+ _linksockslib.IncRef(self.handle)
1752
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1753
+ self.handle = args[0].handle
1754
+ _linksockslib.IncRef(self.handle)
1755
+ elif len(args) == 1 and isinstance(args[0], int):
1756
+ self.handle = args[0]
1757
+ _linksockslib.IncRef(self.handle)
1758
+ else:
1759
+ self.handle = 0
1760
+ def __del__(self):
1761
+ _linksockslib.DecRef(self.handle)
1762
+
1763
+
1764
+ # Python type for *multipart.Reader
1765
+ class Ptr_multipart_Reader(GoClass):
1766
+ """"""
1767
+ def __init__(self, *args, **kwargs):
1768
+ """
1769
+ handle=A Go-side object is always initialized with an explicit handle=arg
1770
+ """
1771
+ if len(kwargs) == 1 and 'handle' in kwargs:
1772
+ self.handle = kwargs['handle']
1773
+ _linksockslib.IncRef(self.handle)
1774
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1775
+ self.handle = args[0].handle
1776
+ _linksockslib.IncRef(self.handle)
1777
+ elif len(args) == 1 and isinstance(args[0], int):
1778
+ self.handle = args[0]
1779
+ _linksockslib.IncRef(self.handle)
1780
+ else:
1781
+ self.handle = 0
1782
+ def __del__(self):
1783
+ _linksockslib.DecRef(self.handle)
1784
+
1785
+
1786
+ # Python type for *net.IPNet
1787
+ class Ptr_net_IPNet(GoClass):
1788
+ """"""
1789
+ def __init__(self, *args, **kwargs):
1790
+ """
1791
+ handle=A Go-side object is always initialized with an explicit handle=arg
1792
+ """
1793
+ if len(kwargs) == 1 and 'handle' in kwargs:
1794
+ self.handle = kwargs['handle']
1795
+ _linksockslib.IncRef(self.handle)
1796
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1797
+ self.handle = args[0].handle
1798
+ _linksockslib.IncRef(self.handle)
1799
+ elif len(args) == 1 and isinstance(args[0], int):
1800
+ self.handle = args[0]
1801
+ _linksockslib.IncRef(self.handle)
1802
+ else:
1803
+ self.handle = 0
1804
+ def __del__(self):
1805
+ _linksockslib.DecRef(self.handle)
1806
+
1807
+
1808
+ # Python type for *net.UDPAddr
1809
+ class Ptr_net_UDPAddr(GoClass):
1810
+ """"""
1811
+ def __init__(self, *args, **kwargs):
1812
+ """
1813
+ handle=A Go-side object is always initialized with an explicit handle=arg
1814
+ """
1815
+ if len(kwargs) == 1 and 'handle' in kwargs:
1816
+ self.handle = kwargs['handle']
1817
+ _linksockslib.IncRef(self.handle)
1818
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1819
+ self.handle = args[0].handle
1820
+ _linksockslib.IncRef(self.handle)
1821
+ elif len(args) == 1 and isinstance(args[0], int):
1822
+ self.handle = args[0]
1823
+ _linksockslib.IncRef(self.handle)
1824
+ else:
1825
+ self.handle = 0
1826
+ def __del__(self):
1827
+ _linksockslib.DecRef(self.handle)
1828
+
1829
+
1830
+ # Python type for *net.UDPConn
1831
+ class Ptr_net_UDPConn(GoClass):
1832
+ """"""
1833
+ def __init__(self, *args, **kwargs):
1834
+ """
1835
+ handle=A Go-side object is always initialized with an explicit handle=arg
1836
+ """
1837
+ if len(kwargs) == 1 and 'handle' in kwargs:
1838
+ self.handle = kwargs['handle']
1839
+ _linksockslib.IncRef(self.handle)
1840
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1841
+ self.handle = args[0].handle
1842
+ _linksockslib.IncRef(self.handle)
1843
+ elif len(args) == 1 and isinstance(args[0], int):
1844
+ self.handle = args[0]
1845
+ _linksockslib.IncRef(self.handle)
1846
+ else:
1847
+ self.handle = 0
1848
+ def __del__(self):
1849
+ _linksockslib.DecRef(self.handle)
1850
+
1851
+
1852
+ # Python type for *http.Cookie
1853
+ class Ptr_http_Cookie(GoClass):
1854
+ """"""
1855
+ def __init__(self, *args, **kwargs):
1856
+ """
1857
+ handle=A Go-side object is always initialized with an explicit handle=arg
1858
+ """
1859
+ if len(kwargs) == 1 and 'handle' in kwargs:
1860
+ self.handle = kwargs['handle']
1861
+ _linksockslib.IncRef(self.handle)
1862
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1863
+ self.handle = args[0].handle
1864
+ _linksockslib.IncRef(self.handle)
1865
+ elif len(args) == 1 and isinstance(args[0], int):
1866
+ self.handle = args[0]
1867
+ _linksockslib.IncRef(self.handle)
1868
+ else:
1869
+ self.handle = 0
1870
+ def __del__(self):
1871
+ _linksockslib.DecRef(self.handle)
1872
+
1873
+
1874
+ # Python type for *http.Request
1875
+ class Ptr_http_Request(GoClass):
1876
+ """"""
1877
+ def __init__(self, *args, **kwargs):
1878
+ """
1879
+ handle=A Go-side object is always initialized with an explicit handle=arg
1880
+ """
1881
+ if len(kwargs) == 1 and 'handle' in kwargs:
1882
+ self.handle = kwargs['handle']
1883
+ _linksockslib.IncRef(self.handle)
1884
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1885
+ self.handle = args[0].handle
1886
+ _linksockslib.IncRef(self.handle)
1887
+ elif len(args) == 1 and isinstance(args[0], int):
1888
+ self.handle = args[0]
1889
+ _linksockslib.IncRef(self.handle)
1890
+ else:
1891
+ self.handle = 0
1892
+ def __del__(self):
1893
+ _linksockslib.DecRef(self.handle)
1894
+
1895
+
1896
+ # Python type for *http.Response
1897
+ class Ptr_http_Response(GoClass):
1898
+ """"""
1899
+ def __init__(self, *args, **kwargs):
1900
+ """
1901
+ handle=A Go-side object is always initialized with an explicit handle=arg
1902
+ """
1903
+ if len(kwargs) == 1 and 'handle' in kwargs:
1904
+ self.handle = kwargs['handle']
1905
+ _linksockslib.IncRef(self.handle)
1906
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1907
+ self.handle = args[0].handle
1908
+ _linksockslib.IncRef(self.handle)
1909
+ elif len(args) == 1 and isinstance(args[0], int):
1910
+ self.handle = args[0]
1911
+ _linksockslib.IncRef(self.handle)
1912
+ else:
1913
+ self.handle = 0
1914
+ def __del__(self):
1915
+ _linksockslib.DecRef(self.handle)
1916
+
1917
+
1918
+ # Python type for *http.ServeMux
1919
+ class Ptr_http_ServeMux(GoClass):
1920
+ """"""
1921
+ def __init__(self, *args, **kwargs):
1922
+ """
1923
+ handle=A Go-side object is always initialized with an explicit handle=arg
1924
+ """
1925
+ if len(kwargs) == 1 and 'handle' in kwargs:
1926
+ self.handle = kwargs['handle']
1927
+ _linksockslib.IncRef(self.handle)
1928
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1929
+ self.handle = args[0].handle
1930
+ _linksockslib.IncRef(self.handle)
1931
+ elif len(args) == 1 and isinstance(args[0], int):
1932
+ self.handle = args[0]
1933
+ _linksockslib.IncRef(self.handle)
1934
+ else:
1935
+ self.handle = 0
1936
+ def __del__(self):
1937
+ _linksockslib.DecRef(self.handle)
1938
+
1939
+
1940
+ # Python type for *url.URL
1941
+ class Ptr_url_URL(GoClass):
1942
+ """"""
1943
+ def __init__(self, *args, **kwargs):
1944
+ """
1945
+ handle=A Go-side object is always initialized with an explicit handle=arg
1946
+ """
1947
+ if len(kwargs) == 1 and 'handle' in kwargs:
1948
+ self.handle = kwargs['handle']
1949
+ _linksockslib.IncRef(self.handle)
1950
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1951
+ self.handle = args[0].handle
1952
+ _linksockslib.IncRef(self.handle)
1953
+ elif len(args) == 1 and isinstance(args[0], int):
1954
+ self.handle = args[0]
1955
+ _linksockslib.IncRef(self.handle)
1956
+ else:
1957
+ self.handle = 0
1958
+ def __del__(self):
1959
+ _linksockslib.DecRef(self.handle)
1960
+
1961
+
1962
+ # Python type for *url.Userinfo
1963
+ class Ptr_url_Userinfo(GoClass):
1964
+ """"""
1965
+ def __init__(self, *args, **kwargs):
1966
+ """
1967
+ handle=A Go-side object is always initialized with an explicit handle=arg
1968
+ """
1969
+ if len(kwargs) == 1 and 'handle' in kwargs:
1970
+ self.handle = kwargs['handle']
1971
+ _linksockslib.IncRef(self.handle)
1972
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1973
+ self.handle = args[0].handle
1974
+ _linksockslib.IncRef(self.handle)
1975
+ elif len(args) == 1 and isinstance(args[0], int):
1976
+ self.handle = args[0]
1977
+ _linksockslib.IncRef(self.handle)
1978
+ else:
1979
+ self.handle = 0
1980
+ def __del__(self):
1981
+ _linksockslib.DecRef(self.handle)
1982
+
1983
+
1984
+ # Python type for *time.Location
1985
+ class Ptr_time_Location(GoClass):
1986
+ """"""
1987
+ def __init__(self, *args, **kwargs):
1988
+ """
1989
+ handle=A Go-side object is always initialized with an explicit handle=arg
1990
+ """
1991
+ if len(kwargs) == 1 and 'handle' in kwargs:
1992
+ self.handle = kwargs['handle']
1993
+ _linksockslib.IncRef(self.handle)
1994
+ elif len(args) == 1 and isinstance(args[0], GoClass):
1995
+ self.handle = args[0].handle
1996
+ _linksockslib.IncRef(self.handle)
1997
+ elif len(args) == 1 and isinstance(args[0], int):
1998
+ self.handle = args[0]
1999
+ _linksockslib.IncRef(self.handle)
2000
+ else:
2001
+ self.handle = 0
2002
+ def __del__(self):
2003
+ _linksockslib.DecRef(self.handle)
2004
+
2005
+
2006
+ # Python type for context.Context
2007
+ class context_Context(GoClass):
2008
+ """"""
2009
+ def __init__(self, *args, **kwargs):
2010
+ """
2011
+ handle=A Go-side object is always initialized with an explicit handle=arg
2012
+ """
2013
+ if len(kwargs) == 1 and 'handle' in kwargs:
2014
+ self.handle = kwargs['handle']
2015
+ _linksockslib.IncRef(self.handle)
2016
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2017
+ self.handle = args[0].handle
2018
+ _linksockslib.IncRef(self.handle)
2019
+ elif len(args) == 1 and isinstance(args[0], int):
2020
+ self.handle = args[0]
2021
+ _linksockslib.IncRef(self.handle)
2022
+ else:
2023
+ self.handle = 0
2024
+ def __del__(self):
2025
+ _linksockslib.DecRef(self.handle)
2026
+
2027
+
2028
+ # Python type for tls.ConnectionState
2029
+ class tls_ConnectionState(GoClass):
2030
+ """"""
2031
+ def __init__(self, *args, **kwargs):
2032
+ """
2033
+ handle=A Go-side object is always initialized with an explicit handle=arg
2034
+ """
2035
+ if len(kwargs) == 1 and 'handle' in kwargs:
2036
+ self.handle = kwargs['handle']
2037
+ _linksockslib.IncRef(self.handle)
2038
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2039
+ self.handle = args[0].handle
2040
+ _linksockslib.IncRef(self.handle)
2041
+ elif len(args) == 1 and isinstance(args[0], int):
2042
+ self.handle = args[0]
2043
+ _linksockslib.IncRef(self.handle)
2044
+ else:
2045
+ self.handle = 0
2046
+ def __del__(self):
2047
+ _linksockslib.DecRef(self.handle)
2048
+
2049
+
2050
+ # Python type for x509.CertPool
2051
+ class x509_CertPool(GoClass):
2052
+ """"""
2053
+ def __init__(self, *args, **kwargs):
2054
+ """
2055
+ handle=A Go-side object is always initialized with an explicit handle=arg
2056
+ """
2057
+ if len(kwargs) == 1 and 'handle' in kwargs:
2058
+ self.handle = kwargs['handle']
2059
+ _linksockslib.IncRef(self.handle)
2060
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2061
+ self.handle = args[0].handle
2062
+ _linksockslib.IncRef(self.handle)
2063
+ elif len(args) == 1 and isinstance(args[0], int):
2064
+ self.handle = args[0]
2065
+ _linksockslib.IncRef(self.handle)
2066
+ else:
2067
+ self.handle = 0
2068
+ def __del__(self):
2069
+ _linksockslib.DecRef(self.handle)
2070
+
2071
+
2072
+ # Python type for x509.Certificate
2073
+ class x509_Certificate(GoClass):
2074
+ """"""
2075
+ def __init__(self, *args, **kwargs):
2076
+ """
2077
+ handle=A Go-side object is always initialized with an explicit handle=arg
2078
+ """
2079
+ if len(kwargs) == 1 and 'handle' in kwargs:
2080
+ self.handle = kwargs['handle']
2081
+ _linksockslib.IncRef(self.handle)
2082
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2083
+ self.handle = args[0].handle
2084
+ _linksockslib.IncRef(self.handle)
2085
+ elif len(args) == 1 and isinstance(args[0], int):
2086
+ self.handle = args[0]
2087
+ _linksockslib.IncRef(self.handle)
2088
+ else:
2089
+ self.handle = 0
2090
+ def __del__(self):
2091
+ _linksockslib.DecRef(self.handle)
2092
+
2093
+
2094
+ # Python type for x509.OID
2095
+ class x509_OID(GoClass):
2096
+ """"""
2097
+ def __init__(self, *args, **kwargs):
2098
+ """
2099
+ handle=A Go-side object is always initialized with an explicit handle=arg
2100
+ """
2101
+ if len(kwargs) == 1 and 'handle' in kwargs:
2102
+ self.handle = kwargs['handle']
2103
+ _linksockslib.IncRef(self.handle)
2104
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2105
+ self.handle = args[0].handle
2106
+ _linksockslib.IncRef(self.handle)
2107
+ elif len(args) == 1 and isinstance(args[0], int):
2108
+ self.handle = args[0]
2109
+ _linksockslib.IncRef(self.handle)
2110
+ else:
2111
+ self.handle = 0
2112
+ def __del__(self):
2113
+ _linksockslib.DecRef(self.handle)
2114
+
2115
+
2116
+ # Python type for x509.PolicyMapping
2117
+ class x509_PolicyMapping(GoClass):
2118
+ """"""
2119
+ def __init__(self, *args, **kwargs):
2120
+ """
2121
+ handle=A Go-side object is always initialized with an explicit handle=arg
2122
+ """
2123
+ if len(kwargs) == 1 and 'handle' in kwargs:
2124
+ self.handle = kwargs['handle']
2125
+ _linksockslib.IncRef(self.handle)
2126
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2127
+ self.handle = args[0].handle
2128
+ _linksockslib.IncRef(self.handle)
2129
+ elif len(args) == 1 and isinstance(args[0], int):
2130
+ self.handle = args[0]
2131
+ _linksockslib.IncRef(self.handle)
2132
+ else:
2133
+ self.handle = 0
2134
+ def __del__(self):
2135
+ _linksockslib.DecRef(self.handle)
2136
+
2137
+
2138
+ # Python type for x509.VerifyOptions
2139
+ class x509_VerifyOptions(GoClass):
2140
+ """"""
2141
+ def __init__(self, *args, **kwargs):
2142
+ """
2143
+ handle=A Go-side object is always initialized with an explicit handle=arg
2144
+ """
2145
+ if len(kwargs) == 1 and 'handle' in kwargs:
2146
+ self.handle = kwargs['handle']
2147
+ _linksockslib.IncRef(self.handle)
2148
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2149
+ self.handle = args[0].handle
2150
+ _linksockslib.IncRef(self.handle)
2151
+ elif len(args) == 1 and isinstance(args[0], int):
2152
+ self.handle = args[0]
2153
+ _linksockslib.IncRef(self.handle)
2154
+ else:
2155
+ self.handle = 0
2156
+ def __del__(self):
2157
+ _linksockslib.DecRef(self.handle)
2158
+
2159
+
2160
+ # Python type for pkix.AlgorithmIdentifier
2161
+ class pkix_AlgorithmIdentifier(GoClass):
2162
+ """"""
2163
+ def __init__(self, *args, **kwargs):
2164
+ """
2165
+ handle=A Go-side object is always initialized with an explicit handle=arg
2166
+ """
2167
+ if len(kwargs) == 1 and 'handle' in kwargs:
2168
+ self.handle = kwargs['handle']
2169
+ _linksockslib.IncRef(self.handle)
2170
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2171
+ self.handle = args[0].handle
2172
+ _linksockslib.IncRef(self.handle)
2173
+ elif len(args) == 1 and isinstance(args[0], int):
2174
+ self.handle = args[0]
2175
+ _linksockslib.IncRef(self.handle)
2176
+ else:
2177
+ self.handle = 0
2178
+ def __del__(self):
2179
+ _linksockslib.DecRef(self.handle)
2180
+
2181
+
2182
+ # Python type for pkix.AttributeTypeAndValue
2183
+ class pkix_AttributeTypeAndValue(GoClass):
2184
+ """"""
2185
+ def __init__(self, *args, **kwargs):
2186
+ """
2187
+ handle=A Go-side object is always initialized with an explicit handle=arg
2188
+ """
2189
+ if len(kwargs) == 1 and 'handle' in kwargs:
2190
+ self.handle = kwargs['handle']
2191
+ _linksockslib.IncRef(self.handle)
2192
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2193
+ self.handle = args[0].handle
2194
+ _linksockslib.IncRef(self.handle)
2195
+ elif len(args) == 1 and isinstance(args[0], int):
2196
+ self.handle = args[0]
2197
+ _linksockslib.IncRef(self.handle)
2198
+ else:
2199
+ self.handle = 0
2200
+ def __del__(self):
2201
+ _linksockslib.DecRef(self.handle)
2202
+
2203
+
2204
+ # Python type for pkix.CertificateList
2205
+ class pkix_CertificateList(GoClass):
2206
+ """"""
2207
+ def __init__(self, *args, **kwargs):
2208
+ """
2209
+ handle=A Go-side object is always initialized with an explicit handle=arg
2210
+ """
2211
+ if len(kwargs) == 1 and 'handle' in kwargs:
2212
+ self.handle = kwargs['handle']
2213
+ _linksockslib.IncRef(self.handle)
2214
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2215
+ self.handle = args[0].handle
2216
+ _linksockslib.IncRef(self.handle)
2217
+ elif len(args) == 1 and isinstance(args[0], int):
2218
+ self.handle = args[0]
2219
+ _linksockslib.IncRef(self.handle)
2220
+ else:
2221
+ self.handle = 0
2222
+ def __del__(self):
2223
+ _linksockslib.DecRef(self.handle)
2224
+
2225
+
2226
+ # Python type for pkix.Extension
2227
+ class pkix_Extension(GoClass):
2228
+ """"""
2229
+ def __init__(self, *args, **kwargs):
2230
+ """
2231
+ handle=A Go-side object is always initialized with an explicit handle=arg
2232
+ """
2233
+ if len(kwargs) == 1 and 'handle' in kwargs:
2234
+ self.handle = kwargs['handle']
2235
+ _linksockslib.IncRef(self.handle)
2236
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2237
+ self.handle = args[0].handle
2238
+ _linksockslib.IncRef(self.handle)
2239
+ elif len(args) == 1 and isinstance(args[0], int):
2240
+ self.handle = args[0]
2241
+ _linksockslib.IncRef(self.handle)
2242
+ else:
2243
+ self.handle = 0
2244
+ def __del__(self):
2245
+ _linksockslib.DecRef(self.handle)
2246
+
2247
+
2248
+ # Python type for pkix.Name
2249
+ class pkix_Name(GoClass):
2250
+ """"""
2251
+ def __init__(self, *args, **kwargs):
2252
+ """
2253
+ handle=A Go-side object is always initialized with an explicit handle=arg
2254
+ """
2255
+ if len(kwargs) == 1 and 'handle' in kwargs:
2256
+ self.handle = kwargs['handle']
2257
+ _linksockslib.IncRef(self.handle)
2258
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2259
+ self.handle = args[0].handle
2260
+ _linksockslib.IncRef(self.handle)
2261
+ elif len(args) == 1 and isinstance(args[0], int):
2262
+ self.handle = args[0]
2263
+ _linksockslib.IncRef(self.handle)
2264
+ else:
2265
+ self.handle = 0
2266
+ def __del__(self):
2267
+ _linksockslib.DecRef(self.handle)
2268
+
2269
+
2270
+ # Python type for slice pkix.RelativeDistinguishedNameSET
2271
+ class RelativeDistinguishedNameSET(GoClass):
2272
+ """"""
2273
+ def __init__(self, *args, **kwargs):
2274
+ """
2275
+ handle=A Go-side object is always initialized with an explicit handle=arg
2276
+ otherwise parameter is a python list that we copy from
2277
+ """
2278
+ self.index = 0
2279
+ if len(kwargs) == 1 and 'handle' in kwargs:
2280
+ self.handle = kwargs['handle']
2281
+ _linksockslib.IncRef(self.handle)
2282
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2283
+ self.handle = args[0].handle
2284
+ _linksockslib.IncRef(self.handle)
2285
+ else:
2286
+ self.handle = _linksockslib.pkix_RelativeDistinguishedNameSET_CTor()
2287
+ _linksockslib.IncRef(self.handle)
2288
+ if len(args) > 0:
2289
+ if not isinstance(args[0], _collections_abc.Iterable):
2290
+ raise TypeError('pkix_RelativeDistinguishedNameSET.__init__ takes a sequence as argument')
2291
+ for elt in args[0]:
2292
+ self.append(elt)
2293
+ def __del__(self):
2294
+ _linksockslib.DecRef(self.handle)
2295
+ def __str__(self):
2296
+ s = 'pkix.pkix_RelativeDistinguishedNameSET len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
2297
+ if len(self) < 120:
2298
+ s += ', '.join(map(str, self)) + ']'
2299
+ return s
2300
+ def __repr__(self):
2301
+ return 'pkix.pkix_RelativeDistinguishedNameSET([' + ', '.join(map(str, self)) + '])'
2302
+ def __len__(self):
2303
+ return _linksockslib.pkix_RelativeDistinguishedNameSET_len(self.handle)
2304
+ def __getitem__(self, key):
2305
+ if isinstance(key, slice):
2306
+ if key.step == None or key.step == 1:
2307
+ st = key.start
2308
+ ed = key.stop
2309
+ if st == None:
2310
+ st = 0
2311
+ if ed == None:
2312
+ ed = _linksockslib.pkix_RelativeDistinguishedNameSET_len(self.handle)
2313
+ return RelativeDistinguishedNameSET(handle=_linksockslib.pkix_RelativeDistinguishedNameSET_subslice(self.handle, st, ed))
2314
+ return [self[ii] for ii in range(*key.indices(len(self)))]
2315
+ elif isinstance(key, int):
2316
+ if key < 0:
2317
+ key += len(self)
2318
+ if key < 0 or key >= len(self):
2319
+ raise IndexError('slice index out of range')
2320
+ return go.pkix_AttributeTypeAndValue(handle=_linksockslib.pkix_RelativeDistinguishedNameSET_elem(self.handle, key))
2321
+ else:
2322
+ raise TypeError('slice index invalid type')
2323
+ def __setitem__(self, idx, value):
2324
+ if idx < 0:
2325
+ idx += len(self)
2326
+ if idx < len(self):
2327
+ _linksockslib.pkix_RelativeDistinguishedNameSET_set(self.handle, idx, value.handle)
2328
+ return
2329
+ raise IndexError('slice index out of range')
2330
+ def __iadd__(self, value):
2331
+ if not isinstance(value, _collections_abc.Iterable):
2332
+ raise TypeError('pkix_RelativeDistinguishedNameSET.__iadd__ takes a sequence as argument')
2333
+ for elt in value:
2334
+ self.append(elt)
2335
+ return self
2336
+ def __iter__(self):
2337
+ self.index = 0
2338
+ return self
2339
+ def __next__(self):
2340
+ if self.index < len(self):
2341
+ rv = go.pkix_AttributeTypeAndValue(handle=_linksockslib.pkix_RelativeDistinguishedNameSET_elem(self.handle, self.index))
2342
+ self.index = self.index + 1
2343
+ return rv
2344
+ raise StopIteration
2345
+ def append(self, value):
2346
+ _linksockslib.pkix_RelativeDistinguishedNameSET_append(self.handle, value.handle)
2347
+ def copy(self, src):
2348
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
2349
+ mx = min(len(self), len(src))
2350
+ for i in range(mx):
2351
+ self[i] = src[i]
2352
+
2353
+ # Python type for pkix.RevokedCertificate
2354
+ class pkix_RevokedCertificate(GoClass):
2355
+ """"""
2356
+ def __init__(self, *args, **kwargs):
2357
+ """
2358
+ handle=A Go-side object is always initialized with an explicit handle=arg
2359
+ """
2360
+ if len(kwargs) == 1 and 'handle' in kwargs:
2361
+ self.handle = kwargs['handle']
2362
+ _linksockslib.IncRef(self.handle)
2363
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2364
+ self.handle = args[0].handle
2365
+ _linksockslib.IncRef(self.handle)
2366
+ elif len(args) == 1 and isinstance(args[0], int):
2367
+ self.handle = args[0]
2368
+ _linksockslib.IncRef(self.handle)
2369
+ else:
2370
+ self.handle = 0
2371
+ def __del__(self):
2372
+ _linksockslib.DecRef(self.handle)
2373
+
2374
+
2375
+ # Python type for pkix.TBSCertificateList
2376
+ class pkix_TBSCertificateList(GoClass):
2377
+ """"""
2378
+ def __init__(self, *args, **kwargs):
2379
+ """
2380
+ handle=A Go-side object is always initialized with an explicit handle=arg
2381
+ """
2382
+ if len(kwargs) == 1 and 'handle' in kwargs:
2383
+ self.handle = kwargs['handle']
2384
+ _linksockslib.IncRef(self.handle)
2385
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2386
+ self.handle = args[0].handle
2387
+ _linksockslib.IncRef(self.handle)
2388
+ elif len(args) == 1 and isinstance(args[0], int):
2389
+ self.handle = args[0]
2390
+ _linksockslib.IncRef(self.handle)
2391
+ else:
2392
+ self.handle = 0
2393
+ def __del__(self):
2394
+ _linksockslib.DecRef(self.handle)
2395
+
2396
+
2397
+ # Python type for driver.Value
2398
+ class driver_Value(GoClass):
2399
+ """"""
2400
+ def __init__(self, *args, **kwargs):
2401
+ """
2402
+ handle=A Go-side object is always initialized with an explicit handle=arg
2403
+ """
2404
+ if len(kwargs) == 1 and 'handle' in kwargs:
2405
+ self.handle = kwargs['handle']
2406
+ _linksockslib.IncRef(self.handle)
2407
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2408
+ self.handle = args[0].handle
2409
+ _linksockslib.IncRef(self.handle)
2410
+ elif len(args) == 1 and isinstance(args[0], int):
2411
+ self.handle = args[0]
2412
+ _linksockslib.IncRef(self.handle)
2413
+ else:
2414
+ self.handle = 0
2415
+ def __del__(self):
2416
+ _linksockslib.DecRef(self.handle)
2417
+
2418
+
2419
+ # Python type for asn1.BitString
2420
+ class asn1_BitString(GoClass):
2421
+ """"""
2422
+ def __init__(self, *args, **kwargs):
2423
+ """
2424
+ handle=A Go-side object is always initialized with an explicit handle=arg
2425
+ """
2426
+ if len(kwargs) == 1 and 'handle' in kwargs:
2427
+ self.handle = kwargs['handle']
2428
+ _linksockslib.IncRef(self.handle)
2429
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2430
+ self.handle = args[0].handle
2431
+ _linksockslib.IncRef(self.handle)
2432
+ elif len(args) == 1 and isinstance(args[0], int):
2433
+ self.handle = args[0]
2434
+ _linksockslib.IncRef(self.handle)
2435
+ else:
2436
+ self.handle = 0
2437
+ def __del__(self):
2438
+ _linksockslib.DecRef(self.handle)
2439
+
2440
+
2441
+ # Python type for slice asn1.ObjectIdentifier
2442
+ class ObjectIdentifier(GoClass):
2443
+ """"""
2444
+ def __init__(self, *args, **kwargs):
2445
+ """
2446
+ handle=A Go-side object is always initialized with an explicit handle=arg
2447
+ otherwise parameter is a python list that we copy from
2448
+ """
2449
+ self.index = 0
2450
+ if len(kwargs) == 1 and 'handle' in kwargs:
2451
+ self.handle = kwargs['handle']
2452
+ _linksockslib.IncRef(self.handle)
2453
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2454
+ self.handle = args[0].handle
2455
+ _linksockslib.IncRef(self.handle)
2456
+ else:
2457
+ self.handle = _linksockslib.asn1_ObjectIdentifier_CTor()
2458
+ _linksockslib.IncRef(self.handle)
2459
+ if len(args) > 0:
2460
+ if not isinstance(args[0], _collections_abc.Iterable):
2461
+ raise TypeError('asn1_ObjectIdentifier.__init__ takes a sequence as argument')
2462
+ for elt in args[0]:
2463
+ self.append(elt)
2464
+ def __del__(self):
2465
+ _linksockslib.DecRef(self.handle)
2466
+ def __str__(self):
2467
+ s = 'asn1.asn1_ObjectIdentifier len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
2468
+ if len(self) < 120:
2469
+ s += ', '.join(map(str, self)) + ']'
2470
+ return s
2471
+ def __repr__(self):
2472
+ return 'asn1.asn1_ObjectIdentifier([' + ', '.join(map(str, self)) + '])'
2473
+ def __len__(self):
2474
+ return _linksockslib.asn1_ObjectIdentifier_len(self.handle)
2475
+ def __getitem__(self, key):
2476
+ if isinstance(key, slice):
2477
+ if key.step == None or key.step == 1:
2478
+ st = key.start
2479
+ ed = key.stop
2480
+ if st == None:
2481
+ st = 0
2482
+ if ed == None:
2483
+ ed = _linksockslib.asn1_ObjectIdentifier_len(self.handle)
2484
+ return ObjectIdentifier(handle=_linksockslib.asn1_ObjectIdentifier_subslice(self.handle, st, ed))
2485
+ return [self[ii] for ii in range(*key.indices(len(self)))]
2486
+ elif isinstance(key, int):
2487
+ if key < 0:
2488
+ key += len(self)
2489
+ if key < 0 or key >= len(self):
2490
+ raise IndexError('slice index out of range')
2491
+ return _linksockslib.asn1_ObjectIdentifier_elem(self.handle, key)
2492
+ else:
2493
+ raise TypeError('slice index invalid type')
2494
+ def __setitem__(self, idx, value):
2495
+ if idx < 0:
2496
+ idx += len(self)
2497
+ if idx < len(self):
2498
+ _linksockslib.asn1_ObjectIdentifier_set(self.handle, idx, value)
2499
+ return
2500
+ raise IndexError('slice index out of range')
2501
+ def __iadd__(self, value):
2502
+ if not isinstance(value, _collections_abc.Iterable):
2503
+ raise TypeError('asn1_ObjectIdentifier.__iadd__ takes a sequence as argument')
2504
+ for elt in value:
2505
+ self.append(elt)
2506
+ return self
2507
+ def __iter__(self):
2508
+ self.index = 0
2509
+ return self
2510
+ def __next__(self):
2511
+ if self.index < len(self):
2512
+ rv = _linksockslib.asn1_ObjectIdentifier_elem(self.handle, self.index)
2513
+ self.index = self.index + 1
2514
+ return rv
2515
+ raise StopIteration
2516
+ def append(self, value):
2517
+ _linksockslib.asn1_ObjectIdentifier_append(self.handle, value)
2518
+ def copy(self, src):
2519
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
2520
+ mx = min(len(self), len(src))
2521
+ for i in range(mx):
2522
+ self[i] = src[i]
2523
+
2524
+ # Python type for slice asn1.RawContent
2525
+ class RawContent(GoClass):
2526
+ """"""
2527
+ def __init__(self, *args, **kwargs):
2528
+ """
2529
+ handle=A Go-side object is always initialized with an explicit handle=arg
2530
+ otherwise parameter is a python list that we copy from
2531
+ """
2532
+ self.index = 0
2533
+ if len(kwargs) == 1 and 'handle' in kwargs:
2534
+ self.handle = kwargs['handle']
2535
+ _linksockslib.IncRef(self.handle)
2536
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2537
+ self.handle = args[0].handle
2538
+ _linksockslib.IncRef(self.handle)
2539
+ else:
2540
+ self.handle = _linksockslib.asn1_RawContent_CTor()
2541
+ _linksockslib.IncRef(self.handle)
2542
+ if len(args) > 0:
2543
+ if not isinstance(args[0], _collections_abc.Iterable):
2544
+ raise TypeError('asn1_RawContent.__init__ takes a sequence as argument')
2545
+ for elt in args[0]:
2546
+ self.append(elt)
2547
+ def __del__(self):
2548
+ _linksockslib.DecRef(self.handle)
2549
+ def __str__(self):
2550
+ s = 'asn1.asn1_RawContent len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
2551
+ if len(self) < 120:
2552
+ s += ', '.join(map(str, self)) + ']'
2553
+ return s
2554
+ def __repr__(self):
2555
+ return 'asn1.asn1_RawContent([' + ', '.join(map(str, self)) + '])'
2556
+ def __len__(self):
2557
+ return _linksockslib.asn1_RawContent_len(self.handle)
2558
+ def __getitem__(self, key):
2559
+ if isinstance(key, slice):
2560
+ if key.step == None or key.step == 1:
2561
+ st = key.start
2562
+ ed = key.stop
2563
+ if st == None:
2564
+ st = 0
2565
+ if ed == None:
2566
+ ed = _linksockslib.asn1_RawContent_len(self.handle)
2567
+ return RawContent(handle=_linksockslib.asn1_RawContent_subslice(self.handle, st, ed))
2568
+ return [self[ii] for ii in range(*key.indices(len(self)))]
2569
+ elif isinstance(key, int):
2570
+ if key < 0:
2571
+ key += len(self)
2572
+ if key < 0 or key >= len(self):
2573
+ raise IndexError('slice index out of range')
2574
+ return _linksockslib.asn1_RawContent_elem(self.handle, key)
2575
+ else:
2576
+ raise TypeError('slice index invalid type')
2577
+ def __setitem__(self, idx, value):
2578
+ if idx < 0:
2579
+ idx += len(self)
2580
+ if idx < len(self):
2581
+ _linksockslib.asn1_RawContent_set(self.handle, idx, value)
2582
+ return
2583
+ raise IndexError('slice index out of range')
2584
+ def __iadd__(self, value):
2585
+ if not isinstance(value, _collections_abc.Iterable):
2586
+ raise TypeError('asn1_RawContent.__iadd__ takes a sequence as argument')
2587
+ for elt in value:
2588
+ self.append(elt)
2589
+ return self
2590
+ def __iter__(self):
2591
+ self.index = 0
2592
+ return self
2593
+ def __next__(self):
2594
+ if self.index < len(self):
2595
+ rv = _linksockslib.asn1_RawContent_elem(self.handle, self.index)
2596
+ self.index = self.index + 1
2597
+ return rv
2598
+ raise StopIteration
2599
+ def append(self, value):
2600
+ _linksockslib.asn1_RawContent_append(self.handle, value)
2601
+ def copy(self, src):
2602
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
2603
+ mx = min(len(self), len(src))
2604
+ for i in range(mx):
2605
+ self[i] = src[i]
2606
+
2607
+ # Python type for asn1.RawValue
2608
+ class asn1_RawValue(GoClass):
2609
+ """"""
2610
+ def __init__(self, *args, **kwargs):
2611
+ """
2612
+ handle=A Go-side object is always initialized with an explicit handle=arg
2613
+ """
2614
+ if len(kwargs) == 1 and 'handle' in kwargs:
2615
+ self.handle = kwargs['handle']
2616
+ _linksockslib.IncRef(self.handle)
2617
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2618
+ self.handle = args[0].handle
2619
+ _linksockslib.IncRef(self.handle)
2620
+ elif len(args) == 1 and isinstance(args[0], int):
2621
+ self.handle = args[0]
2622
+ _linksockslib.IncRef(self.handle)
2623
+ else:
2624
+ self.handle = 0
2625
+ def __del__(self):
2626
+ _linksockslib.DecRef(self.handle)
2627
+
2628
+
2629
+ # Python type for fmt.ScanState
2630
+ class fmt_ScanState(GoClass):
2631
+ """"""
2632
+ def __init__(self, *args, **kwargs):
2633
+ """
2634
+ handle=A Go-side object is always initialized with an explicit handle=arg
2635
+ """
2636
+ if len(kwargs) == 1 and 'handle' in kwargs:
2637
+ self.handle = kwargs['handle']
2638
+ _linksockslib.IncRef(self.handle)
2639
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2640
+ self.handle = args[0].handle
2641
+ _linksockslib.IncRef(self.handle)
2642
+ elif len(args) == 1 and isinstance(args[0], int):
2643
+ self.handle = args[0]
2644
+ _linksockslib.IncRef(self.handle)
2645
+ else:
2646
+ self.handle = 0
2647
+ def __del__(self):
2648
+ _linksockslib.DecRef(self.handle)
2649
+
2650
+
2651
+ # Python type for fmt.State
2652
+ class fmt_State(GoClass):
2653
+ """"""
2654
+ def __init__(self, *args, **kwargs):
2655
+ """
2656
+ handle=A Go-side object is always initialized with an explicit handle=arg
2657
+ """
2658
+ if len(kwargs) == 1 and 'handle' in kwargs:
2659
+ self.handle = kwargs['handle']
2660
+ _linksockslib.IncRef(self.handle)
2661
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2662
+ self.handle = args[0].handle
2663
+ _linksockslib.IncRef(self.handle)
2664
+ elif len(args) == 1 and isinstance(args[0], int):
2665
+ self.handle = args[0]
2666
+ _linksockslib.IncRef(self.handle)
2667
+ else:
2668
+ self.handle = 0
2669
+ def __del__(self):
2670
+ _linksockslib.DecRef(self.handle)
2671
+
2672
+
2673
+ # Python type for fmt.Stringer
2674
+ class fmt_Stringer(GoClass):
2675
+ """"""
2676
+ def __init__(self, *args, **kwargs):
2677
+ """
2678
+ handle=A Go-side object is always initialized with an explicit handle=arg
2679
+ """
2680
+ if len(kwargs) == 1 and 'handle' in kwargs:
2681
+ self.handle = kwargs['handle']
2682
+ _linksockslib.IncRef(self.handle)
2683
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2684
+ self.handle = args[0].handle
2685
+ _linksockslib.IncRef(self.handle)
2686
+ elif len(args) == 1 and isinstance(args[0], int):
2687
+ self.handle = args[0]
2688
+ _linksockslib.IncRef(self.handle)
2689
+ else:
2690
+ self.handle = 0
2691
+ def __del__(self):
2692
+ _linksockslib.DecRef(self.handle)
2693
+
2694
+
2695
+ # Python type for slice uuid.UUID
2696
+ class UUID(GoClass):
2697
+ """"""
2698
+ def __init__(self, *args, **kwargs):
2699
+ """
2700
+ handle=A Go-side object is always initialized with an explicit handle=arg
2701
+ otherwise parameter is a python list that we copy from
2702
+ """
2703
+ self.index = 0
2704
+ if len(kwargs) == 1 and 'handle' in kwargs:
2705
+ self.handle = kwargs['handle']
2706
+ _linksockslib.IncRef(self.handle)
2707
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2708
+ self.handle = args[0].handle
2709
+ _linksockslib.IncRef(self.handle)
2710
+ def __del__(self):
2711
+ _linksockslib.DecRef(self.handle)
2712
+ def __str__(self):
2713
+ s = 'uuid.uuid_UUID len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
2714
+ if len(self) < 120:
2715
+ s += ', '.join(map(str, self)) + ']'
2716
+ return s
2717
+ def __repr__(self):
2718
+ return 'uuid.uuid_UUID([' + ', '.join(map(str, self)) + '])'
2719
+ def __len__(self):
2720
+ return _linksockslib.uuid_UUID_len(self.handle)
2721
+ def __getitem__(self, key):
2722
+ if isinstance(key, slice):
2723
+ return [self[ii] for ii in range(*key.indices(len(self)))]
2724
+ elif isinstance(key, int):
2725
+ if key < 0:
2726
+ key += len(self)
2727
+ if key < 0 or key >= len(self):
2728
+ raise IndexError('slice index out of range')
2729
+ return _linksockslib.uuid_UUID_elem(self.handle, key)
2730
+ else:
2731
+ raise TypeError('slice index invalid type')
2732
+ def __setitem__(self, idx, value):
2733
+ if idx < 0:
2734
+ idx += len(self)
2735
+ if idx < len(self):
2736
+ _linksockslib.uuid_UUID_set(self.handle, idx, value)
2737
+ return
2738
+ raise IndexError('slice index out of range')
2739
+ def __iter__(self):
2740
+ self.index = 0
2741
+ return self
2742
+ def __next__(self):
2743
+ if self.index < len(self):
2744
+ rv = _linksockslib.uuid_UUID_elem(self.handle, self.index)
2745
+ self.index = self.index + 1
2746
+ return rv
2747
+ raise StopIteration
2748
+
2749
+ # Python type for websocket.Conn
2750
+ class websocket_Conn(GoClass):
2751
+ """"""
2752
+ def __init__(self, *args, **kwargs):
2753
+ """
2754
+ handle=A Go-side object is always initialized with an explicit handle=arg
2755
+ """
2756
+ if len(kwargs) == 1 and 'handle' in kwargs:
2757
+ self.handle = kwargs['handle']
2758
+ _linksockslib.IncRef(self.handle)
2759
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2760
+ self.handle = args[0].handle
2761
+ _linksockslib.IncRef(self.handle)
2762
+ elif len(args) == 1 and isinstance(args[0], int):
2763
+ self.handle = args[0]
2764
+ _linksockslib.IncRef(self.handle)
2765
+ else:
2766
+ self.handle = 0
2767
+ def __del__(self):
2768
+ _linksockslib.DecRef(self.handle)
2769
+
2770
+
2771
+ # Python type for websocket.PreparedMessage
2772
+ class websocket_PreparedMessage(GoClass):
2773
+ """"""
2774
+ def __init__(self, *args, **kwargs):
2775
+ """
2776
+ handle=A Go-side object is always initialized with an explicit handle=arg
2777
+ """
2778
+ if len(kwargs) == 1 and 'handle' in kwargs:
2779
+ self.handle = kwargs['handle']
2780
+ _linksockslib.IncRef(self.handle)
2781
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2782
+ self.handle = args[0].handle
2783
+ _linksockslib.IncRef(self.handle)
2784
+ elif len(args) == 1 and isinstance(args[0], int):
2785
+ self.handle = args[0]
2786
+ _linksockslib.IncRef(self.handle)
2787
+ else:
2788
+ self.handle = 0
2789
+ def __del__(self):
2790
+ _linksockslib.DecRef(self.handle)
2791
+
2792
+
2793
+ # Python type for zerolog.Context
2794
+ class zerolog_Context(GoClass):
2795
+ """"""
2796
+ def __init__(self, *args, **kwargs):
2797
+ """
2798
+ handle=A Go-side object is always initialized with an explicit handle=arg
2799
+ """
2800
+ if len(kwargs) == 1 and 'handle' in kwargs:
2801
+ self.handle = kwargs['handle']
2802
+ _linksockslib.IncRef(self.handle)
2803
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2804
+ self.handle = args[0].handle
2805
+ _linksockslib.IncRef(self.handle)
2806
+ elif len(args) == 1 and isinstance(args[0], int):
2807
+ self.handle = args[0]
2808
+ _linksockslib.IncRef(self.handle)
2809
+ else:
2810
+ self.handle = 0
2811
+ def __del__(self):
2812
+ _linksockslib.DecRef(self.handle)
2813
+
2814
+
2815
+ # Python type for zerolog.Event
2816
+ class zerolog_Event(GoClass):
2817
+ """"""
2818
+ def __init__(self, *args, **kwargs):
2819
+ """
2820
+ handle=A Go-side object is always initialized with an explicit handle=arg
2821
+ """
2822
+ if len(kwargs) == 1 and 'handle' in kwargs:
2823
+ self.handle = kwargs['handle']
2824
+ _linksockslib.IncRef(self.handle)
2825
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2826
+ self.handle = args[0].handle
2827
+ _linksockslib.IncRef(self.handle)
2828
+ elif len(args) == 1 and isinstance(args[0], int):
2829
+ self.handle = args[0]
2830
+ _linksockslib.IncRef(self.handle)
2831
+ else:
2832
+ self.handle = 0
2833
+ def __del__(self):
2834
+ _linksockslib.DecRef(self.handle)
2835
+
2836
+
2837
+ # Python type for zerolog.Hook
2838
+ class zerolog_Hook(GoClass):
2839
+ """"""
2840
+ def __init__(self, *args, **kwargs):
2841
+ """
2842
+ handle=A Go-side object is always initialized with an explicit handle=arg
2843
+ """
2844
+ if len(kwargs) == 1 and 'handle' in kwargs:
2845
+ self.handle = kwargs['handle']
2846
+ _linksockslib.IncRef(self.handle)
2847
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2848
+ self.handle = args[0].handle
2849
+ _linksockslib.IncRef(self.handle)
2850
+ elif len(args) == 1 and isinstance(args[0], int):
2851
+ self.handle = args[0]
2852
+ _linksockslib.IncRef(self.handle)
2853
+ else:
2854
+ self.handle = 0
2855
+ def __del__(self):
2856
+ _linksockslib.DecRef(self.handle)
2857
+
2858
+
2859
+ # Python type for zerolog.LogArrayMarshaler
2860
+ class zerolog_LogArrayMarshaler(GoClass):
2861
+ """"""
2862
+ def __init__(self, *args, **kwargs):
2863
+ """
2864
+ handle=A Go-side object is always initialized with an explicit handle=arg
2865
+ """
2866
+ if len(kwargs) == 1 and 'handle' in kwargs:
2867
+ self.handle = kwargs['handle']
2868
+ _linksockslib.IncRef(self.handle)
2869
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2870
+ self.handle = args[0].handle
2871
+ _linksockslib.IncRef(self.handle)
2872
+ elif len(args) == 1 and isinstance(args[0], int):
2873
+ self.handle = args[0]
2874
+ _linksockslib.IncRef(self.handle)
2875
+ else:
2876
+ self.handle = 0
2877
+ def __del__(self):
2878
+ _linksockslib.DecRef(self.handle)
2879
+
2880
+
2881
+ # Python type for zerolog.LogObjectMarshaler
2882
+ class zerolog_LogObjectMarshaler(GoClass):
2883
+ """"""
2884
+ def __init__(self, *args, **kwargs):
2885
+ """
2886
+ handle=A Go-side object is always initialized with an explicit handle=arg
2887
+ """
2888
+ if len(kwargs) == 1 and 'handle' in kwargs:
2889
+ self.handle = kwargs['handle']
2890
+ _linksockslib.IncRef(self.handle)
2891
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2892
+ self.handle = args[0].handle
2893
+ _linksockslib.IncRef(self.handle)
2894
+ elif len(args) == 1 and isinstance(args[0], int):
2895
+ self.handle = args[0]
2896
+ _linksockslib.IncRef(self.handle)
2897
+ else:
2898
+ self.handle = 0
2899
+ def __del__(self):
2900
+ _linksockslib.DecRef(self.handle)
2901
+
2902
+
2903
+ # Python type for zerolog.Logger
2904
+ class zerolog_Logger(GoClass):
2905
+ """"""
2906
+ def __init__(self, *args, **kwargs):
2907
+ """
2908
+ handle=A Go-side object is always initialized with an explicit handle=arg
2909
+ """
2910
+ if len(kwargs) == 1 and 'handle' in kwargs:
2911
+ self.handle = kwargs['handle']
2912
+ _linksockslib.IncRef(self.handle)
2913
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2914
+ self.handle = args[0].handle
2915
+ _linksockslib.IncRef(self.handle)
2916
+ elif len(args) == 1 and isinstance(args[0], int):
2917
+ self.handle = args[0]
2918
+ _linksockslib.IncRef(self.handle)
2919
+ else:
2920
+ self.handle = 0
2921
+ def __del__(self):
2922
+ _linksockslib.DecRef(self.handle)
2923
+
2924
+
2925
+ # Python type for zerolog.Sampler
2926
+ class zerolog_Sampler(GoClass):
2927
+ """"""
2928
+ def __init__(self, *args, **kwargs):
2929
+ """
2930
+ handle=A Go-side object is always initialized with an explicit handle=arg
2931
+ """
2932
+ if len(kwargs) == 1 and 'handle' in kwargs:
2933
+ self.handle = kwargs['handle']
2934
+ _linksockslib.IncRef(self.handle)
2935
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2936
+ self.handle = args[0].handle
2937
+ _linksockslib.IncRef(self.handle)
2938
+ elif len(args) == 1 and isinstance(args[0], int):
2939
+ self.handle = args[0]
2940
+ _linksockslib.IncRef(self.handle)
2941
+ else:
2942
+ self.handle = 0
2943
+ def __del__(self):
2944
+ _linksockslib.DecRef(self.handle)
2945
+
2946
+
2947
+ # Python type for io.ReadCloser
2948
+ class io_ReadCloser(GoClass):
2949
+ """"""
2950
+ def __init__(self, *args, **kwargs):
2951
+ """
2952
+ handle=A Go-side object is always initialized with an explicit handle=arg
2953
+ """
2954
+ if len(kwargs) == 1 and 'handle' in kwargs:
2955
+ self.handle = kwargs['handle']
2956
+ _linksockslib.IncRef(self.handle)
2957
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2958
+ self.handle = args[0].handle
2959
+ _linksockslib.IncRef(self.handle)
2960
+ elif len(args) == 1 and isinstance(args[0], int):
2961
+ self.handle = args[0]
2962
+ _linksockslib.IncRef(self.handle)
2963
+ else:
2964
+ self.handle = 0
2965
+ def __del__(self):
2966
+ _linksockslib.DecRef(self.handle)
2967
+
2968
+
2969
+ # Python type for io.Reader
2970
+ class io_Reader(GoClass):
2971
+ """"""
2972
+ def __init__(self, *args, **kwargs):
2973
+ """
2974
+ handle=A Go-side object is always initialized with an explicit handle=arg
2975
+ """
2976
+ if len(kwargs) == 1 and 'handle' in kwargs:
2977
+ self.handle = kwargs['handle']
2978
+ _linksockslib.IncRef(self.handle)
2979
+ elif len(args) == 1 and isinstance(args[0], GoClass):
2980
+ self.handle = args[0].handle
2981
+ _linksockslib.IncRef(self.handle)
2982
+ elif len(args) == 1 and isinstance(args[0], int):
2983
+ self.handle = args[0]
2984
+ _linksockslib.IncRef(self.handle)
2985
+ else:
2986
+ self.handle = 0
2987
+ def __del__(self):
2988
+ _linksockslib.DecRef(self.handle)
2989
+
2990
+
2991
+ # Python type for io.WriteCloser
2992
+ class io_WriteCloser(GoClass):
2993
+ """"""
2994
+ def __init__(self, *args, **kwargs):
2995
+ """
2996
+ handle=A Go-side object is always initialized with an explicit handle=arg
2997
+ """
2998
+ if len(kwargs) == 1 and 'handle' in kwargs:
2999
+ self.handle = kwargs['handle']
3000
+ _linksockslib.IncRef(self.handle)
3001
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3002
+ self.handle = args[0].handle
3003
+ _linksockslib.IncRef(self.handle)
3004
+ elif len(args) == 1 and isinstance(args[0], int):
3005
+ self.handle = args[0]
3006
+ _linksockslib.IncRef(self.handle)
3007
+ else:
3008
+ self.handle = 0
3009
+ def __del__(self):
3010
+ _linksockslib.DecRef(self.handle)
3011
+
3012
+
3013
+ # Python type for io.Writer
3014
+ class io_Writer(GoClass):
3015
+ """"""
3016
+ def __init__(self, *args, **kwargs):
3017
+ """
3018
+ handle=A Go-side object is always initialized with an explicit handle=arg
3019
+ """
3020
+ if len(kwargs) == 1 and 'handle' in kwargs:
3021
+ self.handle = kwargs['handle']
3022
+ _linksockslib.IncRef(self.handle)
3023
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3024
+ self.handle = args[0].handle
3025
+ _linksockslib.IncRef(self.handle)
3026
+ elif len(args) == 1 and isinstance(args[0], int):
3027
+ self.handle = args[0]
3028
+ _linksockslib.IncRef(self.handle)
3029
+ else:
3030
+ self.handle = 0
3031
+ def __del__(self):
3032
+ _linksockslib.DecRef(self.handle)
3033
+
3034
+
3035
+ # Python type for big.Int
3036
+ class big_Int(GoClass):
3037
+ """"""
3038
+ def __init__(self, *args, **kwargs):
3039
+ """
3040
+ handle=A Go-side object is always initialized with an explicit handle=arg
3041
+ """
3042
+ if len(kwargs) == 1 and 'handle' in kwargs:
3043
+ self.handle = kwargs['handle']
3044
+ _linksockslib.IncRef(self.handle)
3045
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3046
+ self.handle = args[0].handle
3047
+ _linksockslib.IncRef(self.handle)
3048
+ elif len(args) == 1 and isinstance(args[0], int):
3049
+ self.handle = args[0]
3050
+ _linksockslib.IncRef(self.handle)
3051
+ else:
3052
+ self.handle = 0
3053
+ def __del__(self):
3054
+ _linksockslib.DecRef(self.handle)
3055
+
3056
+
3057
+ # Python type for rand.Rand
3058
+ class rand_Rand(GoClass):
3059
+ """"""
3060
+ def __init__(self, *args, **kwargs):
3061
+ """
3062
+ handle=A Go-side object is always initialized with an explicit handle=arg
3063
+ """
3064
+ if len(kwargs) == 1 and 'handle' in kwargs:
3065
+ self.handle = kwargs['handle']
3066
+ _linksockslib.IncRef(self.handle)
3067
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3068
+ self.handle = args[0].handle
3069
+ _linksockslib.IncRef(self.handle)
3070
+ elif len(args) == 1 and isinstance(args[0], int):
3071
+ self.handle = args[0]
3072
+ _linksockslib.IncRef(self.handle)
3073
+ else:
3074
+ self.handle = 0
3075
+ def __del__(self):
3076
+ _linksockslib.DecRef(self.handle)
3077
+
3078
+
3079
+ # Python type for multipart.File
3080
+ class multipart_File(GoClass):
3081
+ """"""
3082
+ def __init__(self, *args, **kwargs):
3083
+ """
3084
+ handle=A Go-side object is always initialized with an explicit handle=arg
3085
+ """
3086
+ if len(kwargs) == 1 and 'handle' in kwargs:
3087
+ self.handle = kwargs['handle']
3088
+ _linksockslib.IncRef(self.handle)
3089
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3090
+ self.handle = args[0].handle
3091
+ _linksockslib.IncRef(self.handle)
3092
+ elif len(args) == 1 and isinstance(args[0], int):
3093
+ self.handle = args[0]
3094
+ _linksockslib.IncRef(self.handle)
3095
+ else:
3096
+ self.handle = 0
3097
+ def __del__(self):
3098
+ _linksockslib.DecRef(self.handle)
3099
+
3100
+
3101
+ # Python type for multipart.FileHeader
3102
+ class multipart_FileHeader(GoClass):
3103
+ """"""
3104
+ def __init__(self, *args, **kwargs):
3105
+ """
3106
+ handle=A Go-side object is always initialized with an explicit handle=arg
3107
+ """
3108
+ if len(kwargs) == 1 and 'handle' in kwargs:
3109
+ self.handle = kwargs['handle']
3110
+ _linksockslib.IncRef(self.handle)
3111
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3112
+ self.handle = args[0].handle
3113
+ _linksockslib.IncRef(self.handle)
3114
+ elif len(args) == 1 and isinstance(args[0], int):
3115
+ self.handle = args[0]
3116
+ _linksockslib.IncRef(self.handle)
3117
+ else:
3118
+ self.handle = 0
3119
+ def __del__(self):
3120
+ _linksockslib.DecRef(self.handle)
3121
+
3122
+
3123
+ # Python type for multipart.Form
3124
+ class multipart_Form(GoClass):
3125
+ """"""
3126
+ def __init__(self, *args, **kwargs):
3127
+ """
3128
+ handle=A Go-side object is always initialized with an explicit handle=arg
3129
+ """
3130
+ if len(kwargs) == 1 and 'handle' in kwargs:
3131
+ self.handle = kwargs['handle']
3132
+ _linksockslib.IncRef(self.handle)
3133
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3134
+ self.handle = args[0].handle
3135
+ _linksockslib.IncRef(self.handle)
3136
+ elif len(args) == 1 and isinstance(args[0], int):
3137
+ self.handle = args[0]
3138
+ _linksockslib.IncRef(self.handle)
3139
+ else:
3140
+ self.handle = 0
3141
+ def __del__(self):
3142
+ _linksockslib.DecRef(self.handle)
3143
+
3144
+
3145
+ # Python type for multipart.Part
3146
+ class multipart_Part(GoClass):
3147
+ """"""
3148
+ def __init__(self, *args, **kwargs):
3149
+ """
3150
+ handle=A Go-side object is always initialized with an explicit handle=arg
3151
+ """
3152
+ if len(kwargs) == 1 and 'handle' in kwargs:
3153
+ self.handle = kwargs['handle']
3154
+ _linksockslib.IncRef(self.handle)
3155
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3156
+ self.handle = args[0].handle
3157
+ _linksockslib.IncRef(self.handle)
3158
+ elif len(args) == 1 and isinstance(args[0], int):
3159
+ self.handle = args[0]
3160
+ _linksockslib.IncRef(self.handle)
3161
+ else:
3162
+ self.handle = 0
3163
+ def __del__(self):
3164
+ _linksockslib.DecRef(self.handle)
3165
+
3166
+
3167
+ # Python type for multipart.Reader
3168
+ class multipart_Reader(GoClass):
3169
+ """"""
3170
+ def __init__(self, *args, **kwargs):
3171
+ """
3172
+ handle=A Go-side object is always initialized with an explicit handle=arg
3173
+ """
3174
+ if len(kwargs) == 1 and 'handle' in kwargs:
3175
+ self.handle = kwargs['handle']
3176
+ _linksockslib.IncRef(self.handle)
3177
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3178
+ self.handle = args[0].handle
3179
+ _linksockslib.IncRef(self.handle)
3180
+ elif len(args) == 1 and isinstance(args[0], int):
3181
+ self.handle = args[0]
3182
+ _linksockslib.IncRef(self.handle)
3183
+ else:
3184
+ self.handle = 0
3185
+ def __del__(self):
3186
+ _linksockslib.DecRef(self.handle)
3187
+
3188
+
3189
+ # Python type for net.Addr
3190
+ class net_Addr(GoClass):
3191
+ """"""
3192
+ def __init__(self, *args, **kwargs):
3193
+ """
3194
+ handle=A Go-side object is always initialized with an explicit handle=arg
3195
+ """
3196
+ if len(kwargs) == 1 and 'handle' in kwargs:
3197
+ self.handle = kwargs['handle']
3198
+ _linksockslib.IncRef(self.handle)
3199
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3200
+ self.handle = args[0].handle
3201
+ _linksockslib.IncRef(self.handle)
3202
+ elif len(args) == 1 and isinstance(args[0], int):
3203
+ self.handle = args[0]
3204
+ _linksockslib.IncRef(self.handle)
3205
+ else:
3206
+ self.handle = 0
3207
+ def __del__(self):
3208
+ _linksockslib.DecRef(self.handle)
3209
+
3210
+
3211
+ # Python type for net.Conn
3212
+ class net_Conn(GoClass):
3213
+ """"""
3214
+ def __init__(self, *args, **kwargs):
3215
+ """
3216
+ handle=A Go-side object is always initialized with an explicit handle=arg
3217
+ """
3218
+ if len(kwargs) == 1 and 'handle' in kwargs:
3219
+ self.handle = kwargs['handle']
3220
+ _linksockslib.IncRef(self.handle)
3221
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3222
+ self.handle = args[0].handle
3223
+ _linksockslib.IncRef(self.handle)
3224
+ elif len(args) == 1 and isinstance(args[0], int):
3225
+ self.handle = args[0]
3226
+ _linksockslib.IncRef(self.handle)
3227
+ else:
3228
+ self.handle = 0
3229
+ def __del__(self):
3230
+ _linksockslib.DecRef(self.handle)
3231
+
3232
+
3233
+ # Python type for slice net.HardwareAddr
3234
+ class HardwareAddr(GoClass):
3235
+ """"""
3236
+ def __init__(self, *args, **kwargs):
3237
+ """
3238
+ handle=A Go-side object is always initialized with an explicit handle=arg
3239
+ otherwise parameter is a python list that we copy from
3240
+ """
3241
+ self.index = 0
3242
+ if len(kwargs) == 1 and 'handle' in kwargs:
3243
+ self.handle = kwargs['handle']
3244
+ _linksockslib.IncRef(self.handle)
3245
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3246
+ self.handle = args[0].handle
3247
+ _linksockslib.IncRef(self.handle)
3248
+ else:
3249
+ self.handle = _linksockslib.net_HardwareAddr_CTor()
3250
+ _linksockslib.IncRef(self.handle)
3251
+ if len(args) > 0:
3252
+ if not isinstance(args[0], _collections_abc.Iterable):
3253
+ raise TypeError('net_HardwareAddr.__init__ takes a sequence as argument')
3254
+ for elt in args[0]:
3255
+ self.append(elt)
3256
+ def __del__(self):
3257
+ _linksockslib.DecRef(self.handle)
3258
+ def __str__(self):
3259
+ s = 'net.net_HardwareAddr len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
3260
+ if len(self) < 120:
3261
+ s += ', '.join(map(str, self)) + ']'
3262
+ return s
3263
+ def __repr__(self):
3264
+ return 'net.net_HardwareAddr([' + ', '.join(map(str, self)) + '])'
3265
+ def __len__(self):
3266
+ return _linksockslib.net_HardwareAddr_len(self.handle)
3267
+ def __getitem__(self, key):
3268
+ if isinstance(key, slice):
3269
+ if key.step == None or key.step == 1:
3270
+ st = key.start
3271
+ ed = key.stop
3272
+ if st == None:
3273
+ st = 0
3274
+ if ed == None:
3275
+ ed = _linksockslib.net_HardwareAddr_len(self.handle)
3276
+ return HardwareAddr(handle=_linksockslib.net_HardwareAddr_subslice(self.handle, st, ed))
3277
+ return [self[ii] for ii in range(*key.indices(len(self)))]
3278
+ elif isinstance(key, int):
3279
+ if key < 0:
3280
+ key += len(self)
3281
+ if key < 0 or key >= len(self):
3282
+ raise IndexError('slice index out of range')
3283
+ return _linksockslib.net_HardwareAddr_elem(self.handle, key)
3284
+ else:
3285
+ raise TypeError('slice index invalid type')
3286
+ def __setitem__(self, idx, value):
3287
+ if idx < 0:
3288
+ idx += len(self)
3289
+ if idx < len(self):
3290
+ _linksockslib.net_HardwareAddr_set(self.handle, idx, value)
3291
+ return
3292
+ raise IndexError('slice index out of range')
3293
+ def __iadd__(self, value):
3294
+ if not isinstance(value, _collections_abc.Iterable):
3295
+ raise TypeError('net_HardwareAddr.__iadd__ takes a sequence as argument')
3296
+ for elt in value:
3297
+ self.append(elt)
3298
+ return self
3299
+ def __iter__(self):
3300
+ self.index = 0
3301
+ return self
3302
+ def __next__(self):
3303
+ if self.index < len(self):
3304
+ rv = _linksockslib.net_HardwareAddr_elem(self.handle, self.index)
3305
+ self.index = self.index + 1
3306
+ return rv
3307
+ raise StopIteration
3308
+ def append(self, value):
3309
+ _linksockslib.net_HardwareAddr_append(self.handle, value)
3310
+ def copy(self, src):
3311
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
3312
+ mx = min(len(self), len(src))
3313
+ for i in range(mx):
3314
+ self[i] = src[i]
3315
+
3316
+ # Python type for slice net.IP
3317
+ class IP(GoClass):
3318
+ """"""
3319
+ def __init__(self, *args, **kwargs):
3320
+ """
3321
+ handle=A Go-side object is always initialized with an explicit handle=arg
3322
+ otherwise parameter is a python list that we copy from
3323
+ """
3324
+ self.index = 0
3325
+ if len(kwargs) == 1 and 'handle' in kwargs:
3326
+ self.handle = kwargs['handle']
3327
+ _linksockslib.IncRef(self.handle)
3328
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3329
+ self.handle = args[0].handle
3330
+ _linksockslib.IncRef(self.handle)
3331
+ else:
3332
+ self.handle = _linksockslib.net_IP_CTor()
3333
+ _linksockslib.IncRef(self.handle)
3334
+ if len(args) > 0:
3335
+ if not isinstance(args[0], _collections_abc.Iterable):
3336
+ raise TypeError('net_IP.__init__ takes a sequence as argument')
3337
+ for elt in args[0]:
3338
+ self.append(elt)
3339
+ def __del__(self):
3340
+ _linksockslib.DecRef(self.handle)
3341
+ def __str__(self):
3342
+ s = 'net.net_IP len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
3343
+ if len(self) < 120:
3344
+ s += ', '.join(map(str, self)) + ']'
3345
+ return s
3346
+ def __repr__(self):
3347
+ return 'net.net_IP([' + ', '.join(map(str, self)) + '])'
3348
+ def __len__(self):
3349
+ return _linksockslib.net_IP_len(self.handle)
3350
+ def __getitem__(self, key):
3351
+ if isinstance(key, slice):
3352
+ if key.step == None or key.step == 1:
3353
+ st = key.start
3354
+ ed = key.stop
3355
+ if st == None:
3356
+ st = 0
3357
+ if ed == None:
3358
+ ed = _linksockslib.net_IP_len(self.handle)
3359
+ return IP(handle=_linksockslib.net_IP_subslice(self.handle, st, ed))
3360
+ return [self[ii] for ii in range(*key.indices(len(self)))]
3361
+ elif isinstance(key, int):
3362
+ if key < 0:
3363
+ key += len(self)
3364
+ if key < 0 or key >= len(self):
3365
+ raise IndexError('slice index out of range')
3366
+ return _linksockslib.net_IP_elem(self.handle, key)
3367
+ else:
3368
+ raise TypeError('slice index invalid type')
3369
+ def __setitem__(self, idx, value):
3370
+ if idx < 0:
3371
+ idx += len(self)
3372
+ if idx < len(self):
3373
+ _linksockslib.net_IP_set(self.handle, idx, value)
3374
+ return
3375
+ raise IndexError('slice index out of range')
3376
+ def __iadd__(self, value):
3377
+ if not isinstance(value, _collections_abc.Iterable):
3378
+ raise TypeError('net_IP.__iadd__ takes a sequence as argument')
3379
+ for elt in value:
3380
+ self.append(elt)
3381
+ return self
3382
+ def __iter__(self):
3383
+ self.index = 0
3384
+ return self
3385
+ def __next__(self):
3386
+ if self.index < len(self):
3387
+ rv = _linksockslib.net_IP_elem(self.handle, self.index)
3388
+ self.index = self.index + 1
3389
+ return rv
3390
+ raise StopIteration
3391
+ def append(self, value):
3392
+ _linksockslib.net_IP_append(self.handle, value)
3393
+ def copy(self, src):
3394
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
3395
+ mx = min(len(self), len(src))
3396
+ for i in range(mx):
3397
+ self[i] = src[i]
3398
+
3399
+ # Python type for slice net.IPMask
3400
+ class IPMask(GoClass):
3401
+ """"""
3402
+ def __init__(self, *args, **kwargs):
3403
+ """
3404
+ handle=A Go-side object is always initialized with an explicit handle=arg
3405
+ otherwise parameter is a python list that we copy from
3406
+ """
3407
+ self.index = 0
3408
+ if len(kwargs) == 1 and 'handle' in kwargs:
3409
+ self.handle = kwargs['handle']
3410
+ _linksockslib.IncRef(self.handle)
3411
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3412
+ self.handle = args[0].handle
3413
+ _linksockslib.IncRef(self.handle)
3414
+ else:
3415
+ self.handle = _linksockslib.net_IPMask_CTor()
3416
+ _linksockslib.IncRef(self.handle)
3417
+ if len(args) > 0:
3418
+ if not isinstance(args[0], _collections_abc.Iterable):
3419
+ raise TypeError('net_IPMask.__init__ takes a sequence as argument')
3420
+ for elt in args[0]:
3421
+ self.append(elt)
3422
+ def __del__(self):
3423
+ _linksockslib.DecRef(self.handle)
3424
+ def __str__(self):
3425
+ s = 'net.net_IPMask len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
3426
+ if len(self) < 120:
3427
+ s += ', '.join(map(str, self)) + ']'
3428
+ return s
3429
+ def __repr__(self):
3430
+ return 'net.net_IPMask([' + ', '.join(map(str, self)) + '])'
3431
+ def __len__(self):
3432
+ return _linksockslib.net_IPMask_len(self.handle)
3433
+ def __getitem__(self, key):
3434
+ if isinstance(key, slice):
3435
+ if key.step == None or key.step == 1:
3436
+ st = key.start
3437
+ ed = key.stop
3438
+ if st == None:
3439
+ st = 0
3440
+ if ed == None:
3441
+ ed = _linksockslib.net_IPMask_len(self.handle)
3442
+ return IPMask(handle=_linksockslib.net_IPMask_subslice(self.handle, st, ed))
3443
+ return [self[ii] for ii in range(*key.indices(len(self)))]
3444
+ elif isinstance(key, int):
3445
+ if key < 0:
3446
+ key += len(self)
3447
+ if key < 0 or key >= len(self):
3448
+ raise IndexError('slice index out of range')
3449
+ return _linksockslib.net_IPMask_elem(self.handle, key)
3450
+ else:
3451
+ raise TypeError('slice index invalid type')
3452
+ def __setitem__(self, idx, value):
3453
+ if idx < 0:
3454
+ idx += len(self)
3455
+ if idx < len(self):
3456
+ _linksockslib.net_IPMask_set(self.handle, idx, value)
3457
+ return
3458
+ raise IndexError('slice index out of range')
3459
+ def __iadd__(self, value):
3460
+ if not isinstance(value, _collections_abc.Iterable):
3461
+ raise TypeError('net_IPMask.__iadd__ takes a sequence as argument')
3462
+ for elt in value:
3463
+ self.append(elt)
3464
+ return self
3465
+ def __iter__(self):
3466
+ self.index = 0
3467
+ return self
3468
+ def __next__(self):
3469
+ if self.index < len(self):
3470
+ rv = _linksockslib.net_IPMask_elem(self.handle, self.index)
3471
+ self.index = self.index + 1
3472
+ return rv
3473
+ raise StopIteration
3474
+ def append(self, value):
3475
+ _linksockslib.net_IPMask_append(self.handle, value)
3476
+ def copy(self, src):
3477
+ """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
3478
+ mx = min(len(self), len(src))
3479
+ for i in range(mx):
3480
+ self[i] = src[i]
3481
+
3482
+ # Python type for net.IPNet
3483
+ class net_IPNet(GoClass):
3484
+ """"""
3485
+ def __init__(self, *args, **kwargs):
3486
+ """
3487
+ handle=A Go-side object is always initialized with an explicit handle=arg
3488
+ """
3489
+ if len(kwargs) == 1 and 'handle' in kwargs:
3490
+ self.handle = kwargs['handle']
3491
+ _linksockslib.IncRef(self.handle)
3492
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3493
+ self.handle = args[0].handle
3494
+ _linksockslib.IncRef(self.handle)
3495
+ elif len(args) == 1 and isinstance(args[0], int):
3496
+ self.handle = args[0]
3497
+ _linksockslib.IncRef(self.handle)
3498
+ else:
3499
+ self.handle = 0
3500
+ def __del__(self):
3501
+ _linksockslib.DecRef(self.handle)
3502
+
3503
+
3504
+ # Python type for net.Listener
3505
+ class net_Listener(GoClass):
3506
+ """"""
3507
+ def __init__(self, *args, **kwargs):
3508
+ """
3509
+ handle=A Go-side object is always initialized with an explicit handle=arg
3510
+ """
3511
+ if len(kwargs) == 1 and 'handle' in kwargs:
3512
+ self.handle = kwargs['handle']
3513
+ _linksockslib.IncRef(self.handle)
3514
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3515
+ self.handle = args[0].handle
3516
+ _linksockslib.IncRef(self.handle)
3517
+ elif len(args) == 1 and isinstance(args[0], int):
3518
+ self.handle = args[0]
3519
+ _linksockslib.IncRef(self.handle)
3520
+ else:
3521
+ self.handle = 0
3522
+ def __del__(self):
3523
+ _linksockslib.DecRef(self.handle)
3524
+
3525
+
3526
+ # Python type for net.UDPAddr
3527
+ class net_UDPAddr(GoClass):
3528
+ """"""
3529
+ def __init__(self, *args, **kwargs):
3530
+ """
3531
+ handle=A Go-side object is always initialized with an explicit handle=arg
3532
+ """
3533
+ if len(kwargs) == 1 and 'handle' in kwargs:
3534
+ self.handle = kwargs['handle']
3535
+ _linksockslib.IncRef(self.handle)
3536
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3537
+ self.handle = args[0].handle
3538
+ _linksockslib.IncRef(self.handle)
3539
+ elif len(args) == 1 and isinstance(args[0], int):
3540
+ self.handle = args[0]
3541
+ _linksockslib.IncRef(self.handle)
3542
+ else:
3543
+ self.handle = 0
3544
+ def __del__(self):
3545
+ _linksockslib.DecRef(self.handle)
3546
+
3547
+
3548
+ # Python type for net.UDPConn
3549
+ class net_UDPConn(GoClass):
3550
+ """"""
3551
+ def __init__(self, *args, **kwargs):
3552
+ """
3553
+ handle=A Go-side object is always initialized with an explicit handle=arg
3554
+ """
3555
+ if len(kwargs) == 1 and 'handle' in kwargs:
3556
+ self.handle = kwargs['handle']
3557
+ _linksockslib.IncRef(self.handle)
3558
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3559
+ self.handle = args[0].handle
3560
+ _linksockslib.IncRef(self.handle)
3561
+ elif len(args) == 1 and isinstance(args[0], int):
3562
+ self.handle = args[0]
3563
+ _linksockslib.IncRef(self.handle)
3564
+ else:
3565
+ self.handle = 0
3566
+ def __del__(self):
3567
+ _linksockslib.DecRef(self.handle)
3568
+
3569
+
3570
+ # Python type for http.Cookie
3571
+ class http_Cookie(GoClass):
3572
+ """"""
3573
+ def __init__(self, *args, **kwargs):
3574
+ """
3575
+ handle=A Go-side object is always initialized with an explicit handle=arg
3576
+ """
3577
+ if len(kwargs) == 1 and 'handle' in kwargs:
3578
+ self.handle = kwargs['handle']
3579
+ _linksockslib.IncRef(self.handle)
3580
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3581
+ self.handle = args[0].handle
3582
+ _linksockslib.IncRef(self.handle)
3583
+ elif len(args) == 1 and isinstance(args[0], int):
3584
+ self.handle = args[0]
3585
+ _linksockslib.IncRef(self.handle)
3586
+ else:
3587
+ self.handle = 0
3588
+ def __del__(self):
3589
+ _linksockslib.DecRef(self.handle)
3590
+
3591
+
3592
+ # Python type for http.Handler
3593
+ class http_Handler(GoClass):
3594
+ """"""
3595
+ def __init__(self, *args, **kwargs):
3596
+ """
3597
+ handle=A Go-side object is always initialized with an explicit handle=arg
3598
+ """
3599
+ if len(kwargs) == 1 and 'handle' in kwargs:
3600
+ self.handle = kwargs['handle']
3601
+ _linksockslib.IncRef(self.handle)
3602
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3603
+ self.handle = args[0].handle
3604
+ _linksockslib.IncRef(self.handle)
3605
+ elif len(args) == 1 and isinstance(args[0], int):
3606
+ self.handle = args[0]
3607
+ _linksockslib.IncRef(self.handle)
3608
+ else:
3609
+ self.handle = 0
3610
+ def __del__(self):
3611
+ _linksockslib.DecRef(self.handle)
3612
+
3613
+
3614
+ # Python type for map http.Header
3615
+ class Header(GoClass):
3616
+ """"""
3617
+ def __init__(self, *args, **kwargs):
3618
+ """
3619
+ handle=A Go-side object is always initialized with an explicit handle=arg
3620
+ otherwise parameter is a python list that we copy from
3621
+ """
3622
+ self.index = 0
3623
+ if len(kwargs) == 1 and 'handle' in kwargs:
3624
+ self.handle = kwargs['handle']
3625
+ _linksockslib.IncRef(self.handle)
3626
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3627
+ self.handle = args[0].handle
3628
+ _linksockslib.IncRef(self.handle)
3629
+ else:
3630
+ self.handle = _linksockslib.http_Header_CTor()
3631
+ _linksockslib.IncRef(self.handle)
3632
+ if len(args) > 0:
3633
+ if not isinstance(args[0], _collections_abc.Mapping):
3634
+ raise TypeError('http_Header.__init__ takes a mapping as argument')
3635
+ for k, v in args[0].items():
3636
+ _linksockslib.http_Header_set(self.handle, k, v)
3637
+ def __del__(self):
3638
+ _linksockslib.DecRef(self.handle)
3639
+ def __str__(self):
3640
+ s = 'linksockslib.http_Header len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' {'
3641
+ if len(self) < 120:
3642
+ for k, v in self.items():
3643
+ s += str(k) + '=' + str(v) + ', '
3644
+ return s + '}'
3645
+ def __repr__(self):
3646
+ s = 'linksockslib.http_Header({'
3647
+ for k, v in self.items():
3648
+ s += str(k) + '=' + str(v) + ', '
3649
+ return s + '})'
3650
+ def __len__(self):
3651
+ return _linksockslib.http_Header_len(self.handle)
3652
+ def __getitem__(self, key):
3653
+ return go.Slice_string(handle=_linksockslib.http_Header_elem(self.handle, key))
3654
+ def __setitem__(self, key, value):
3655
+ _linksockslib.http_Header_set(self.handle, key, value.handle)
3656
+ def __delitem__(self, key):
3657
+ return _linksockslib.http_Header_delete(self.handle, key)
3658
+ def keys(self):
3659
+ return go.Slice_string(handle=_linksockslib.http_Header_keys(self.handle))
3660
+ def values(self):
3661
+ vls = []
3662
+ kys = self.keys()
3663
+ for k in kys:
3664
+ vls.append(self[k])
3665
+ return vls
3666
+ def items(self):
3667
+ vls = []
3668
+ kys = self.keys()
3669
+ for k in kys:
3670
+ vls.append((k, self[k]))
3671
+ return vls
3672
+ def __iter__(self):
3673
+ return iter(self.items())
3674
+ def __contains__(self, key):
3675
+ return _linksockslib.http_Header_contains(self.handle, key)
3676
+
3677
+ # Python type for http.Request
3678
+ class http_Request(GoClass):
3679
+ """"""
3680
+ def __init__(self, *args, **kwargs):
3681
+ """
3682
+ handle=A Go-side object is always initialized with an explicit handle=arg
3683
+ """
3684
+ if len(kwargs) == 1 and 'handle' in kwargs:
3685
+ self.handle = kwargs['handle']
3686
+ _linksockslib.IncRef(self.handle)
3687
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3688
+ self.handle = args[0].handle
3689
+ _linksockslib.IncRef(self.handle)
3690
+ elif len(args) == 1 and isinstance(args[0], int):
3691
+ self.handle = args[0]
3692
+ _linksockslib.IncRef(self.handle)
3693
+ else:
3694
+ self.handle = 0
3695
+ def __del__(self):
3696
+ _linksockslib.DecRef(self.handle)
3697
+
3698
+
3699
+ # Python type for http.Response
3700
+ class http_Response(GoClass):
3701
+ """"""
3702
+ def __init__(self, *args, **kwargs):
3703
+ """
3704
+ handle=A Go-side object is always initialized with an explicit handle=arg
3705
+ """
3706
+ if len(kwargs) == 1 and 'handle' in kwargs:
3707
+ self.handle = kwargs['handle']
3708
+ _linksockslib.IncRef(self.handle)
3709
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3710
+ self.handle = args[0].handle
3711
+ _linksockslib.IncRef(self.handle)
3712
+ elif len(args) == 1 and isinstance(args[0], int):
3713
+ self.handle = args[0]
3714
+ _linksockslib.IncRef(self.handle)
3715
+ else:
3716
+ self.handle = 0
3717
+ def __del__(self):
3718
+ _linksockslib.DecRef(self.handle)
3719
+
3720
+
3721
+ # Python type for http.ResponseWriter
3722
+ class http_ResponseWriter(GoClass):
3723
+ """"""
3724
+ def __init__(self, *args, **kwargs):
3725
+ """
3726
+ handle=A Go-side object is always initialized with an explicit handle=arg
3727
+ """
3728
+ if len(kwargs) == 1 and 'handle' in kwargs:
3729
+ self.handle = kwargs['handle']
3730
+ _linksockslib.IncRef(self.handle)
3731
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3732
+ self.handle = args[0].handle
3733
+ _linksockslib.IncRef(self.handle)
3734
+ elif len(args) == 1 and isinstance(args[0], int):
3735
+ self.handle = args[0]
3736
+ _linksockslib.IncRef(self.handle)
3737
+ else:
3738
+ self.handle = 0
3739
+ def __del__(self):
3740
+ _linksockslib.DecRef(self.handle)
3741
+
3742
+
3743
+ # Python type for http.ServeMux
3744
+ class http_ServeMux(GoClass):
3745
+ """"""
3746
+ def __init__(self, *args, **kwargs):
3747
+ """
3748
+ handle=A Go-side object is always initialized with an explicit handle=arg
3749
+ """
3750
+ if len(kwargs) == 1 and 'handle' in kwargs:
3751
+ self.handle = kwargs['handle']
3752
+ _linksockslib.IncRef(self.handle)
3753
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3754
+ self.handle = args[0].handle
3755
+ _linksockslib.IncRef(self.handle)
3756
+ elif len(args) == 1 and isinstance(args[0], int):
3757
+ self.handle = args[0]
3758
+ _linksockslib.IncRef(self.handle)
3759
+ else:
3760
+ self.handle = 0
3761
+ def __del__(self):
3762
+ _linksockslib.DecRef(self.handle)
3763
+
3764
+
3765
+ # Python type for netip.Addr
3766
+ class netip_Addr(GoClass):
3767
+ """"""
3768
+ def __init__(self, *args, **kwargs):
3769
+ """
3770
+ handle=A Go-side object is always initialized with an explicit handle=arg
3771
+ """
3772
+ if len(kwargs) == 1 and 'handle' in kwargs:
3773
+ self.handle = kwargs['handle']
3774
+ _linksockslib.IncRef(self.handle)
3775
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3776
+ self.handle = args[0].handle
3777
+ _linksockslib.IncRef(self.handle)
3778
+ elif len(args) == 1 and isinstance(args[0], int):
3779
+ self.handle = args[0]
3780
+ _linksockslib.IncRef(self.handle)
3781
+ else:
3782
+ self.handle = 0
3783
+ def __del__(self):
3784
+ _linksockslib.DecRef(self.handle)
3785
+
3786
+
3787
+ # Python type for netip.AddrPort
3788
+ class netip_AddrPort(GoClass):
3789
+ """"""
3790
+ def __init__(self, *args, **kwargs):
3791
+ """
3792
+ handle=A Go-side object is always initialized with an explicit handle=arg
3793
+ """
3794
+ if len(kwargs) == 1 and 'handle' in kwargs:
3795
+ self.handle = kwargs['handle']
3796
+ _linksockslib.IncRef(self.handle)
3797
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3798
+ self.handle = args[0].handle
3799
+ _linksockslib.IncRef(self.handle)
3800
+ elif len(args) == 1 and isinstance(args[0], int):
3801
+ self.handle = args[0]
3802
+ _linksockslib.IncRef(self.handle)
3803
+ else:
3804
+ self.handle = 0
3805
+ def __del__(self):
3806
+ _linksockslib.DecRef(self.handle)
3807
+
3808
+
3809
+ # Python type for netip.Prefix
3810
+ class netip_Prefix(GoClass):
3811
+ """"""
3812
+ def __init__(self, *args, **kwargs):
3813
+ """
3814
+ handle=A Go-side object is always initialized with an explicit handle=arg
3815
+ """
3816
+ if len(kwargs) == 1 and 'handle' in kwargs:
3817
+ self.handle = kwargs['handle']
3818
+ _linksockslib.IncRef(self.handle)
3819
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3820
+ self.handle = args[0].handle
3821
+ _linksockslib.IncRef(self.handle)
3822
+ elif len(args) == 1 and isinstance(args[0], int):
3823
+ self.handle = args[0]
3824
+ _linksockslib.IncRef(self.handle)
3825
+ else:
3826
+ self.handle = 0
3827
+ def __del__(self):
3828
+ _linksockslib.DecRef(self.handle)
3829
+
3830
+
3831
+ # Python type for map textproto.MIMEHeader
3832
+ class MIMEHeader(GoClass):
3833
+ """"""
3834
+ def __init__(self, *args, **kwargs):
3835
+ """
3836
+ handle=A Go-side object is always initialized with an explicit handle=arg
3837
+ otherwise parameter is a python list that we copy from
3838
+ """
3839
+ self.index = 0
3840
+ if len(kwargs) == 1 and 'handle' in kwargs:
3841
+ self.handle = kwargs['handle']
3842
+ _linksockslib.IncRef(self.handle)
3843
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3844
+ self.handle = args[0].handle
3845
+ _linksockslib.IncRef(self.handle)
3846
+ else:
3847
+ self.handle = _linksockslib.textproto_MIMEHeader_CTor()
3848
+ _linksockslib.IncRef(self.handle)
3849
+ if len(args) > 0:
3850
+ if not isinstance(args[0], _collections_abc.Mapping):
3851
+ raise TypeError('textproto_MIMEHeader.__init__ takes a mapping as argument')
3852
+ for k, v in args[0].items():
3853
+ _linksockslib.textproto_MIMEHeader_set(self.handle, k, v)
3854
+ def __del__(self):
3855
+ _linksockslib.DecRef(self.handle)
3856
+ def __str__(self):
3857
+ s = 'linksockslib.textproto_MIMEHeader len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' {'
3858
+ if len(self) < 120:
3859
+ for k, v in self.items():
3860
+ s += str(k) + '=' + str(v) + ', '
3861
+ return s + '}'
3862
+ def __repr__(self):
3863
+ s = 'linksockslib.textproto_MIMEHeader({'
3864
+ for k, v in self.items():
3865
+ s += str(k) + '=' + str(v) + ', '
3866
+ return s + '})'
3867
+ def __len__(self):
3868
+ return _linksockslib.textproto_MIMEHeader_len(self.handle)
3869
+ def __getitem__(self, key):
3870
+ return go.Slice_string(handle=_linksockslib.textproto_MIMEHeader_elem(self.handle, key))
3871
+ def __setitem__(self, key, value):
3872
+ _linksockslib.textproto_MIMEHeader_set(self.handle, key, value.handle)
3873
+ def __delitem__(self, key):
3874
+ return _linksockslib.textproto_MIMEHeader_delete(self.handle, key)
3875
+ def keys(self):
3876
+ return go.Slice_string(handle=_linksockslib.textproto_MIMEHeader_keys(self.handle))
3877
+ def values(self):
3878
+ vls = []
3879
+ kys = self.keys()
3880
+ for k in kys:
3881
+ vls.append(self[k])
3882
+ return vls
3883
+ def items(self):
3884
+ vls = []
3885
+ kys = self.keys()
3886
+ for k in kys:
3887
+ vls.append((k, self[k]))
3888
+ return vls
3889
+ def __iter__(self):
3890
+ return iter(self.items())
3891
+ def __contains__(self, key):
3892
+ return _linksockslib.textproto_MIMEHeader_contains(self.handle, key)
3893
+
3894
+ # Python type for url.URL
3895
+ class url_URL(GoClass):
3896
+ """"""
3897
+ def __init__(self, *args, **kwargs):
3898
+ """
3899
+ handle=A Go-side object is always initialized with an explicit handle=arg
3900
+ """
3901
+ if len(kwargs) == 1 and 'handle' in kwargs:
3902
+ self.handle = kwargs['handle']
3903
+ _linksockslib.IncRef(self.handle)
3904
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3905
+ self.handle = args[0].handle
3906
+ _linksockslib.IncRef(self.handle)
3907
+ elif len(args) == 1 and isinstance(args[0], int):
3908
+ self.handle = args[0]
3909
+ _linksockslib.IncRef(self.handle)
3910
+ else:
3911
+ self.handle = 0
3912
+ def __del__(self):
3913
+ _linksockslib.DecRef(self.handle)
3914
+
3915
+
3916
+ # Python type for url.Userinfo
3917
+ class url_Userinfo(GoClass):
3918
+ """"""
3919
+ def __init__(self, *args, **kwargs):
3920
+ """
3921
+ handle=A Go-side object is always initialized with an explicit handle=arg
3922
+ """
3923
+ if len(kwargs) == 1 and 'handle' in kwargs:
3924
+ self.handle = kwargs['handle']
3925
+ _linksockslib.IncRef(self.handle)
3926
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3927
+ self.handle = args[0].handle
3928
+ _linksockslib.IncRef(self.handle)
3929
+ elif len(args) == 1 and isinstance(args[0], int):
3930
+ self.handle = args[0]
3931
+ _linksockslib.IncRef(self.handle)
3932
+ else:
3933
+ self.handle = 0
3934
+ def __del__(self):
3935
+ _linksockslib.DecRef(self.handle)
3936
+
3937
+
3938
+ # Python type for map url.Values
3939
+ class Values(GoClass):
3940
+ """"""
3941
+ def __init__(self, *args, **kwargs):
3942
+ """
3943
+ handle=A Go-side object is always initialized with an explicit handle=arg
3944
+ otherwise parameter is a python list that we copy from
3945
+ """
3946
+ self.index = 0
3947
+ if len(kwargs) == 1 and 'handle' in kwargs:
3948
+ self.handle = kwargs['handle']
3949
+ _linksockslib.IncRef(self.handle)
3950
+ elif len(args) == 1 and isinstance(args[0], GoClass):
3951
+ self.handle = args[0].handle
3952
+ _linksockslib.IncRef(self.handle)
3953
+ else:
3954
+ self.handle = _linksockslib.url_Values_CTor()
3955
+ _linksockslib.IncRef(self.handle)
3956
+ if len(args) > 0:
3957
+ if not isinstance(args[0], _collections_abc.Mapping):
3958
+ raise TypeError('url_Values.__init__ takes a mapping as argument')
3959
+ for k, v in args[0].items():
3960
+ _linksockslib.url_Values_set(self.handle, k, v)
3961
+ def __del__(self):
3962
+ _linksockslib.DecRef(self.handle)
3963
+ def __str__(self):
3964
+ s = 'linksockslib.url_Values len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' {'
3965
+ if len(self) < 120:
3966
+ for k, v in self.items():
3967
+ s += str(k) + '=' + str(v) + ', '
3968
+ return s + '}'
3969
+ def __repr__(self):
3970
+ s = 'linksockslib.url_Values({'
3971
+ for k, v in self.items():
3972
+ s += str(k) + '=' + str(v) + ', '
3973
+ return s + '})'
3974
+ def __len__(self):
3975
+ return _linksockslib.url_Values_len(self.handle)
3976
+ def __getitem__(self, key):
3977
+ return go.Slice_string(handle=_linksockslib.url_Values_elem(self.handle, key))
3978
+ def __setitem__(self, key, value):
3979
+ _linksockslib.url_Values_set(self.handle, key, value.handle)
3980
+ def __delitem__(self, key):
3981
+ return _linksockslib.url_Values_delete(self.handle, key)
3982
+ def keys(self):
3983
+ return go.Slice_string(handle=_linksockslib.url_Values_keys(self.handle))
3984
+ def values(self):
3985
+ vls = []
3986
+ kys = self.keys()
3987
+ for k in kys:
3988
+ vls.append(self[k])
3989
+ return vls
3990
+ def items(self):
3991
+ vls = []
3992
+ kys = self.keys()
3993
+ for k in kys:
3994
+ vls.append((k, self[k]))
3995
+ return vls
3996
+ def __iter__(self):
3997
+ return iter(self.items())
3998
+ def __contains__(self, key):
3999
+ return _linksockslib.url_Values_contains(self.handle, key)
4000
+
4001
+ # Python type for syscall.RawConn
4002
+ class syscall_RawConn(GoClass):
4003
+ """"""
4004
+ def __init__(self, *args, **kwargs):
4005
+ """
4006
+ handle=A Go-side object is always initialized with an explicit handle=arg
4007
+ """
4008
+ if len(kwargs) == 1 and 'handle' in kwargs:
4009
+ self.handle = kwargs['handle']
4010
+ _linksockslib.IncRef(self.handle)
4011
+ elif len(args) == 1 and isinstance(args[0], GoClass):
4012
+ self.handle = args[0].handle
4013
+ _linksockslib.IncRef(self.handle)
4014
+ elif len(args) == 1 and isinstance(args[0], int):
4015
+ self.handle = args[0]
4016
+ _linksockslib.IncRef(self.handle)
4017
+ else:
4018
+ self.handle = 0
4019
+ def __del__(self):
4020
+ _linksockslib.DecRef(self.handle)
4021
+
4022
+
4023
+ # Python type for time.Location
4024
+ class time_Location(GoClass):
4025
+ """"""
4026
+ def __init__(self, *args, **kwargs):
4027
+ """
4028
+ handle=A Go-side object is always initialized with an explicit handle=arg
4029
+ """
4030
+ if len(kwargs) == 1 and 'handle' in kwargs:
4031
+ self.handle = kwargs['handle']
4032
+ _linksockslib.IncRef(self.handle)
4033
+ elif len(args) == 1 and isinstance(args[0], GoClass):
4034
+ self.handle = args[0].handle
4035
+ _linksockslib.IncRef(self.handle)
4036
+ elif len(args) == 1 and isinstance(args[0], int):
4037
+ self.handle = args[0]
4038
+ _linksockslib.IncRef(self.handle)
4039
+ else:
4040
+ self.handle = 0
4041
+ def __del__(self):
4042
+ _linksockslib.DecRef(self.handle)
4043
+
4044
+
4045
+ # Python type for time.Time
4046
+ class time_Time(GoClass):
4047
+ """"""
4048
+ def __init__(self, *args, **kwargs):
4049
+ """
4050
+ handle=A Go-side object is always initialized with an explicit handle=arg
4051
+ """
4052
+ if len(kwargs) == 1 and 'handle' in kwargs:
4053
+ self.handle = kwargs['handle']
4054
+ _linksockslib.IncRef(self.handle)
4055
+ elif len(args) == 1 and isinstance(args[0], GoClass):
4056
+ self.handle = args[0].handle
4057
+ _linksockslib.IncRef(self.handle)
4058
+ elif len(args) == 1 and isinstance(args[0], int):
4059
+ self.handle = args[0]
4060
+ _linksockslib.IncRef(self.handle)
4061
+ else:
4062
+ self.handle = 0
4063
+ def __del__(self):
4064
+ _linksockslib.DecRef(self.handle)
4065
+
4066
+
4067
+