linksocks 1.7.1__cp313-cp313-macosx_14_0_universal2.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.
- linksocks/__init__.py +9 -0
- linksocks/_base.py +230 -0
- linksocks/_cli.py +291 -0
- linksocks/_client.py +291 -0
- linksocks/_logging_config.py +182 -0
- linksocks/_server.py +355 -0
- linksocks/_utils.py +144 -0
- linksocks-1.7.1.dist-info/METADATA +493 -0
- linksocks-1.7.1.dist-info/RECORD +21 -0
- linksocks-1.7.1.dist-info/WHEEL +5 -0
- linksocks-1.7.1.dist-info/entry_points.txt +2 -0
- linksocks-1.7.1.dist-info/top_level.txt +2 -0
- linksockslib/__init__.py +0 -0
- linksockslib/_linksockslib.cpython-313-darwin.h +1101 -0
- linksockslib/_linksockslib.cpython-313-darwin.so +0 -0
- linksockslib/build.py +761 -0
- linksockslib/go.py +4023 -0
- linksockslib/linksocks.py +5756 -0
- linksockslib/linksockslib.c +14300 -0
- linksockslib/linksockslib.go +8238 -0
- linksockslib/linksockslib_go.h +1101 -0
linksockslib/go.py
ADDED
|
@@ -0,0 +1,4023 @@
|
|
|
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 build -vm=/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/linksocks_pyvenv_lx243mum/venv/bin/python -output=/Users/runner/work/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.VerifyOptions
|
|
2095
|
+
class x509_VerifyOptions(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 pkix.AlgorithmIdentifier
|
|
2117
|
+
class pkix_AlgorithmIdentifier(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 pkix.AttributeTypeAndValue
|
|
2139
|
+
class pkix_AttributeTypeAndValue(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.CertificateList
|
|
2161
|
+
class pkix_CertificateList(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.Extension
|
|
2183
|
+
class pkix_Extension(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.Name
|
|
2205
|
+
class pkix_Name(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 slice pkix.RelativeDistinguishedNameSET
|
|
2227
|
+
class RelativeDistinguishedNameSET(GoClass):
|
|
2228
|
+
""""""
|
|
2229
|
+
def __init__(self, *args, **kwargs):
|
|
2230
|
+
"""
|
|
2231
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
2232
|
+
otherwise parameter is a python list that we copy from
|
|
2233
|
+
"""
|
|
2234
|
+
self.index = 0
|
|
2235
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
2236
|
+
self.handle = kwargs['handle']
|
|
2237
|
+
_linksockslib.IncRef(self.handle)
|
|
2238
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
2239
|
+
self.handle = args[0].handle
|
|
2240
|
+
_linksockslib.IncRef(self.handle)
|
|
2241
|
+
else:
|
|
2242
|
+
self.handle = _linksockslib.pkix_RelativeDistinguishedNameSET_CTor()
|
|
2243
|
+
_linksockslib.IncRef(self.handle)
|
|
2244
|
+
if len(args) > 0:
|
|
2245
|
+
if not isinstance(args[0], _collections_abc.Iterable):
|
|
2246
|
+
raise TypeError('pkix_RelativeDistinguishedNameSET.__init__ takes a sequence as argument')
|
|
2247
|
+
for elt in args[0]:
|
|
2248
|
+
self.append(elt)
|
|
2249
|
+
def __del__(self):
|
|
2250
|
+
_linksockslib.DecRef(self.handle)
|
|
2251
|
+
def __str__(self):
|
|
2252
|
+
s = 'pkix.pkix_RelativeDistinguishedNameSET len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
|
|
2253
|
+
if len(self) < 120:
|
|
2254
|
+
s += ', '.join(map(str, self)) + ']'
|
|
2255
|
+
return s
|
|
2256
|
+
def __repr__(self):
|
|
2257
|
+
return 'pkix.pkix_RelativeDistinguishedNameSET([' + ', '.join(map(str, self)) + '])'
|
|
2258
|
+
def __len__(self):
|
|
2259
|
+
return _linksockslib.pkix_RelativeDistinguishedNameSET_len(self.handle)
|
|
2260
|
+
def __getitem__(self, key):
|
|
2261
|
+
if isinstance(key, slice):
|
|
2262
|
+
if key.step == None or key.step == 1:
|
|
2263
|
+
st = key.start
|
|
2264
|
+
ed = key.stop
|
|
2265
|
+
if st == None:
|
|
2266
|
+
st = 0
|
|
2267
|
+
if ed == None:
|
|
2268
|
+
ed = _linksockslib.pkix_RelativeDistinguishedNameSET_len(self.handle)
|
|
2269
|
+
return RelativeDistinguishedNameSET(handle=_linksockslib.pkix_RelativeDistinguishedNameSET_subslice(self.handle, st, ed))
|
|
2270
|
+
return [self[ii] for ii in range(*key.indices(len(self)))]
|
|
2271
|
+
elif isinstance(key, int):
|
|
2272
|
+
if key < 0:
|
|
2273
|
+
key += len(self)
|
|
2274
|
+
if key < 0 or key >= len(self):
|
|
2275
|
+
raise IndexError('slice index out of range')
|
|
2276
|
+
return go.pkix_AttributeTypeAndValue(handle=_linksockslib.pkix_RelativeDistinguishedNameSET_elem(self.handle, key))
|
|
2277
|
+
else:
|
|
2278
|
+
raise TypeError('slice index invalid type')
|
|
2279
|
+
def __setitem__(self, idx, value):
|
|
2280
|
+
if idx < 0:
|
|
2281
|
+
idx += len(self)
|
|
2282
|
+
if idx < len(self):
|
|
2283
|
+
_linksockslib.pkix_RelativeDistinguishedNameSET_set(self.handle, idx, value.handle)
|
|
2284
|
+
return
|
|
2285
|
+
raise IndexError('slice index out of range')
|
|
2286
|
+
def __iadd__(self, value):
|
|
2287
|
+
if not isinstance(value, _collections_abc.Iterable):
|
|
2288
|
+
raise TypeError('pkix_RelativeDistinguishedNameSET.__iadd__ takes a sequence as argument')
|
|
2289
|
+
for elt in value:
|
|
2290
|
+
self.append(elt)
|
|
2291
|
+
return self
|
|
2292
|
+
def __iter__(self):
|
|
2293
|
+
self.index = 0
|
|
2294
|
+
return self
|
|
2295
|
+
def __next__(self):
|
|
2296
|
+
if self.index < len(self):
|
|
2297
|
+
rv = go.pkix_AttributeTypeAndValue(handle=_linksockslib.pkix_RelativeDistinguishedNameSET_elem(self.handle, self.index))
|
|
2298
|
+
self.index = self.index + 1
|
|
2299
|
+
return rv
|
|
2300
|
+
raise StopIteration
|
|
2301
|
+
def append(self, value):
|
|
2302
|
+
_linksockslib.pkix_RelativeDistinguishedNameSET_append(self.handle, value.handle)
|
|
2303
|
+
def copy(self, src):
|
|
2304
|
+
""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
|
|
2305
|
+
mx = min(len(self), len(src))
|
|
2306
|
+
for i in range(mx):
|
|
2307
|
+
self[i] = src[i]
|
|
2308
|
+
|
|
2309
|
+
# Python type for pkix.RevokedCertificate
|
|
2310
|
+
class pkix_RevokedCertificate(GoClass):
|
|
2311
|
+
""""""
|
|
2312
|
+
def __init__(self, *args, **kwargs):
|
|
2313
|
+
"""
|
|
2314
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
2315
|
+
"""
|
|
2316
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
2317
|
+
self.handle = kwargs['handle']
|
|
2318
|
+
_linksockslib.IncRef(self.handle)
|
|
2319
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
2320
|
+
self.handle = args[0].handle
|
|
2321
|
+
_linksockslib.IncRef(self.handle)
|
|
2322
|
+
elif len(args) == 1 and isinstance(args[0], int):
|
|
2323
|
+
self.handle = args[0]
|
|
2324
|
+
_linksockslib.IncRef(self.handle)
|
|
2325
|
+
else:
|
|
2326
|
+
self.handle = 0
|
|
2327
|
+
def __del__(self):
|
|
2328
|
+
_linksockslib.DecRef(self.handle)
|
|
2329
|
+
|
|
2330
|
+
|
|
2331
|
+
# Python type for pkix.TBSCertificateList
|
|
2332
|
+
class pkix_TBSCertificateList(GoClass):
|
|
2333
|
+
""""""
|
|
2334
|
+
def __init__(self, *args, **kwargs):
|
|
2335
|
+
"""
|
|
2336
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
2337
|
+
"""
|
|
2338
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
2339
|
+
self.handle = kwargs['handle']
|
|
2340
|
+
_linksockslib.IncRef(self.handle)
|
|
2341
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
2342
|
+
self.handle = args[0].handle
|
|
2343
|
+
_linksockslib.IncRef(self.handle)
|
|
2344
|
+
elif len(args) == 1 and isinstance(args[0], int):
|
|
2345
|
+
self.handle = args[0]
|
|
2346
|
+
_linksockslib.IncRef(self.handle)
|
|
2347
|
+
else:
|
|
2348
|
+
self.handle = 0
|
|
2349
|
+
def __del__(self):
|
|
2350
|
+
_linksockslib.DecRef(self.handle)
|
|
2351
|
+
|
|
2352
|
+
|
|
2353
|
+
# Python type for driver.Value
|
|
2354
|
+
class driver_Value(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 asn1.BitString
|
|
2376
|
+
class asn1_BitString(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 slice asn1.ObjectIdentifier
|
|
2398
|
+
class ObjectIdentifier(GoClass):
|
|
2399
|
+
""""""
|
|
2400
|
+
def __init__(self, *args, **kwargs):
|
|
2401
|
+
"""
|
|
2402
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
2403
|
+
otherwise parameter is a python list that we copy from
|
|
2404
|
+
"""
|
|
2405
|
+
self.index = 0
|
|
2406
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
2407
|
+
self.handle = kwargs['handle']
|
|
2408
|
+
_linksockslib.IncRef(self.handle)
|
|
2409
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
2410
|
+
self.handle = args[0].handle
|
|
2411
|
+
_linksockslib.IncRef(self.handle)
|
|
2412
|
+
else:
|
|
2413
|
+
self.handle = _linksockslib.asn1_ObjectIdentifier_CTor()
|
|
2414
|
+
_linksockslib.IncRef(self.handle)
|
|
2415
|
+
if len(args) > 0:
|
|
2416
|
+
if not isinstance(args[0], _collections_abc.Iterable):
|
|
2417
|
+
raise TypeError('asn1_ObjectIdentifier.__init__ takes a sequence as argument')
|
|
2418
|
+
for elt in args[0]:
|
|
2419
|
+
self.append(elt)
|
|
2420
|
+
def __del__(self):
|
|
2421
|
+
_linksockslib.DecRef(self.handle)
|
|
2422
|
+
def __str__(self):
|
|
2423
|
+
s = 'asn1.asn1_ObjectIdentifier len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
|
|
2424
|
+
if len(self) < 120:
|
|
2425
|
+
s += ', '.join(map(str, self)) + ']'
|
|
2426
|
+
return s
|
|
2427
|
+
def __repr__(self):
|
|
2428
|
+
return 'asn1.asn1_ObjectIdentifier([' + ', '.join(map(str, self)) + '])'
|
|
2429
|
+
def __len__(self):
|
|
2430
|
+
return _linksockslib.asn1_ObjectIdentifier_len(self.handle)
|
|
2431
|
+
def __getitem__(self, key):
|
|
2432
|
+
if isinstance(key, slice):
|
|
2433
|
+
if key.step == None or key.step == 1:
|
|
2434
|
+
st = key.start
|
|
2435
|
+
ed = key.stop
|
|
2436
|
+
if st == None:
|
|
2437
|
+
st = 0
|
|
2438
|
+
if ed == None:
|
|
2439
|
+
ed = _linksockslib.asn1_ObjectIdentifier_len(self.handle)
|
|
2440
|
+
return ObjectIdentifier(handle=_linksockslib.asn1_ObjectIdentifier_subslice(self.handle, st, ed))
|
|
2441
|
+
return [self[ii] for ii in range(*key.indices(len(self)))]
|
|
2442
|
+
elif isinstance(key, int):
|
|
2443
|
+
if key < 0:
|
|
2444
|
+
key += len(self)
|
|
2445
|
+
if key < 0 or key >= len(self):
|
|
2446
|
+
raise IndexError('slice index out of range')
|
|
2447
|
+
return _linksockslib.asn1_ObjectIdentifier_elem(self.handle, key)
|
|
2448
|
+
else:
|
|
2449
|
+
raise TypeError('slice index invalid type')
|
|
2450
|
+
def __setitem__(self, idx, value):
|
|
2451
|
+
if idx < 0:
|
|
2452
|
+
idx += len(self)
|
|
2453
|
+
if idx < len(self):
|
|
2454
|
+
_linksockslib.asn1_ObjectIdentifier_set(self.handle, idx, value)
|
|
2455
|
+
return
|
|
2456
|
+
raise IndexError('slice index out of range')
|
|
2457
|
+
def __iadd__(self, value):
|
|
2458
|
+
if not isinstance(value, _collections_abc.Iterable):
|
|
2459
|
+
raise TypeError('asn1_ObjectIdentifier.__iadd__ takes a sequence as argument')
|
|
2460
|
+
for elt in value:
|
|
2461
|
+
self.append(elt)
|
|
2462
|
+
return self
|
|
2463
|
+
def __iter__(self):
|
|
2464
|
+
self.index = 0
|
|
2465
|
+
return self
|
|
2466
|
+
def __next__(self):
|
|
2467
|
+
if self.index < len(self):
|
|
2468
|
+
rv = _linksockslib.asn1_ObjectIdentifier_elem(self.handle, self.index)
|
|
2469
|
+
self.index = self.index + 1
|
|
2470
|
+
return rv
|
|
2471
|
+
raise StopIteration
|
|
2472
|
+
def append(self, value):
|
|
2473
|
+
_linksockslib.asn1_ObjectIdentifier_append(self.handle, value)
|
|
2474
|
+
def copy(self, src):
|
|
2475
|
+
""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
|
|
2476
|
+
mx = min(len(self), len(src))
|
|
2477
|
+
for i in range(mx):
|
|
2478
|
+
self[i] = src[i]
|
|
2479
|
+
|
|
2480
|
+
# Python type for slice asn1.RawContent
|
|
2481
|
+
class RawContent(GoClass):
|
|
2482
|
+
""""""
|
|
2483
|
+
def __init__(self, *args, **kwargs):
|
|
2484
|
+
"""
|
|
2485
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
2486
|
+
otherwise parameter is a python list that we copy from
|
|
2487
|
+
"""
|
|
2488
|
+
self.index = 0
|
|
2489
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
2490
|
+
self.handle = kwargs['handle']
|
|
2491
|
+
_linksockslib.IncRef(self.handle)
|
|
2492
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
2493
|
+
self.handle = args[0].handle
|
|
2494
|
+
_linksockslib.IncRef(self.handle)
|
|
2495
|
+
else:
|
|
2496
|
+
self.handle = _linksockslib.asn1_RawContent_CTor()
|
|
2497
|
+
_linksockslib.IncRef(self.handle)
|
|
2498
|
+
if len(args) > 0:
|
|
2499
|
+
if not isinstance(args[0], _collections_abc.Iterable):
|
|
2500
|
+
raise TypeError('asn1_RawContent.__init__ takes a sequence as argument')
|
|
2501
|
+
for elt in args[0]:
|
|
2502
|
+
self.append(elt)
|
|
2503
|
+
def __del__(self):
|
|
2504
|
+
_linksockslib.DecRef(self.handle)
|
|
2505
|
+
def __str__(self):
|
|
2506
|
+
s = 'asn1.asn1_RawContent len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
|
|
2507
|
+
if len(self) < 120:
|
|
2508
|
+
s += ', '.join(map(str, self)) + ']'
|
|
2509
|
+
return s
|
|
2510
|
+
def __repr__(self):
|
|
2511
|
+
return 'asn1.asn1_RawContent([' + ', '.join(map(str, self)) + '])'
|
|
2512
|
+
def __len__(self):
|
|
2513
|
+
return _linksockslib.asn1_RawContent_len(self.handle)
|
|
2514
|
+
def __getitem__(self, key):
|
|
2515
|
+
if isinstance(key, slice):
|
|
2516
|
+
if key.step == None or key.step == 1:
|
|
2517
|
+
st = key.start
|
|
2518
|
+
ed = key.stop
|
|
2519
|
+
if st == None:
|
|
2520
|
+
st = 0
|
|
2521
|
+
if ed == None:
|
|
2522
|
+
ed = _linksockslib.asn1_RawContent_len(self.handle)
|
|
2523
|
+
return RawContent(handle=_linksockslib.asn1_RawContent_subslice(self.handle, st, ed))
|
|
2524
|
+
return [self[ii] for ii in range(*key.indices(len(self)))]
|
|
2525
|
+
elif isinstance(key, int):
|
|
2526
|
+
if key < 0:
|
|
2527
|
+
key += len(self)
|
|
2528
|
+
if key < 0 or key >= len(self):
|
|
2529
|
+
raise IndexError('slice index out of range')
|
|
2530
|
+
return _linksockslib.asn1_RawContent_elem(self.handle, key)
|
|
2531
|
+
else:
|
|
2532
|
+
raise TypeError('slice index invalid type')
|
|
2533
|
+
def __setitem__(self, idx, value):
|
|
2534
|
+
if idx < 0:
|
|
2535
|
+
idx += len(self)
|
|
2536
|
+
if idx < len(self):
|
|
2537
|
+
_linksockslib.asn1_RawContent_set(self.handle, idx, value)
|
|
2538
|
+
return
|
|
2539
|
+
raise IndexError('slice index out of range')
|
|
2540
|
+
def __iadd__(self, value):
|
|
2541
|
+
if not isinstance(value, _collections_abc.Iterable):
|
|
2542
|
+
raise TypeError('asn1_RawContent.__iadd__ takes a sequence as argument')
|
|
2543
|
+
for elt in value:
|
|
2544
|
+
self.append(elt)
|
|
2545
|
+
return self
|
|
2546
|
+
def __iter__(self):
|
|
2547
|
+
self.index = 0
|
|
2548
|
+
return self
|
|
2549
|
+
def __next__(self):
|
|
2550
|
+
if self.index < len(self):
|
|
2551
|
+
rv = _linksockslib.asn1_RawContent_elem(self.handle, self.index)
|
|
2552
|
+
self.index = self.index + 1
|
|
2553
|
+
return rv
|
|
2554
|
+
raise StopIteration
|
|
2555
|
+
def append(self, value):
|
|
2556
|
+
_linksockslib.asn1_RawContent_append(self.handle, value)
|
|
2557
|
+
def copy(self, src):
|
|
2558
|
+
""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
|
|
2559
|
+
mx = min(len(self), len(src))
|
|
2560
|
+
for i in range(mx):
|
|
2561
|
+
self[i] = src[i]
|
|
2562
|
+
|
|
2563
|
+
# Python type for asn1.RawValue
|
|
2564
|
+
class asn1_RawValue(GoClass):
|
|
2565
|
+
""""""
|
|
2566
|
+
def __init__(self, *args, **kwargs):
|
|
2567
|
+
"""
|
|
2568
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
2569
|
+
"""
|
|
2570
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
2571
|
+
self.handle = kwargs['handle']
|
|
2572
|
+
_linksockslib.IncRef(self.handle)
|
|
2573
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
2574
|
+
self.handle = args[0].handle
|
|
2575
|
+
_linksockslib.IncRef(self.handle)
|
|
2576
|
+
elif len(args) == 1 and isinstance(args[0], int):
|
|
2577
|
+
self.handle = args[0]
|
|
2578
|
+
_linksockslib.IncRef(self.handle)
|
|
2579
|
+
else:
|
|
2580
|
+
self.handle = 0
|
|
2581
|
+
def __del__(self):
|
|
2582
|
+
_linksockslib.DecRef(self.handle)
|
|
2583
|
+
|
|
2584
|
+
|
|
2585
|
+
# Python type for fmt.ScanState
|
|
2586
|
+
class fmt_ScanState(GoClass):
|
|
2587
|
+
""""""
|
|
2588
|
+
def __init__(self, *args, **kwargs):
|
|
2589
|
+
"""
|
|
2590
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
2591
|
+
"""
|
|
2592
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
2593
|
+
self.handle = kwargs['handle']
|
|
2594
|
+
_linksockslib.IncRef(self.handle)
|
|
2595
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
2596
|
+
self.handle = args[0].handle
|
|
2597
|
+
_linksockslib.IncRef(self.handle)
|
|
2598
|
+
elif len(args) == 1 and isinstance(args[0], int):
|
|
2599
|
+
self.handle = args[0]
|
|
2600
|
+
_linksockslib.IncRef(self.handle)
|
|
2601
|
+
else:
|
|
2602
|
+
self.handle = 0
|
|
2603
|
+
def __del__(self):
|
|
2604
|
+
_linksockslib.DecRef(self.handle)
|
|
2605
|
+
|
|
2606
|
+
|
|
2607
|
+
# Python type for fmt.State
|
|
2608
|
+
class fmt_State(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.Stringer
|
|
2630
|
+
class fmt_Stringer(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 slice uuid.UUID
|
|
2652
|
+
class UUID(GoClass):
|
|
2653
|
+
""""""
|
|
2654
|
+
def __init__(self, *args, **kwargs):
|
|
2655
|
+
"""
|
|
2656
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
2657
|
+
otherwise parameter is a python list that we copy from
|
|
2658
|
+
"""
|
|
2659
|
+
self.index = 0
|
|
2660
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
2661
|
+
self.handle = kwargs['handle']
|
|
2662
|
+
_linksockslib.IncRef(self.handle)
|
|
2663
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
2664
|
+
self.handle = args[0].handle
|
|
2665
|
+
_linksockslib.IncRef(self.handle)
|
|
2666
|
+
def __del__(self):
|
|
2667
|
+
_linksockslib.DecRef(self.handle)
|
|
2668
|
+
def __str__(self):
|
|
2669
|
+
s = 'uuid.uuid_UUID len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
|
|
2670
|
+
if len(self) < 120:
|
|
2671
|
+
s += ', '.join(map(str, self)) + ']'
|
|
2672
|
+
return s
|
|
2673
|
+
def __repr__(self):
|
|
2674
|
+
return 'uuid.uuid_UUID([' + ', '.join(map(str, self)) + '])'
|
|
2675
|
+
def __len__(self):
|
|
2676
|
+
return _linksockslib.uuid_UUID_len(self.handle)
|
|
2677
|
+
def __getitem__(self, key):
|
|
2678
|
+
if isinstance(key, slice):
|
|
2679
|
+
return [self[ii] for ii in range(*key.indices(len(self)))]
|
|
2680
|
+
elif isinstance(key, int):
|
|
2681
|
+
if key < 0:
|
|
2682
|
+
key += len(self)
|
|
2683
|
+
if key < 0 or key >= len(self):
|
|
2684
|
+
raise IndexError('slice index out of range')
|
|
2685
|
+
return _linksockslib.uuid_UUID_elem(self.handle, key)
|
|
2686
|
+
else:
|
|
2687
|
+
raise TypeError('slice index invalid type')
|
|
2688
|
+
def __setitem__(self, idx, value):
|
|
2689
|
+
if idx < 0:
|
|
2690
|
+
idx += len(self)
|
|
2691
|
+
if idx < len(self):
|
|
2692
|
+
_linksockslib.uuid_UUID_set(self.handle, idx, value)
|
|
2693
|
+
return
|
|
2694
|
+
raise IndexError('slice index out of range')
|
|
2695
|
+
def __iter__(self):
|
|
2696
|
+
self.index = 0
|
|
2697
|
+
return self
|
|
2698
|
+
def __next__(self):
|
|
2699
|
+
if self.index < len(self):
|
|
2700
|
+
rv = _linksockslib.uuid_UUID_elem(self.handle, self.index)
|
|
2701
|
+
self.index = self.index + 1
|
|
2702
|
+
return rv
|
|
2703
|
+
raise StopIteration
|
|
2704
|
+
|
|
2705
|
+
# Python type for websocket.Conn
|
|
2706
|
+
class websocket_Conn(GoClass):
|
|
2707
|
+
""""""
|
|
2708
|
+
def __init__(self, *args, **kwargs):
|
|
2709
|
+
"""
|
|
2710
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
2711
|
+
"""
|
|
2712
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
2713
|
+
self.handle = kwargs['handle']
|
|
2714
|
+
_linksockslib.IncRef(self.handle)
|
|
2715
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
2716
|
+
self.handle = args[0].handle
|
|
2717
|
+
_linksockslib.IncRef(self.handle)
|
|
2718
|
+
elif len(args) == 1 and isinstance(args[0], int):
|
|
2719
|
+
self.handle = args[0]
|
|
2720
|
+
_linksockslib.IncRef(self.handle)
|
|
2721
|
+
else:
|
|
2722
|
+
self.handle = 0
|
|
2723
|
+
def __del__(self):
|
|
2724
|
+
_linksockslib.DecRef(self.handle)
|
|
2725
|
+
|
|
2726
|
+
|
|
2727
|
+
# Python type for websocket.PreparedMessage
|
|
2728
|
+
class websocket_PreparedMessage(GoClass):
|
|
2729
|
+
""""""
|
|
2730
|
+
def __init__(self, *args, **kwargs):
|
|
2731
|
+
"""
|
|
2732
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
2733
|
+
"""
|
|
2734
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
2735
|
+
self.handle = kwargs['handle']
|
|
2736
|
+
_linksockslib.IncRef(self.handle)
|
|
2737
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
2738
|
+
self.handle = args[0].handle
|
|
2739
|
+
_linksockslib.IncRef(self.handle)
|
|
2740
|
+
elif len(args) == 1 and isinstance(args[0], int):
|
|
2741
|
+
self.handle = args[0]
|
|
2742
|
+
_linksockslib.IncRef(self.handle)
|
|
2743
|
+
else:
|
|
2744
|
+
self.handle = 0
|
|
2745
|
+
def __del__(self):
|
|
2746
|
+
_linksockslib.DecRef(self.handle)
|
|
2747
|
+
|
|
2748
|
+
|
|
2749
|
+
# Python type for zerolog.Context
|
|
2750
|
+
class zerolog_Context(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 zerolog.Event
|
|
2772
|
+
class zerolog_Event(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.Hook
|
|
2794
|
+
class zerolog_Hook(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.LogArrayMarshaler
|
|
2816
|
+
class zerolog_LogArrayMarshaler(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.LogObjectMarshaler
|
|
2838
|
+
class zerolog_LogObjectMarshaler(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.Logger
|
|
2860
|
+
class zerolog_Logger(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.Sampler
|
|
2882
|
+
class zerolog_Sampler(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 io.ReadCloser
|
|
2904
|
+
class io_ReadCloser(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 io.Reader
|
|
2926
|
+
class io_Reader(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.WriteCloser
|
|
2948
|
+
class io_WriteCloser(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.Writer
|
|
2970
|
+
class io_Writer(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 big.Int
|
|
2992
|
+
class big_Int(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 rand.Rand
|
|
3014
|
+
class rand_Rand(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 multipart.File
|
|
3036
|
+
class multipart_File(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 multipart.FileHeader
|
|
3058
|
+
class multipart_FileHeader(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.Form
|
|
3080
|
+
class multipart_Form(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.Part
|
|
3102
|
+
class multipart_Part(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.Reader
|
|
3124
|
+
class multipart_Reader(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 net.Addr
|
|
3146
|
+
class net_Addr(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 net.Conn
|
|
3168
|
+
class net_Conn(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 slice net.HardwareAddr
|
|
3190
|
+
class HardwareAddr(GoClass):
|
|
3191
|
+
""""""
|
|
3192
|
+
def __init__(self, *args, **kwargs):
|
|
3193
|
+
"""
|
|
3194
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
3195
|
+
otherwise parameter is a python list that we copy from
|
|
3196
|
+
"""
|
|
3197
|
+
self.index = 0
|
|
3198
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
3199
|
+
self.handle = kwargs['handle']
|
|
3200
|
+
_linksockslib.IncRef(self.handle)
|
|
3201
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
3202
|
+
self.handle = args[0].handle
|
|
3203
|
+
_linksockslib.IncRef(self.handle)
|
|
3204
|
+
else:
|
|
3205
|
+
self.handle = _linksockslib.net_HardwareAddr_CTor()
|
|
3206
|
+
_linksockslib.IncRef(self.handle)
|
|
3207
|
+
if len(args) > 0:
|
|
3208
|
+
if not isinstance(args[0], _collections_abc.Iterable):
|
|
3209
|
+
raise TypeError('net_HardwareAddr.__init__ takes a sequence as argument')
|
|
3210
|
+
for elt in args[0]:
|
|
3211
|
+
self.append(elt)
|
|
3212
|
+
def __del__(self):
|
|
3213
|
+
_linksockslib.DecRef(self.handle)
|
|
3214
|
+
def __str__(self):
|
|
3215
|
+
s = 'net.net_HardwareAddr len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
|
|
3216
|
+
if len(self) < 120:
|
|
3217
|
+
s += ', '.join(map(str, self)) + ']'
|
|
3218
|
+
return s
|
|
3219
|
+
def __repr__(self):
|
|
3220
|
+
return 'net.net_HardwareAddr([' + ', '.join(map(str, self)) + '])'
|
|
3221
|
+
def __len__(self):
|
|
3222
|
+
return _linksockslib.net_HardwareAddr_len(self.handle)
|
|
3223
|
+
def __getitem__(self, key):
|
|
3224
|
+
if isinstance(key, slice):
|
|
3225
|
+
if key.step == None or key.step == 1:
|
|
3226
|
+
st = key.start
|
|
3227
|
+
ed = key.stop
|
|
3228
|
+
if st == None:
|
|
3229
|
+
st = 0
|
|
3230
|
+
if ed == None:
|
|
3231
|
+
ed = _linksockslib.net_HardwareAddr_len(self.handle)
|
|
3232
|
+
return HardwareAddr(handle=_linksockslib.net_HardwareAddr_subslice(self.handle, st, ed))
|
|
3233
|
+
return [self[ii] for ii in range(*key.indices(len(self)))]
|
|
3234
|
+
elif isinstance(key, int):
|
|
3235
|
+
if key < 0:
|
|
3236
|
+
key += len(self)
|
|
3237
|
+
if key < 0 or key >= len(self):
|
|
3238
|
+
raise IndexError('slice index out of range')
|
|
3239
|
+
return _linksockslib.net_HardwareAddr_elem(self.handle, key)
|
|
3240
|
+
else:
|
|
3241
|
+
raise TypeError('slice index invalid type')
|
|
3242
|
+
def __setitem__(self, idx, value):
|
|
3243
|
+
if idx < 0:
|
|
3244
|
+
idx += len(self)
|
|
3245
|
+
if idx < len(self):
|
|
3246
|
+
_linksockslib.net_HardwareAddr_set(self.handle, idx, value)
|
|
3247
|
+
return
|
|
3248
|
+
raise IndexError('slice index out of range')
|
|
3249
|
+
def __iadd__(self, value):
|
|
3250
|
+
if not isinstance(value, _collections_abc.Iterable):
|
|
3251
|
+
raise TypeError('net_HardwareAddr.__iadd__ takes a sequence as argument')
|
|
3252
|
+
for elt in value:
|
|
3253
|
+
self.append(elt)
|
|
3254
|
+
return self
|
|
3255
|
+
def __iter__(self):
|
|
3256
|
+
self.index = 0
|
|
3257
|
+
return self
|
|
3258
|
+
def __next__(self):
|
|
3259
|
+
if self.index < len(self):
|
|
3260
|
+
rv = _linksockslib.net_HardwareAddr_elem(self.handle, self.index)
|
|
3261
|
+
self.index = self.index + 1
|
|
3262
|
+
return rv
|
|
3263
|
+
raise StopIteration
|
|
3264
|
+
def append(self, value):
|
|
3265
|
+
_linksockslib.net_HardwareAddr_append(self.handle, value)
|
|
3266
|
+
def copy(self, src):
|
|
3267
|
+
""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
|
|
3268
|
+
mx = min(len(self), len(src))
|
|
3269
|
+
for i in range(mx):
|
|
3270
|
+
self[i] = src[i]
|
|
3271
|
+
|
|
3272
|
+
# Python type for slice net.IP
|
|
3273
|
+
class IP(GoClass):
|
|
3274
|
+
""""""
|
|
3275
|
+
def __init__(self, *args, **kwargs):
|
|
3276
|
+
"""
|
|
3277
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
3278
|
+
otherwise parameter is a python list that we copy from
|
|
3279
|
+
"""
|
|
3280
|
+
self.index = 0
|
|
3281
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
3282
|
+
self.handle = kwargs['handle']
|
|
3283
|
+
_linksockslib.IncRef(self.handle)
|
|
3284
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
3285
|
+
self.handle = args[0].handle
|
|
3286
|
+
_linksockslib.IncRef(self.handle)
|
|
3287
|
+
else:
|
|
3288
|
+
self.handle = _linksockslib.net_IP_CTor()
|
|
3289
|
+
_linksockslib.IncRef(self.handle)
|
|
3290
|
+
if len(args) > 0:
|
|
3291
|
+
if not isinstance(args[0], _collections_abc.Iterable):
|
|
3292
|
+
raise TypeError('net_IP.__init__ takes a sequence as argument')
|
|
3293
|
+
for elt in args[0]:
|
|
3294
|
+
self.append(elt)
|
|
3295
|
+
def __del__(self):
|
|
3296
|
+
_linksockslib.DecRef(self.handle)
|
|
3297
|
+
def __str__(self):
|
|
3298
|
+
s = 'net.net_IP len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
|
|
3299
|
+
if len(self) < 120:
|
|
3300
|
+
s += ', '.join(map(str, self)) + ']'
|
|
3301
|
+
return s
|
|
3302
|
+
def __repr__(self):
|
|
3303
|
+
return 'net.net_IP([' + ', '.join(map(str, self)) + '])'
|
|
3304
|
+
def __len__(self):
|
|
3305
|
+
return _linksockslib.net_IP_len(self.handle)
|
|
3306
|
+
def __getitem__(self, key):
|
|
3307
|
+
if isinstance(key, slice):
|
|
3308
|
+
if key.step == None or key.step == 1:
|
|
3309
|
+
st = key.start
|
|
3310
|
+
ed = key.stop
|
|
3311
|
+
if st == None:
|
|
3312
|
+
st = 0
|
|
3313
|
+
if ed == None:
|
|
3314
|
+
ed = _linksockslib.net_IP_len(self.handle)
|
|
3315
|
+
return IP(handle=_linksockslib.net_IP_subslice(self.handle, st, ed))
|
|
3316
|
+
return [self[ii] for ii in range(*key.indices(len(self)))]
|
|
3317
|
+
elif isinstance(key, int):
|
|
3318
|
+
if key < 0:
|
|
3319
|
+
key += len(self)
|
|
3320
|
+
if key < 0 or key >= len(self):
|
|
3321
|
+
raise IndexError('slice index out of range')
|
|
3322
|
+
return _linksockslib.net_IP_elem(self.handle, key)
|
|
3323
|
+
else:
|
|
3324
|
+
raise TypeError('slice index invalid type')
|
|
3325
|
+
def __setitem__(self, idx, value):
|
|
3326
|
+
if idx < 0:
|
|
3327
|
+
idx += len(self)
|
|
3328
|
+
if idx < len(self):
|
|
3329
|
+
_linksockslib.net_IP_set(self.handle, idx, value)
|
|
3330
|
+
return
|
|
3331
|
+
raise IndexError('slice index out of range')
|
|
3332
|
+
def __iadd__(self, value):
|
|
3333
|
+
if not isinstance(value, _collections_abc.Iterable):
|
|
3334
|
+
raise TypeError('net_IP.__iadd__ takes a sequence as argument')
|
|
3335
|
+
for elt in value:
|
|
3336
|
+
self.append(elt)
|
|
3337
|
+
return self
|
|
3338
|
+
def __iter__(self):
|
|
3339
|
+
self.index = 0
|
|
3340
|
+
return self
|
|
3341
|
+
def __next__(self):
|
|
3342
|
+
if self.index < len(self):
|
|
3343
|
+
rv = _linksockslib.net_IP_elem(self.handle, self.index)
|
|
3344
|
+
self.index = self.index + 1
|
|
3345
|
+
return rv
|
|
3346
|
+
raise StopIteration
|
|
3347
|
+
def append(self, value):
|
|
3348
|
+
_linksockslib.net_IP_append(self.handle, value)
|
|
3349
|
+
def copy(self, src):
|
|
3350
|
+
""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
|
|
3351
|
+
mx = min(len(self), len(src))
|
|
3352
|
+
for i in range(mx):
|
|
3353
|
+
self[i] = src[i]
|
|
3354
|
+
|
|
3355
|
+
# Python type for slice net.IPMask
|
|
3356
|
+
class IPMask(GoClass):
|
|
3357
|
+
""""""
|
|
3358
|
+
def __init__(self, *args, **kwargs):
|
|
3359
|
+
"""
|
|
3360
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
3361
|
+
otherwise parameter is a python list that we copy from
|
|
3362
|
+
"""
|
|
3363
|
+
self.index = 0
|
|
3364
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
3365
|
+
self.handle = kwargs['handle']
|
|
3366
|
+
_linksockslib.IncRef(self.handle)
|
|
3367
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
3368
|
+
self.handle = args[0].handle
|
|
3369
|
+
_linksockslib.IncRef(self.handle)
|
|
3370
|
+
else:
|
|
3371
|
+
self.handle = _linksockslib.net_IPMask_CTor()
|
|
3372
|
+
_linksockslib.IncRef(self.handle)
|
|
3373
|
+
if len(args) > 0:
|
|
3374
|
+
if not isinstance(args[0], _collections_abc.Iterable):
|
|
3375
|
+
raise TypeError('net_IPMask.__init__ takes a sequence as argument')
|
|
3376
|
+
for elt in args[0]:
|
|
3377
|
+
self.append(elt)
|
|
3378
|
+
def __del__(self):
|
|
3379
|
+
_linksockslib.DecRef(self.handle)
|
|
3380
|
+
def __str__(self):
|
|
3381
|
+
s = 'net.net_IPMask len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
|
|
3382
|
+
if len(self) < 120:
|
|
3383
|
+
s += ', '.join(map(str, self)) + ']'
|
|
3384
|
+
return s
|
|
3385
|
+
def __repr__(self):
|
|
3386
|
+
return 'net.net_IPMask([' + ', '.join(map(str, self)) + '])'
|
|
3387
|
+
def __len__(self):
|
|
3388
|
+
return _linksockslib.net_IPMask_len(self.handle)
|
|
3389
|
+
def __getitem__(self, key):
|
|
3390
|
+
if isinstance(key, slice):
|
|
3391
|
+
if key.step == None or key.step == 1:
|
|
3392
|
+
st = key.start
|
|
3393
|
+
ed = key.stop
|
|
3394
|
+
if st == None:
|
|
3395
|
+
st = 0
|
|
3396
|
+
if ed == None:
|
|
3397
|
+
ed = _linksockslib.net_IPMask_len(self.handle)
|
|
3398
|
+
return IPMask(handle=_linksockslib.net_IPMask_subslice(self.handle, st, ed))
|
|
3399
|
+
return [self[ii] for ii in range(*key.indices(len(self)))]
|
|
3400
|
+
elif isinstance(key, int):
|
|
3401
|
+
if key < 0:
|
|
3402
|
+
key += len(self)
|
|
3403
|
+
if key < 0 or key >= len(self):
|
|
3404
|
+
raise IndexError('slice index out of range')
|
|
3405
|
+
return _linksockslib.net_IPMask_elem(self.handle, key)
|
|
3406
|
+
else:
|
|
3407
|
+
raise TypeError('slice index invalid type')
|
|
3408
|
+
def __setitem__(self, idx, value):
|
|
3409
|
+
if idx < 0:
|
|
3410
|
+
idx += len(self)
|
|
3411
|
+
if idx < len(self):
|
|
3412
|
+
_linksockslib.net_IPMask_set(self.handle, idx, value)
|
|
3413
|
+
return
|
|
3414
|
+
raise IndexError('slice index out of range')
|
|
3415
|
+
def __iadd__(self, value):
|
|
3416
|
+
if not isinstance(value, _collections_abc.Iterable):
|
|
3417
|
+
raise TypeError('net_IPMask.__iadd__ takes a sequence as argument')
|
|
3418
|
+
for elt in value:
|
|
3419
|
+
self.append(elt)
|
|
3420
|
+
return self
|
|
3421
|
+
def __iter__(self):
|
|
3422
|
+
self.index = 0
|
|
3423
|
+
return self
|
|
3424
|
+
def __next__(self):
|
|
3425
|
+
if self.index < len(self):
|
|
3426
|
+
rv = _linksockslib.net_IPMask_elem(self.handle, self.index)
|
|
3427
|
+
self.index = self.index + 1
|
|
3428
|
+
return rv
|
|
3429
|
+
raise StopIteration
|
|
3430
|
+
def append(self, value):
|
|
3431
|
+
_linksockslib.net_IPMask_append(self.handle, value)
|
|
3432
|
+
def copy(self, src):
|
|
3433
|
+
""" copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """
|
|
3434
|
+
mx = min(len(self), len(src))
|
|
3435
|
+
for i in range(mx):
|
|
3436
|
+
self[i] = src[i]
|
|
3437
|
+
|
|
3438
|
+
# Python type for net.IPNet
|
|
3439
|
+
class net_IPNet(GoClass):
|
|
3440
|
+
""""""
|
|
3441
|
+
def __init__(self, *args, **kwargs):
|
|
3442
|
+
"""
|
|
3443
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
3444
|
+
"""
|
|
3445
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
3446
|
+
self.handle = kwargs['handle']
|
|
3447
|
+
_linksockslib.IncRef(self.handle)
|
|
3448
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
3449
|
+
self.handle = args[0].handle
|
|
3450
|
+
_linksockslib.IncRef(self.handle)
|
|
3451
|
+
elif len(args) == 1 and isinstance(args[0], int):
|
|
3452
|
+
self.handle = args[0]
|
|
3453
|
+
_linksockslib.IncRef(self.handle)
|
|
3454
|
+
else:
|
|
3455
|
+
self.handle = 0
|
|
3456
|
+
def __del__(self):
|
|
3457
|
+
_linksockslib.DecRef(self.handle)
|
|
3458
|
+
|
|
3459
|
+
|
|
3460
|
+
# Python type for net.Listener
|
|
3461
|
+
class net_Listener(GoClass):
|
|
3462
|
+
""""""
|
|
3463
|
+
def __init__(self, *args, **kwargs):
|
|
3464
|
+
"""
|
|
3465
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
3466
|
+
"""
|
|
3467
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
3468
|
+
self.handle = kwargs['handle']
|
|
3469
|
+
_linksockslib.IncRef(self.handle)
|
|
3470
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
3471
|
+
self.handle = args[0].handle
|
|
3472
|
+
_linksockslib.IncRef(self.handle)
|
|
3473
|
+
elif len(args) == 1 and isinstance(args[0], int):
|
|
3474
|
+
self.handle = args[0]
|
|
3475
|
+
_linksockslib.IncRef(self.handle)
|
|
3476
|
+
else:
|
|
3477
|
+
self.handle = 0
|
|
3478
|
+
def __del__(self):
|
|
3479
|
+
_linksockslib.DecRef(self.handle)
|
|
3480
|
+
|
|
3481
|
+
|
|
3482
|
+
# Python type for net.UDPAddr
|
|
3483
|
+
class net_UDPAddr(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.UDPConn
|
|
3505
|
+
class net_UDPConn(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 http.Cookie
|
|
3527
|
+
class http_Cookie(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 http.Handler
|
|
3549
|
+
class http_Handler(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 map http.Header
|
|
3571
|
+
class Header(GoClass):
|
|
3572
|
+
""""""
|
|
3573
|
+
def __init__(self, *args, **kwargs):
|
|
3574
|
+
"""
|
|
3575
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
3576
|
+
otherwise parameter is a python list that we copy from
|
|
3577
|
+
"""
|
|
3578
|
+
self.index = 0
|
|
3579
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
3580
|
+
self.handle = kwargs['handle']
|
|
3581
|
+
_linksockslib.IncRef(self.handle)
|
|
3582
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
3583
|
+
self.handle = args[0].handle
|
|
3584
|
+
_linksockslib.IncRef(self.handle)
|
|
3585
|
+
else:
|
|
3586
|
+
self.handle = _linksockslib.http_Header_CTor()
|
|
3587
|
+
_linksockslib.IncRef(self.handle)
|
|
3588
|
+
if len(args) > 0:
|
|
3589
|
+
if not isinstance(args[0], _collections_abc.Mapping):
|
|
3590
|
+
raise TypeError('http_Header.__init__ takes a mapping as argument')
|
|
3591
|
+
for k, v in args[0].items():
|
|
3592
|
+
_linksockslib.http_Header_set(self.handle, k, v)
|
|
3593
|
+
def __del__(self):
|
|
3594
|
+
_linksockslib.DecRef(self.handle)
|
|
3595
|
+
def __str__(self):
|
|
3596
|
+
s = 'linksockslib.http_Header len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' {'
|
|
3597
|
+
if len(self) < 120:
|
|
3598
|
+
for k, v in self.items():
|
|
3599
|
+
s += str(k) + '=' + str(v) + ', '
|
|
3600
|
+
return s + '}'
|
|
3601
|
+
def __repr__(self):
|
|
3602
|
+
s = 'linksockslib.http_Header({'
|
|
3603
|
+
for k, v in self.items():
|
|
3604
|
+
s += str(k) + '=' + str(v) + ', '
|
|
3605
|
+
return s + '})'
|
|
3606
|
+
def __len__(self):
|
|
3607
|
+
return _linksockslib.http_Header_len(self.handle)
|
|
3608
|
+
def __getitem__(self, key):
|
|
3609
|
+
return go.Slice_string(handle=_linksockslib.http_Header_elem(self.handle, key))
|
|
3610
|
+
def __setitem__(self, key, value):
|
|
3611
|
+
_linksockslib.http_Header_set(self.handle, key, value.handle)
|
|
3612
|
+
def __delitem__(self, key):
|
|
3613
|
+
return _linksockslib.http_Header_delete(self.handle, key)
|
|
3614
|
+
def keys(self):
|
|
3615
|
+
return go.Slice_string(handle=_linksockslib.http_Header_keys(self.handle))
|
|
3616
|
+
def values(self):
|
|
3617
|
+
vls = []
|
|
3618
|
+
kys = self.keys()
|
|
3619
|
+
for k in kys:
|
|
3620
|
+
vls.append(self[k])
|
|
3621
|
+
return vls
|
|
3622
|
+
def items(self):
|
|
3623
|
+
vls = []
|
|
3624
|
+
kys = self.keys()
|
|
3625
|
+
for k in kys:
|
|
3626
|
+
vls.append((k, self[k]))
|
|
3627
|
+
return vls
|
|
3628
|
+
def __iter__(self):
|
|
3629
|
+
return iter(self.items())
|
|
3630
|
+
def __contains__(self, key):
|
|
3631
|
+
return _linksockslib.http_Header_contains(self.handle, key)
|
|
3632
|
+
|
|
3633
|
+
# Python type for http.Request
|
|
3634
|
+
class http_Request(GoClass):
|
|
3635
|
+
""""""
|
|
3636
|
+
def __init__(self, *args, **kwargs):
|
|
3637
|
+
"""
|
|
3638
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
3639
|
+
"""
|
|
3640
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
3641
|
+
self.handle = kwargs['handle']
|
|
3642
|
+
_linksockslib.IncRef(self.handle)
|
|
3643
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
3644
|
+
self.handle = args[0].handle
|
|
3645
|
+
_linksockslib.IncRef(self.handle)
|
|
3646
|
+
elif len(args) == 1 and isinstance(args[0], int):
|
|
3647
|
+
self.handle = args[0]
|
|
3648
|
+
_linksockslib.IncRef(self.handle)
|
|
3649
|
+
else:
|
|
3650
|
+
self.handle = 0
|
|
3651
|
+
def __del__(self):
|
|
3652
|
+
_linksockslib.DecRef(self.handle)
|
|
3653
|
+
|
|
3654
|
+
|
|
3655
|
+
# Python type for http.Response
|
|
3656
|
+
class http_Response(GoClass):
|
|
3657
|
+
""""""
|
|
3658
|
+
def __init__(self, *args, **kwargs):
|
|
3659
|
+
"""
|
|
3660
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
3661
|
+
"""
|
|
3662
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
3663
|
+
self.handle = kwargs['handle']
|
|
3664
|
+
_linksockslib.IncRef(self.handle)
|
|
3665
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
3666
|
+
self.handle = args[0].handle
|
|
3667
|
+
_linksockslib.IncRef(self.handle)
|
|
3668
|
+
elif len(args) == 1 and isinstance(args[0], int):
|
|
3669
|
+
self.handle = args[0]
|
|
3670
|
+
_linksockslib.IncRef(self.handle)
|
|
3671
|
+
else:
|
|
3672
|
+
self.handle = 0
|
|
3673
|
+
def __del__(self):
|
|
3674
|
+
_linksockslib.DecRef(self.handle)
|
|
3675
|
+
|
|
3676
|
+
|
|
3677
|
+
# Python type for http.ResponseWriter
|
|
3678
|
+
class http_ResponseWriter(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.ServeMux
|
|
3700
|
+
class http_ServeMux(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 netip.Addr
|
|
3722
|
+
class netip_Addr(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 netip.AddrPort
|
|
3744
|
+
class netip_AddrPort(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.Prefix
|
|
3766
|
+
class netip_Prefix(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 map textproto.MIMEHeader
|
|
3788
|
+
class MIMEHeader(GoClass):
|
|
3789
|
+
""""""
|
|
3790
|
+
def __init__(self, *args, **kwargs):
|
|
3791
|
+
"""
|
|
3792
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
3793
|
+
otherwise parameter is a python list that we copy from
|
|
3794
|
+
"""
|
|
3795
|
+
self.index = 0
|
|
3796
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
3797
|
+
self.handle = kwargs['handle']
|
|
3798
|
+
_linksockslib.IncRef(self.handle)
|
|
3799
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
3800
|
+
self.handle = args[0].handle
|
|
3801
|
+
_linksockslib.IncRef(self.handle)
|
|
3802
|
+
else:
|
|
3803
|
+
self.handle = _linksockslib.textproto_MIMEHeader_CTor()
|
|
3804
|
+
_linksockslib.IncRef(self.handle)
|
|
3805
|
+
if len(args) > 0:
|
|
3806
|
+
if not isinstance(args[0], _collections_abc.Mapping):
|
|
3807
|
+
raise TypeError('textproto_MIMEHeader.__init__ takes a mapping as argument')
|
|
3808
|
+
for k, v in args[0].items():
|
|
3809
|
+
_linksockslib.textproto_MIMEHeader_set(self.handle, k, v)
|
|
3810
|
+
def __del__(self):
|
|
3811
|
+
_linksockslib.DecRef(self.handle)
|
|
3812
|
+
def __str__(self):
|
|
3813
|
+
s = 'linksockslib.textproto_MIMEHeader len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' {'
|
|
3814
|
+
if len(self) < 120:
|
|
3815
|
+
for k, v in self.items():
|
|
3816
|
+
s += str(k) + '=' + str(v) + ', '
|
|
3817
|
+
return s + '}'
|
|
3818
|
+
def __repr__(self):
|
|
3819
|
+
s = 'linksockslib.textproto_MIMEHeader({'
|
|
3820
|
+
for k, v in self.items():
|
|
3821
|
+
s += str(k) + '=' + str(v) + ', '
|
|
3822
|
+
return s + '})'
|
|
3823
|
+
def __len__(self):
|
|
3824
|
+
return _linksockslib.textproto_MIMEHeader_len(self.handle)
|
|
3825
|
+
def __getitem__(self, key):
|
|
3826
|
+
return go.Slice_string(handle=_linksockslib.textproto_MIMEHeader_elem(self.handle, key))
|
|
3827
|
+
def __setitem__(self, key, value):
|
|
3828
|
+
_linksockslib.textproto_MIMEHeader_set(self.handle, key, value.handle)
|
|
3829
|
+
def __delitem__(self, key):
|
|
3830
|
+
return _linksockslib.textproto_MIMEHeader_delete(self.handle, key)
|
|
3831
|
+
def keys(self):
|
|
3832
|
+
return go.Slice_string(handle=_linksockslib.textproto_MIMEHeader_keys(self.handle))
|
|
3833
|
+
def values(self):
|
|
3834
|
+
vls = []
|
|
3835
|
+
kys = self.keys()
|
|
3836
|
+
for k in kys:
|
|
3837
|
+
vls.append(self[k])
|
|
3838
|
+
return vls
|
|
3839
|
+
def items(self):
|
|
3840
|
+
vls = []
|
|
3841
|
+
kys = self.keys()
|
|
3842
|
+
for k in kys:
|
|
3843
|
+
vls.append((k, self[k]))
|
|
3844
|
+
return vls
|
|
3845
|
+
def __iter__(self):
|
|
3846
|
+
return iter(self.items())
|
|
3847
|
+
def __contains__(self, key):
|
|
3848
|
+
return _linksockslib.textproto_MIMEHeader_contains(self.handle, key)
|
|
3849
|
+
|
|
3850
|
+
# Python type for url.URL
|
|
3851
|
+
class url_URL(GoClass):
|
|
3852
|
+
""""""
|
|
3853
|
+
def __init__(self, *args, **kwargs):
|
|
3854
|
+
"""
|
|
3855
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
3856
|
+
"""
|
|
3857
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
3858
|
+
self.handle = kwargs['handle']
|
|
3859
|
+
_linksockslib.IncRef(self.handle)
|
|
3860
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
3861
|
+
self.handle = args[0].handle
|
|
3862
|
+
_linksockslib.IncRef(self.handle)
|
|
3863
|
+
elif len(args) == 1 and isinstance(args[0], int):
|
|
3864
|
+
self.handle = args[0]
|
|
3865
|
+
_linksockslib.IncRef(self.handle)
|
|
3866
|
+
else:
|
|
3867
|
+
self.handle = 0
|
|
3868
|
+
def __del__(self):
|
|
3869
|
+
_linksockslib.DecRef(self.handle)
|
|
3870
|
+
|
|
3871
|
+
|
|
3872
|
+
# Python type for url.Userinfo
|
|
3873
|
+
class url_Userinfo(GoClass):
|
|
3874
|
+
""""""
|
|
3875
|
+
def __init__(self, *args, **kwargs):
|
|
3876
|
+
"""
|
|
3877
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
3878
|
+
"""
|
|
3879
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
3880
|
+
self.handle = kwargs['handle']
|
|
3881
|
+
_linksockslib.IncRef(self.handle)
|
|
3882
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
3883
|
+
self.handle = args[0].handle
|
|
3884
|
+
_linksockslib.IncRef(self.handle)
|
|
3885
|
+
elif len(args) == 1 and isinstance(args[0], int):
|
|
3886
|
+
self.handle = args[0]
|
|
3887
|
+
_linksockslib.IncRef(self.handle)
|
|
3888
|
+
else:
|
|
3889
|
+
self.handle = 0
|
|
3890
|
+
def __del__(self):
|
|
3891
|
+
_linksockslib.DecRef(self.handle)
|
|
3892
|
+
|
|
3893
|
+
|
|
3894
|
+
# Python type for map url.Values
|
|
3895
|
+
class Values(GoClass):
|
|
3896
|
+
""""""
|
|
3897
|
+
def __init__(self, *args, **kwargs):
|
|
3898
|
+
"""
|
|
3899
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
3900
|
+
otherwise parameter is a python list that we copy from
|
|
3901
|
+
"""
|
|
3902
|
+
self.index = 0
|
|
3903
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
3904
|
+
self.handle = kwargs['handle']
|
|
3905
|
+
_linksockslib.IncRef(self.handle)
|
|
3906
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
3907
|
+
self.handle = args[0].handle
|
|
3908
|
+
_linksockslib.IncRef(self.handle)
|
|
3909
|
+
else:
|
|
3910
|
+
self.handle = _linksockslib.url_Values_CTor()
|
|
3911
|
+
_linksockslib.IncRef(self.handle)
|
|
3912
|
+
if len(args) > 0:
|
|
3913
|
+
if not isinstance(args[0], _collections_abc.Mapping):
|
|
3914
|
+
raise TypeError('url_Values.__init__ takes a mapping as argument')
|
|
3915
|
+
for k, v in args[0].items():
|
|
3916
|
+
_linksockslib.url_Values_set(self.handle, k, v)
|
|
3917
|
+
def __del__(self):
|
|
3918
|
+
_linksockslib.DecRef(self.handle)
|
|
3919
|
+
def __str__(self):
|
|
3920
|
+
s = 'linksockslib.url_Values len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' {'
|
|
3921
|
+
if len(self) < 120:
|
|
3922
|
+
for k, v in self.items():
|
|
3923
|
+
s += str(k) + '=' + str(v) + ', '
|
|
3924
|
+
return s + '}'
|
|
3925
|
+
def __repr__(self):
|
|
3926
|
+
s = 'linksockslib.url_Values({'
|
|
3927
|
+
for k, v in self.items():
|
|
3928
|
+
s += str(k) + '=' + str(v) + ', '
|
|
3929
|
+
return s + '})'
|
|
3930
|
+
def __len__(self):
|
|
3931
|
+
return _linksockslib.url_Values_len(self.handle)
|
|
3932
|
+
def __getitem__(self, key):
|
|
3933
|
+
return go.Slice_string(handle=_linksockslib.url_Values_elem(self.handle, key))
|
|
3934
|
+
def __setitem__(self, key, value):
|
|
3935
|
+
_linksockslib.url_Values_set(self.handle, key, value.handle)
|
|
3936
|
+
def __delitem__(self, key):
|
|
3937
|
+
return _linksockslib.url_Values_delete(self.handle, key)
|
|
3938
|
+
def keys(self):
|
|
3939
|
+
return go.Slice_string(handle=_linksockslib.url_Values_keys(self.handle))
|
|
3940
|
+
def values(self):
|
|
3941
|
+
vls = []
|
|
3942
|
+
kys = self.keys()
|
|
3943
|
+
for k in kys:
|
|
3944
|
+
vls.append(self[k])
|
|
3945
|
+
return vls
|
|
3946
|
+
def items(self):
|
|
3947
|
+
vls = []
|
|
3948
|
+
kys = self.keys()
|
|
3949
|
+
for k in kys:
|
|
3950
|
+
vls.append((k, self[k]))
|
|
3951
|
+
return vls
|
|
3952
|
+
def __iter__(self):
|
|
3953
|
+
return iter(self.items())
|
|
3954
|
+
def __contains__(self, key):
|
|
3955
|
+
return _linksockslib.url_Values_contains(self.handle, key)
|
|
3956
|
+
|
|
3957
|
+
# Python type for syscall.RawConn
|
|
3958
|
+
class syscall_RawConn(GoClass):
|
|
3959
|
+
""""""
|
|
3960
|
+
def __init__(self, *args, **kwargs):
|
|
3961
|
+
"""
|
|
3962
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
3963
|
+
"""
|
|
3964
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
3965
|
+
self.handle = kwargs['handle']
|
|
3966
|
+
_linksockslib.IncRef(self.handle)
|
|
3967
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
3968
|
+
self.handle = args[0].handle
|
|
3969
|
+
_linksockslib.IncRef(self.handle)
|
|
3970
|
+
elif len(args) == 1 and isinstance(args[0], int):
|
|
3971
|
+
self.handle = args[0]
|
|
3972
|
+
_linksockslib.IncRef(self.handle)
|
|
3973
|
+
else:
|
|
3974
|
+
self.handle = 0
|
|
3975
|
+
def __del__(self):
|
|
3976
|
+
_linksockslib.DecRef(self.handle)
|
|
3977
|
+
|
|
3978
|
+
|
|
3979
|
+
# Python type for time.Location
|
|
3980
|
+
class time_Location(GoClass):
|
|
3981
|
+
""""""
|
|
3982
|
+
def __init__(self, *args, **kwargs):
|
|
3983
|
+
"""
|
|
3984
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
3985
|
+
"""
|
|
3986
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
3987
|
+
self.handle = kwargs['handle']
|
|
3988
|
+
_linksockslib.IncRef(self.handle)
|
|
3989
|
+
elif len(args) == 1 and isinstance(args[0], GoClass):
|
|
3990
|
+
self.handle = args[0].handle
|
|
3991
|
+
_linksockslib.IncRef(self.handle)
|
|
3992
|
+
elif len(args) == 1 and isinstance(args[0], int):
|
|
3993
|
+
self.handle = args[0]
|
|
3994
|
+
_linksockslib.IncRef(self.handle)
|
|
3995
|
+
else:
|
|
3996
|
+
self.handle = 0
|
|
3997
|
+
def __del__(self):
|
|
3998
|
+
_linksockslib.DecRef(self.handle)
|
|
3999
|
+
|
|
4000
|
+
|
|
4001
|
+
# Python type for time.Time
|
|
4002
|
+
class time_Time(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
|
+
|