cloudflare/cloudflared

Public

mirrored from https://github.com/cloudflare/cloudflaredAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
2018.8.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

tunnelrpc/tunnelrpc.capnp.go

1358lines · modecode

1// Code generated by capnpc-go. DO NOT EDIT.
2
3package tunnelrpc
4
5import (
6 context "golang.org/x/net/context"
7 capnp "zombiezen.com/go/capnproto2"
8 text "zombiezen.com/go/capnproto2/encoding/text"
9 schemas "zombiezen.com/go/capnproto2/schemas"
10 server "zombiezen.com/go/capnproto2/server"
11)
12
13type Authentication struct{ capnp.Struct }
14
15// Authentication_TypeID is the unique identifier for the type Authentication.
16const Authentication_TypeID = 0xc082ef6e0d42ed1d
17
18func NewAuthentication(s *capnp.Segment) (Authentication, error) {
19 st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 3})
20 return Authentication{st}, err
21}
22
23func NewRootAuthentication(s *capnp.Segment) (Authentication, error) {
24 st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 3})
25 return Authentication{st}, err
26}
27
28func ReadRootAuthentication(msg *capnp.Message) (Authentication, error) {
29 root, err := msg.RootPtr()
30 return Authentication{root.Struct()}, err
31}
32
33func (s Authentication) String() string {
34 str, _ := text.Marshal(0xc082ef6e0d42ed1d, s.Struct)
35 return str
36}
37
38func (s Authentication) Key() (string, error) {
39 p, err := s.Struct.Ptr(0)
40 return p.Text(), err
41}
42
43func (s Authentication) HasKey() bool {
44 p, err := s.Struct.Ptr(0)
45 return p.IsValid() || err != nil
46}
47
48func (s Authentication) KeyBytes() ([]byte, error) {
49 p, err := s.Struct.Ptr(0)
50 return p.TextBytes(), err
51}
52
53func (s Authentication) SetKey(v string) error {
54 return s.Struct.SetText(0, v)
55}
56
57func (s Authentication) Email() (string, error) {
58 p, err := s.Struct.Ptr(1)
59 return p.Text(), err
60}
61
62func (s Authentication) HasEmail() bool {
63 p, err := s.Struct.Ptr(1)
64 return p.IsValid() || err != nil
65}
66
67func (s Authentication) EmailBytes() ([]byte, error) {
68 p, err := s.Struct.Ptr(1)
69 return p.TextBytes(), err
70}
71
72func (s Authentication) SetEmail(v string) error {
73 return s.Struct.SetText(1, v)
74}
75
76func (s Authentication) OriginCAKey() (string, error) {
77 p, err := s.Struct.Ptr(2)
78 return p.Text(), err
79}
80
81func (s Authentication) HasOriginCAKey() bool {
82 p, err := s.Struct.Ptr(2)
83 return p.IsValid() || err != nil
84}
85
86func (s Authentication) OriginCAKeyBytes() ([]byte, error) {
87 p, err := s.Struct.Ptr(2)
88 return p.TextBytes(), err
89}
90
91func (s Authentication) SetOriginCAKey(v string) error {
92 return s.Struct.SetText(2, v)
93}
94
95// Authentication_List is a list of Authentication.
96type Authentication_List struct{ capnp.List }
97
98// NewAuthentication creates a new list of Authentication.
99func NewAuthentication_List(s *capnp.Segment, sz int32) (Authentication_List, error) {
100 l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 3}, sz)
101 return Authentication_List{l}, err
102}
103
104func (s Authentication_List) At(i int) Authentication { return Authentication{s.List.Struct(i)} }
105
106func (s Authentication_List) Set(i int, v Authentication) error { return s.List.SetStruct(i, v.Struct) }
107
108// Authentication_Promise is a wrapper for a Authentication promised by a client call.
109type Authentication_Promise struct{ *capnp.Pipeline }
110
111func (p Authentication_Promise) Struct() (Authentication, error) {
112 s, err := p.Pipeline.Struct()
113 return Authentication{s}, err
114}
115
116type TunnelRegistration struct{ capnp.Struct }
117
118// TunnelRegistration_TypeID is the unique identifier for the type TunnelRegistration.
119const TunnelRegistration_TypeID = 0xf41a0f001ad49e46
120
121func NewTunnelRegistration(s *capnp.Segment) (TunnelRegistration, error) {
122 st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 4})
123 return TunnelRegistration{st}, err
124}
125
126func NewRootTunnelRegistration(s *capnp.Segment) (TunnelRegistration, error) {
127 st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 4})
128 return TunnelRegistration{st}, err
129}
130
131func ReadRootTunnelRegistration(msg *capnp.Message) (TunnelRegistration, error) {
132 root, err := msg.RootPtr()
133 return TunnelRegistration{root.Struct()}, err
134}
135
136func (s TunnelRegistration) String() string {
137 str, _ := text.Marshal(0xf41a0f001ad49e46, s.Struct)
138 return str
139}
140
141func (s TunnelRegistration) Err() (string, error) {
142 p, err := s.Struct.Ptr(0)
143 return p.Text(), err
144}
145
146func (s TunnelRegistration) HasErr() bool {
147 p, err := s.Struct.Ptr(0)
148 return p.IsValid() || err != nil
149}
150
151func (s TunnelRegistration) ErrBytes() ([]byte, error) {
152 p, err := s.Struct.Ptr(0)
153 return p.TextBytes(), err
154}
155
156func (s TunnelRegistration) SetErr(v string) error {
157 return s.Struct.SetText(0, v)
158}
159
160func (s TunnelRegistration) Url() (string, error) {
161 p, err := s.Struct.Ptr(1)
162 return p.Text(), err
163}
164
165func (s TunnelRegistration) HasUrl() bool {
166 p, err := s.Struct.Ptr(1)
167 return p.IsValid() || err != nil
168}
169
170func (s TunnelRegistration) UrlBytes() ([]byte, error) {
171 p, err := s.Struct.Ptr(1)
172 return p.TextBytes(), err
173}
174
175func (s TunnelRegistration) SetUrl(v string) error {
176 return s.Struct.SetText(1, v)
177}
178
179func (s TunnelRegistration) LogLines() (capnp.TextList, error) {
180 p, err := s.Struct.Ptr(2)
181 return capnp.TextList{List: p.List()}, err
182}
183
184func (s TunnelRegistration) HasLogLines() bool {
185 p, err := s.Struct.Ptr(2)
186 return p.IsValid() || err != nil
187}
188
189func (s TunnelRegistration) SetLogLines(v capnp.TextList) error {
190 return s.Struct.SetPtr(2, v.List.ToPtr())
191}
192
193// NewLogLines sets the logLines field to a newly
194// allocated capnp.TextList, preferring placement in s's segment.
195func (s TunnelRegistration) NewLogLines(n int32) (capnp.TextList, error) {
196 l, err := capnp.NewTextList(s.Struct.Segment(), n)
197 if err != nil {
198 return capnp.TextList{}, err
199 }
200 err = s.Struct.SetPtr(2, l.List.ToPtr())
201 return l, err
202}
203
204func (s TunnelRegistration) PermanentFailure() bool {
205 return s.Struct.Bit(0)
206}
207
208func (s TunnelRegistration) SetPermanentFailure(v bool) {
209 s.Struct.SetBit(0, v)
210}
211
212func (s TunnelRegistration) TunnelID() (string, error) {
213 p, err := s.Struct.Ptr(3)
214 return p.Text(), err
215}
216
217func (s TunnelRegistration) HasTunnelID() bool {
218 p, err := s.Struct.Ptr(3)
219 return p.IsValid() || err != nil
220}
221
222func (s TunnelRegistration) TunnelIDBytes() ([]byte, error) {
223 p, err := s.Struct.Ptr(3)
224 return p.TextBytes(), err
225}
226
227func (s TunnelRegistration) SetTunnelID(v string) error {
228 return s.Struct.SetText(3, v)
229}
230
231// TunnelRegistration_List is a list of TunnelRegistration.
232type TunnelRegistration_List struct{ capnp.List }
233
234// NewTunnelRegistration creates a new list of TunnelRegistration.
235func NewTunnelRegistration_List(s *capnp.Segment, sz int32) (TunnelRegistration_List, error) {
236 l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 4}, sz)
237 return TunnelRegistration_List{l}, err
238}
239
240func (s TunnelRegistration_List) At(i int) TunnelRegistration {
241 return TunnelRegistration{s.List.Struct(i)}
242}
243
244func (s TunnelRegistration_List) Set(i int, v TunnelRegistration) error {
245 return s.List.SetStruct(i, v.Struct)
246}
247
248// TunnelRegistration_Promise is a wrapper for a TunnelRegistration promised by a client call.
249type TunnelRegistration_Promise struct{ *capnp.Pipeline }
250
251func (p TunnelRegistration_Promise) Struct() (TunnelRegistration, error) {
252 s, err := p.Pipeline.Struct()
253 return TunnelRegistration{s}, err
254}
255
256type RegistrationOptions struct{ capnp.Struct }
257
258// RegistrationOptions_TypeID is the unique identifier for the type RegistrationOptions.
259const RegistrationOptions_TypeID = 0xc793e50592935b4a
260
261func NewRegistrationOptions(s *capnp.Segment) (RegistrationOptions, error) {
262 st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 16, PointerCount: 6})
263 return RegistrationOptions{st}, err
264}
265
266func NewRootRegistrationOptions(s *capnp.Segment) (RegistrationOptions, error) {
267 st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 16, PointerCount: 6})
268 return RegistrationOptions{st}, err
269}
270
271func ReadRootRegistrationOptions(msg *capnp.Message) (RegistrationOptions, error) {
272 root, err := msg.RootPtr()
273 return RegistrationOptions{root.Struct()}, err
274}
275
276func (s RegistrationOptions) String() string {
277 str, _ := text.Marshal(0xc793e50592935b4a, s.Struct)
278 return str
279}
280
281func (s RegistrationOptions) ClientId() (string, error) {
282 p, err := s.Struct.Ptr(0)
283 return p.Text(), err
284}
285
286func (s RegistrationOptions) HasClientId() bool {
287 p, err := s.Struct.Ptr(0)
288 return p.IsValid() || err != nil
289}
290
291func (s RegistrationOptions) ClientIdBytes() ([]byte, error) {
292 p, err := s.Struct.Ptr(0)
293 return p.TextBytes(), err
294}
295
296func (s RegistrationOptions) SetClientId(v string) error {
297 return s.Struct.SetText(0, v)
298}
299
300func (s RegistrationOptions) Version() (string, error) {
301 p, err := s.Struct.Ptr(1)
302 return p.Text(), err
303}
304
305func (s RegistrationOptions) HasVersion() bool {
306 p, err := s.Struct.Ptr(1)
307 return p.IsValid() || err != nil
308}
309
310func (s RegistrationOptions) VersionBytes() ([]byte, error) {
311 p, err := s.Struct.Ptr(1)
312 return p.TextBytes(), err
313}
314
315func (s RegistrationOptions) SetVersion(v string) error {
316 return s.Struct.SetText(1, v)
317}
318
319func (s RegistrationOptions) Os() (string, error) {
320 p, err := s.Struct.Ptr(2)
321 return p.Text(), err
322}
323
324func (s RegistrationOptions) HasOs() bool {
325 p, err := s.Struct.Ptr(2)
326 return p.IsValid() || err != nil
327}
328
329func (s RegistrationOptions) OsBytes() ([]byte, error) {
330 p, err := s.Struct.Ptr(2)
331 return p.TextBytes(), err
332}
333
334func (s RegistrationOptions) SetOs(v string) error {
335 return s.Struct.SetText(2, v)
336}
337
338func (s RegistrationOptions) ExistingTunnelPolicy() ExistingTunnelPolicy {
339 return ExistingTunnelPolicy(s.Struct.Uint16(0))
340}
341
342func (s RegistrationOptions) SetExistingTunnelPolicy(v ExistingTunnelPolicy) {
343 s.Struct.SetUint16(0, uint16(v))
344}
345
346func (s RegistrationOptions) PoolName() (string, error) {
347 p, err := s.Struct.Ptr(3)
348 return p.Text(), err
349}
350
351func (s RegistrationOptions) HasPoolName() bool {
352 p, err := s.Struct.Ptr(3)
353 return p.IsValid() || err != nil
354}
355
356func (s RegistrationOptions) PoolNameBytes() ([]byte, error) {
357 p, err := s.Struct.Ptr(3)
358 return p.TextBytes(), err
359}
360
361func (s RegistrationOptions) SetPoolName(v string) error {
362 return s.Struct.SetText(3, v)
363}
364
365func (s RegistrationOptions) Tags() (Tag_List, error) {
366 p, err := s.Struct.Ptr(4)
367 return Tag_List{List: p.List()}, err
368}
369
370func (s RegistrationOptions) HasTags() bool {
371 p, err := s.Struct.Ptr(4)
372 return p.IsValid() || err != nil
373}
374
375func (s RegistrationOptions) SetTags(v Tag_List) error {
376 return s.Struct.SetPtr(4, v.List.ToPtr())
377}
378
379// NewTags sets the tags field to a newly
380// allocated Tag_List, preferring placement in s's segment.
381func (s RegistrationOptions) NewTags(n int32) (Tag_List, error) {
382 l, err := NewTag_List(s.Struct.Segment(), n)
383 if err != nil {
384 return Tag_List{}, err
385 }
386 err = s.Struct.SetPtr(4, l.List.ToPtr())
387 return l, err
388}
389
390func (s RegistrationOptions) ConnectionId() uint8 {
391 return s.Struct.Uint8(2)
392}
393
394func (s RegistrationOptions) SetConnectionId(v uint8) {
395 s.Struct.SetUint8(2, v)
396}
397
398func (s RegistrationOptions) OriginLocalIp() (string, error) {
399 p, err := s.Struct.Ptr(5)
400 return p.Text(), err
401}
402
403func (s RegistrationOptions) HasOriginLocalIp() bool {
404 p, err := s.Struct.Ptr(5)
405 return p.IsValid() || err != nil
406}
407
408func (s RegistrationOptions) OriginLocalIpBytes() ([]byte, error) {
409 p, err := s.Struct.Ptr(5)
410 return p.TextBytes(), err
411}
412
413func (s RegistrationOptions) SetOriginLocalIp(v string) error {
414 return s.Struct.SetText(5, v)
415}
416
417func (s RegistrationOptions) IsAutoupdated() bool {
418 return s.Struct.Bit(24)
419}
420
421func (s RegistrationOptions) SetIsAutoupdated(v bool) {
422 s.Struct.SetBit(24, v)
423}
424
425func (s RegistrationOptions) RunFromTerminal() bool {
426 return s.Struct.Bit(25)
427}
428
429func (s RegistrationOptions) SetRunFromTerminal(v bool) {
430 s.Struct.SetBit(25, v)
431}
432
433func (s RegistrationOptions) CompressionQuality() uint64 {
434 return s.Struct.Uint64(8)
435}
436
437func (s RegistrationOptions) SetCompressionQuality(v uint64) {
438 s.Struct.SetUint64(8, v)
439}
440
441// RegistrationOptions_List is a list of RegistrationOptions.
442type RegistrationOptions_List struct{ capnp.List }
443
444// NewRegistrationOptions creates a new list of RegistrationOptions.
445func NewRegistrationOptions_List(s *capnp.Segment, sz int32) (RegistrationOptions_List, error) {
446 l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 16, PointerCount: 6}, sz)
447 return RegistrationOptions_List{l}, err
448}
449
450func (s RegistrationOptions_List) At(i int) RegistrationOptions {
451 return RegistrationOptions{s.List.Struct(i)}
452}
453
454func (s RegistrationOptions_List) Set(i int, v RegistrationOptions) error {
455 return s.List.SetStruct(i, v.Struct)
456}
457
458// RegistrationOptions_Promise is a wrapper for a RegistrationOptions promised by a client call.
459type RegistrationOptions_Promise struct{ *capnp.Pipeline }
460
461func (p RegistrationOptions_Promise) Struct() (RegistrationOptions, error) {
462 s, err := p.Pipeline.Struct()
463 return RegistrationOptions{s}, err
464}
465
466type Tag struct{ capnp.Struct }
467
468// Tag_TypeID is the unique identifier for the type Tag.
469const Tag_TypeID = 0xcbd96442ae3bb01a
470
471func NewTag(s *capnp.Segment) (Tag, error) {
472 st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
473 return Tag{st}, err
474}
475
476func NewRootTag(s *capnp.Segment) (Tag, error) {
477 st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
478 return Tag{st}, err
479}
480
481func ReadRootTag(msg *capnp.Message) (Tag, error) {
482 root, err := msg.RootPtr()
483 return Tag{root.Struct()}, err
484}
485
486func (s Tag) String() string {
487 str, _ := text.Marshal(0xcbd96442ae3bb01a, s.Struct)
488 return str
489}
490
491func (s Tag) Name() (string, error) {
492 p, err := s.Struct.Ptr(0)
493 return p.Text(), err
494}
495
496func (s Tag) HasName() bool {
497 p, err := s.Struct.Ptr(0)
498 return p.IsValid() || err != nil
499}
500
501func (s Tag) NameBytes() ([]byte, error) {
502 p, err := s.Struct.Ptr(0)
503 return p.TextBytes(), err
504}
505
506func (s Tag) SetName(v string) error {
507 return s.Struct.SetText(0, v)
508}
509
510func (s Tag) Value() (string, error) {
511 p, err := s.Struct.Ptr(1)
512 return p.Text(), err
513}
514
515func (s Tag) HasValue() bool {
516 p, err := s.Struct.Ptr(1)
517 return p.IsValid() || err != nil
518}
519
520func (s Tag) ValueBytes() ([]byte, error) {
521 p, err := s.Struct.Ptr(1)
522 return p.TextBytes(), err
523}
524
525func (s Tag) SetValue(v string) error {
526 return s.Struct.SetText(1, v)
527}
528
529// Tag_List is a list of Tag.
530type Tag_List struct{ capnp.List }
531
532// NewTag creates a new list of Tag.
533func NewTag_List(s *capnp.Segment, sz int32) (Tag_List, error) {
534 l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2}, sz)
535 return Tag_List{l}, err
536}
537
538func (s Tag_List) At(i int) Tag { return Tag{s.List.Struct(i)} }
539
540func (s Tag_List) Set(i int, v Tag) error { return s.List.SetStruct(i, v.Struct) }
541
542// Tag_Promise is a wrapper for a Tag promised by a client call.
543type Tag_Promise struct{ *capnp.Pipeline }
544
545func (p Tag_Promise) Struct() (Tag, error) {
546 s, err := p.Pipeline.Struct()
547 return Tag{s}, err
548}
549
550type ExistingTunnelPolicy uint16
551
552// ExistingTunnelPolicy_TypeID is the unique identifier for the type ExistingTunnelPolicy.
553const ExistingTunnelPolicy_TypeID = 0x84cb9536a2cf6d3c
554
555// Values of ExistingTunnelPolicy.
556const (
557 ExistingTunnelPolicy_ignore ExistingTunnelPolicy = 0
558 ExistingTunnelPolicy_disconnect ExistingTunnelPolicy = 1
559 ExistingTunnelPolicy_balance ExistingTunnelPolicy = 2
560)
561
562// String returns the enum's constant name.
563func (c ExistingTunnelPolicy) String() string {
564 switch c {
565 case ExistingTunnelPolicy_ignore:
566 return "ignore"
567 case ExistingTunnelPolicy_disconnect:
568 return "disconnect"
569 case ExistingTunnelPolicy_balance:
570 return "balance"
571
572 default:
573 return ""
574 }
575}
576
577// ExistingTunnelPolicyFromString returns the enum value with a name,
578// or the zero value if there's no such value.
579func ExistingTunnelPolicyFromString(c string) ExistingTunnelPolicy {
580 switch c {
581 case "ignore":
582 return ExistingTunnelPolicy_ignore
583 case "disconnect":
584 return ExistingTunnelPolicy_disconnect
585 case "balance":
586 return ExistingTunnelPolicy_balance
587
588 default:
589 return 0
590 }
591}
592
593type ExistingTunnelPolicy_List struct{ capnp.List }
594
595func NewExistingTunnelPolicy_List(s *capnp.Segment, sz int32) (ExistingTunnelPolicy_List, error) {
596 l, err := capnp.NewUInt16List(s, sz)
597 return ExistingTunnelPolicy_List{l.List}, err
598}
599
600func (l ExistingTunnelPolicy_List) At(i int) ExistingTunnelPolicy {
601 ul := capnp.UInt16List{List: l.List}
602 return ExistingTunnelPolicy(ul.At(i))
603}
604
605func (l ExistingTunnelPolicy_List) Set(i int, v ExistingTunnelPolicy) {
606 ul := capnp.UInt16List{List: l.List}
607 ul.Set(i, uint16(v))
608}
609
610type ServerInfo struct{ capnp.Struct }
611
612// ServerInfo_TypeID is the unique identifier for the type ServerInfo.
613const ServerInfo_TypeID = 0xf2c68e2547ec3866
614
615func NewServerInfo(s *capnp.Segment) (ServerInfo, error) {
616 st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
617 return ServerInfo{st}, err
618}
619
620func NewRootServerInfo(s *capnp.Segment) (ServerInfo, error) {
621 st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
622 return ServerInfo{st}, err
623}
624
625func ReadRootServerInfo(msg *capnp.Message) (ServerInfo, error) {
626 root, err := msg.RootPtr()
627 return ServerInfo{root.Struct()}, err
628}
629
630func (s ServerInfo) String() string {
631 str, _ := text.Marshal(0xf2c68e2547ec3866, s.Struct)
632 return str
633}
634
635func (s ServerInfo) LocationName() (string, error) {
636 p, err := s.Struct.Ptr(0)
637 return p.Text(), err
638}
639
640func (s ServerInfo) HasLocationName() bool {
641 p, err := s.Struct.Ptr(0)
642 return p.IsValid() || err != nil
643}
644
645func (s ServerInfo) LocationNameBytes() ([]byte, error) {
646 p, err := s.Struct.Ptr(0)
647 return p.TextBytes(), err
648}
649
650func (s ServerInfo) SetLocationName(v string) error {
651 return s.Struct.SetText(0, v)
652}
653
654// ServerInfo_List is a list of ServerInfo.
655type ServerInfo_List struct{ capnp.List }
656
657// NewServerInfo creates a new list of ServerInfo.
658func NewServerInfo_List(s *capnp.Segment, sz int32) (ServerInfo_List, error) {
659 l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1}, sz)
660 return ServerInfo_List{l}, err
661}
662
663func (s ServerInfo_List) At(i int) ServerInfo { return ServerInfo{s.List.Struct(i)} }
664
665func (s ServerInfo_List) Set(i int, v ServerInfo) error { return s.List.SetStruct(i, v.Struct) }
666
667// ServerInfo_Promise is a wrapper for a ServerInfo promised by a client call.
668type ServerInfo_Promise struct{ *capnp.Pipeline }
669
670func (p ServerInfo_Promise) Struct() (ServerInfo, error) {
671 s, err := p.Pipeline.Struct()
672 return ServerInfo{s}, err
673}
674
675type TunnelServer struct{ Client capnp.Client }
676
677// TunnelServer_TypeID is the unique identifier for the type TunnelServer.
678const TunnelServer_TypeID = 0xea58385c65416035
679
680func (c TunnelServer) RegisterTunnel(ctx context.Context, params func(TunnelServer_registerTunnel_Params) error, opts ...capnp.CallOption) TunnelServer_registerTunnel_Results_Promise {
681 if c.Client == nil {
682 return TunnelServer_registerTunnel_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
683 }
684 call := &capnp.Call{
685 Ctx: ctx,
686 Method: capnp.Method{
687 InterfaceID: 0xea58385c65416035,
688 MethodID: 0,
689 InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
690 MethodName: "registerTunnel",
691 },
692 Options: capnp.NewCallOptions(opts),
693 }
694 if params != nil {
695 call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 3}
696 call.ParamsFunc = func(s capnp.Struct) error { return params(TunnelServer_registerTunnel_Params{Struct: s}) }
697 }
698 return TunnelServer_registerTunnel_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
699}
700func (c TunnelServer) GetServerInfo(ctx context.Context, params func(TunnelServer_getServerInfo_Params) error, opts ...capnp.CallOption) TunnelServer_getServerInfo_Results_Promise {
701 if c.Client == nil {
702 return TunnelServer_getServerInfo_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
703 }
704 call := &capnp.Call{
705 Ctx: ctx,
706 Method: capnp.Method{
707 InterfaceID: 0xea58385c65416035,
708 MethodID: 1,
709 InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
710 MethodName: "getServerInfo",
711 },
712 Options: capnp.NewCallOptions(opts),
713 }
714 if params != nil {
715 call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 0}
716 call.ParamsFunc = func(s capnp.Struct) error { return params(TunnelServer_getServerInfo_Params{Struct: s}) }
717 }
718 return TunnelServer_getServerInfo_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
719}
720func (c TunnelServer) UnregisterTunnel(ctx context.Context, params func(TunnelServer_unregisterTunnel_Params) error, opts ...capnp.CallOption) TunnelServer_unregisterTunnel_Results_Promise {
721 if c.Client == nil {
722 return TunnelServer_unregisterTunnel_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
723 }
724 call := &capnp.Call{
725 Ctx: ctx,
726 Method: capnp.Method{
727 InterfaceID: 0xea58385c65416035,
728 MethodID: 2,
729 InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
730 MethodName: "unregisterTunnel",
731 },
732 Options: capnp.NewCallOptions(opts),
733 }
734 if params != nil {
735 call.ParamsSize = capnp.ObjectSize{DataSize: 8, PointerCount: 0}
736 call.ParamsFunc = func(s capnp.Struct) error { return params(TunnelServer_unregisterTunnel_Params{Struct: s}) }
737 }
738 return TunnelServer_unregisterTunnel_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
739}
740
741type TunnelServer_Server interface {
742 RegisterTunnel(TunnelServer_registerTunnel) error
743
744 GetServerInfo(TunnelServer_getServerInfo) error
745
746 UnregisterTunnel(TunnelServer_unregisterTunnel) error
747}
748
749func TunnelServer_ServerToClient(s TunnelServer_Server) TunnelServer {
750 c, _ := s.(server.Closer)
751 return TunnelServer{Client: server.New(TunnelServer_Methods(nil, s), c)}
752}
753
754func TunnelServer_Methods(methods []server.Method, s TunnelServer_Server) []server.Method {
755 if cap(methods) == 0 {
756 methods = make([]server.Method, 0, 3)
757 }
758
759 methods = append(methods, server.Method{
760 Method: capnp.Method{
761 InterfaceID: 0xea58385c65416035,
762 MethodID: 0,
763 InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
764 MethodName: "registerTunnel",
765 },
766 Impl: func(c context.Context, opts capnp.CallOptions, p, r capnp.Struct) error {
767 call := TunnelServer_registerTunnel{c, opts, TunnelServer_registerTunnel_Params{Struct: p}, TunnelServer_registerTunnel_Results{Struct: r}}
768 return s.RegisterTunnel(call)
769 },
770 ResultsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 1},
771 })
772
773 methods = append(methods, server.Method{
774 Method: capnp.Method{
775 InterfaceID: 0xea58385c65416035,
776 MethodID: 1,
777 InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
778 MethodName: "getServerInfo",
779 },
780 Impl: func(c context.Context, opts capnp.CallOptions, p, r capnp.Struct) error {
781 call := TunnelServer_getServerInfo{c, opts, TunnelServer_getServerInfo_Params{Struct: p}, TunnelServer_getServerInfo_Results{Struct: r}}
782 return s.GetServerInfo(call)
783 },
784 ResultsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 1},
785 })
786
787 methods = append(methods, server.Method{
788 Method: capnp.Method{
789 InterfaceID: 0xea58385c65416035,
790 MethodID: 2,
791 InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
792 MethodName: "unregisterTunnel",
793 },
794 Impl: func(c context.Context, opts capnp.CallOptions, p, r capnp.Struct) error {
795 call := TunnelServer_unregisterTunnel{c, opts, TunnelServer_unregisterTunnel_Params{Struct: p}, TunnelServer_unregisterTunnel_Results{Struct: r}}
796 return s.UnregisterTunnel(call)
797 },
798 ResultsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 0},
799 })
800
801 return methods
802}
803
804// TunnelServer_registerTunnel holds the arguments for a server call to TunnelServer.registerTunnel.
805type TunnelServer_registerTunnel struct {
806 Ctx context.Context
807 Options capnp.CallOptions
808 Params TunnelServer_registerTunnel_Params
809 Results TunnelServer_registerTunnel_Results
810}
811
812// TunnelServer_getServerInfo holds the arguments for a server call to TunnelServer.getServerInfo.
813type TunnelServer_getServerInfo struct {
814 Ctx context.Context
815 Options capnp.CallOptions
816 Params TunnelServer_getServerInfo_Params
817 Results TunnelServer_getServerInfo_Results
818}
819
820// TunnelServer_unregisterTunnel holds the arguments for a server call to TunnelServer.unregisterTunnel.
821type TunnelServer_unregisterTunnel struct {
822 Ctx context.Context
823 Options capnp.CallOptions
824 Params TunnelServer_unregisterTunnel_Params
825 Results TunnelServer_unregisterTunnel_Results
826}
827
828type TunnelServer_registerTunnel_Params struct{ capnp.Struct }
829
830// TunnelServer_registerTunnel_Params_TypeID is the unique identifier for the type TunnelServer_registerTunnel_Params.
831const TunnelServer_registerTunnel_Params_TypeID = 0xb70431c0dc014915
832
833func NewTunnelServer_registerTunnel_Params(s *capnp.Segment) (TunnelServer_registerTunnel_Params, error) {
834 st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 3})
835 return TunnelServer_registerTunnel_Params{st}, err
836}
837
838func NewRootTunnelServer_registerTunnel_Params(s *capnp.Segment) (TunnelServer_registerTunnel_Params, error) {
839 st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 3})
840 return TunnelServer_registerTunnel_Params{st}, err
841}
842
843func ReadRootTunnelServer_registerTunnel_Params(msg *capnp.Message) (TunnelServer_registerTunnel_Params, error) {
844 root, err := msg.RootPtr()
845 return TunnelServer_registerTunnel_Params{root.Struct()}, err
846}
847
848func (s TunnelServer_registerTunnel_Params) String() string {
849 str, _ := text.Marshal(0xb70431c0dc014915, s.Struct)
850 return str
851}
852
853func (s TunnelServer_registerTunnel_Params) OriginCert() ([]byte, error) {
854 p, err := s.Struct.Ptr(0)
855 return []byte(p.Data()), err
856}
857
858func (s TunnelServer_registerTunnel_Params) HasOriginCert() bool {
859 p, err := s.Struct.Ptr(0)
860 return p.IsValid() || err != nil
861}
862
863func (s TunnelServer_registerTunnel_Params) SetOriginCert(v []byte) error {
864 return s.Struct.SetData(0, v)
865}
866
867func (s TunnelServer_registerTunnel_Params) Hostname() (string, error) {
868 p, err := s.Struct.Ptr(1)
869 return p.Text(), err
870}
871
872func (s TunnelServer_registerTunnel_Params) HasHostname() bool {
873 p, err := s.Struct.Ptr(1)
874 return p.IsValid() || err != nil
875}
876
877func (s TunnelServer_registerTunnel_Params) HostnameBytes() ([]byte, error) {
878 p, err := s.Struct.Ptr(1)
879 return p.TextBytes(), err
880}
881
882func (s TunnelServer_registerTunnel_Params) SetHostname(v string) error {
883 return s.Struct.SetText(1, v)
884}
885
886func (s TunnelServer_registerTunnel_Params) Options() (RegistrationOptions, error) {
887 p, err := s.Struct.Ptr(2)
888 return RegistrationOptions{Struct: p.Struct()}, err
889}
890
891func (s TunnelServer_registerTunnel_Params) HasOptions() bool {
892 p, err := s.Struct.Ptr(2)
893 return p.IsValid() || err != nil
894}
895
896func (s TunnelServer_registerTunnel_Params) SetOptions(v RegistrationOptions) error {
897 return s.Struct.SetPtr(2, v.Struct.ToPtr())
898}
899
900// NewOptions sets the options field to a newly
901// allocated RegistrationOptions struct, preferring placement in s's segment.
902func (s TunnelServer_registerTunnel_Params) NewOptions() (RegistrationOptions, error) {
903 ss, err := NewRegistrationOptions(s.Struct.Segment())
904 if err != nil {
905 return RegistrationOptions{}, err
906 }
907 err = s.Struct.SetPtr(2, ss.Struct.ToPtr())
908 return ss, err
909}
910
911// TunnelServer_registerTunnel_Params_List is a list of TunnelServer_registerTunnel_Params.
912type TunnelServer_registerTunnel_Params_List struct{ capnp.List }
913
914// NewTunnelServer_registerTunnel_Params creates a new list of TunnelServer_registerTunnel_Params.
915func NewTunnelServer_registerTunnel_Params_List(s *capnp.Segment, sz int32) (TunnelServer_registerTunnel_Params_List, error) {
916 l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 3}, sz)
917 return TunnelServer_registerTunnel_Params_List{l}, err
918}
919
920func (s TunnelServer_registerTunnel_Params_List) At(i int) TunnelServer_registerTunnel_Params {
921 return TunnelServer_registerTunnel_Params{s.List.Struct(i)}
922}
923
924func (s TunnelServer_registerTunnel_Params_List) Set(i int, v TunnelServer_registerTunnel_Params) error {
925 return s.List.SetStruct(i, v.Struct)
926}
927
928// TunnelServer_registerTunnel_Params_Promise is a wrapper for a TunnelServer_registerTunnel_Params promised by a client call.
929type TunnelServer_registerTunnel_Params_Promise struct{ *capnp.Pipeline }
930
931func (p TunnelServer_registerTunnel_Params_Promise) Struct() (TunnelServer_registerTunnel_Params, error) {
932 s, err := p.Pipeline.Struct()
933 return TunnelServer_registerTunnel_Params{s}, err
934}
935
936func (p TunnelServer_registerTunnel_Params_Promise) Options() RegistrationOptions_Promise {
937 return RegistrationOptions_Promise{Pipeline: p.Pipeline.GetPipeline(2)}
938}
939
940type TunnelServer_registerTunnel_Results struct{ capnp.Struct }
941
942// TunnelServer_registerTunnel_Results_TypeID is the unique identifier for the type TunnelServer_registerTunnel_Results.
943const TunnelServer_registerTunnel_Results_TypeID = 0xf2c122394f447e8e
944
945func NewTunnelServer_registerTunnel_Results(s *capnp.Segment) (TunnelServer_registerTunnel_Results, error) {
946 st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
947 return TunnelServer_registerTunnel_Results{st}, err
948}
949
950func NewRootTunnelServer_registerTunnel_Results(s *capnp.Segment) (TunnelServer_registerTunnel_Results, error) {
951 st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
952 return TunnelServer_registerTunnel_Results{st}, err
953}
954
955func ReadRootTunnelServer_registerTunnel_Results(msg *capnp.Message) (TunnelServer_registerTunnel_Results, error) {
956 root, err := msg.RootPtr()
957 return TunnelServer_registerTunnel_Results{root.Struct()}, err
958}
959
960func (s TunnelServer_registerTunnel_Results) String() string {
961 str, _ := text.Marshal(0xf2c122394f447e8e, s.Struct)
962 return str
963}
964
965func (s TunnelServer_registerTunnel_Results) Result() (TunnelRegistration, error) {
966 p, err := s.Struct.Ptr(0)
967 return TunnelRegistration{Struct: p.Struct()}, err
968}
969
970func (s TunnelServer_registerTunnel_Results) HasResult() bool {
971 p, err := s.Struct.Ptr(0)
972 return p.IsValid() || err != nil
973}
974
975func (s TunnelServer_registerTunnel_Results) SetResult(v TunnelRegistration) error {
976 return s.Struct.SetPtr(0, v.Struct.ToPtr())
977}
978
979// NewResult sets the result field to a newly
980// allocated TunnelRegistration struct, preferring placement in s's segment.
981func (s TunnelServer_registerTunnel_Results) NewResult() (TunnelRegistration, error) {
982 ss, err := NewTunnelRegistration(s.Struct.Segment())
983 if err != nil {
984 return TunnelRegistration{}, err
985 }
986 err = s.Struct.SetPtr(0, ss.Struct.ToPtr())
987 return ss, err
988}
989
990// TunnelServer_registerTunnel_Results_List is a list of TunnelServer_registerTunnel_Results.
991type TunnelServer_registerTunnel_Results_List struct{ capnp.List }
992
993// NewTunnelServer_registerTunnel_Results creates a new list of TunnelServer_registerTunnel_Results.
994func NewTunnelServer_registerTunnel_Results_List(s *capnp.Segment, sz int32) (TunnelServer_registerTunnel_Results_List, error) {
995 l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1}, sz)
996 return TunnelServer_registerTunnel_Results_List{l}, err
997}
998
999func (s TunnelServer_registerTunnel_Results_List) At(i int) TunnelServer_registerTunnel_Results {
1000 return TunnelServer_registerTunnel_Results{s.List.Struct(i)}
1001}
1002
1003func (s TunnelServer_registerTunnel_Results_List) Set(i int, v TunnelServer_registerTunnel_Results) error {
1004 return s.List.SetStruct(i, v.Struct)
1005}
1006
1007// TunnelServer_registerTunnel_Results_Promise is a wrapper for a TunnelServer_registerTunnel_Results promised by a client call.
1008type TunnelServer_registerTunnel_Results_Promise struct{ *capnp.Pipeline }
1009
1010func (p TunnelServer_registerTunnel_Results_Promise) Struct() (TunnelServer_registerTunnel_Results, error) {
1011 s, err := p.Pipeline.Struct()
1012 return TunnelServer_registerTunnel_Results{s}, err
1013}
1014
1015func (p TunnelServer_registerTunnel_Results_Promise) Result() TunnelRegistration_Promise {
1016 return TunnelRegistration_Promise{Pipeline: p.Pipeline.GetPipeline(0)}
1017}
1018
1019type TunnelServer_getServerInfo_Params struct{ capnp.Struct }
1020
1021// TunnelServer_getServerInfo_Params_TypeID is the unique identifier for the type TunnelServer_getServerInfo_Params.
1022const TunnelServer_getServerInfo_Params_TypeID = 0xdc3ed6801961e502
1023
1024func NewTunnelServer_getServerInfo_Params(s *capnp.Segment) (TunnelServer_getServerInfo_Params, error) {
1025 st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
1026 return TunnelServer_getServerInfo_Params{st}, err
1027}
1028
1029func NewRootTunnelServer_getServerInfo_Params(s *capnp.Segment) (TunnelServer_getServerInfo_Params, error) {
1030 st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
1031 return TunnelServer_getServerInfo_Params{st}, err
1032}
1033
1034func ReadRootTunnelServer_getServerInfo_Params(msg *capnp.Message) (TunnelServer_getServerInfo_Params, error) {
1035 root, err := msg.RootPtr()
1036 return TunnelServer_getServerInfo_Params{root.Struct()}, err
1037}
1038
1039func (s TunnelServer_getServerInfo_Params) String() string {
1040 str, _ := text.Marshal(0xdc3ed6801961e502, s.Struct)
1041 return str
1042}
1043
1044// TunnelServer_getServerInfo_Params_List is a list of TunnelServer_getServerInfo_Params.
1045type TunnelServer_getServerInfo_Params_List struct{ capnp.List }
1046
1047// NewTunnelServer_getServerInfo_Params creates a new list of TunnelServer_getServerInfo_Params.
1048func NewTunnelServer_getServerInfo_Params_List(s *capnp.Segment, sz int32) (TunnelServer_getServerInfo_Params_List, error) {
1049 l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0}, sz)
1050 return TunnelServer_getServerInfo_Params_List{l}, err
1051}
1052
1053func (s TunnelServer_getServerInfo_Params_List) At(i int) TunnelServer_getServerInfo_Params {
1054 return TunnelServer_getServerInfo_Params{s.List.Struct(i)}
1055}
1056
1057func (s TunnelServer_getServerInfo_Params_List) Set(i int, v TunnelServer_getServerInfo_Params) error {
1058 return s.List.SetStruct(i, v.Struct)
1059}
1060
1061// TunnelServer_getServerInfo_Params_Promise is a wrapper for a TunnelServer_getServerInfo_Params promised by a client call.
1062type TunnelServer_getServerInfo_Params_Promise struct{ *capnp.Pipeline }
1063
1064func (p TunnelServer_getServerInfo_Params_Promise) Struct() (TunnelServer_getServerInfo_Params, error) {
1065 s, err := p.Pipeline.Struct()
1066 return TunnelServer_getServerInfo_Params{s}, err
1067}
1068
1069type TunnelServer_getServerInfo_Results struct{ capnp.Struct }
1070
1071// TunnelServer_getServerInfo_Results_TypeID is the unique identifier for the type TunnelServer_getServerInfo_Results.
1072const TunnelServer_getServerInfo_Results_TypeID = 0xe3e37d096a5b564e
1073
1074func NewTunnelServer_getServerInfo_Results(s *capnp.Segment) (TunnelServer_getServerInfo_Results, error) {
1075 st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
1076 return TunnelServer_getServerInfo_Results{st}, err
1077}
1078
1079func NewRootTunnelServer_getServerInfo_Results(s *capnp.Segment) (TunnelServer_getServerInfo_Results, error) {
1080 st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
1081 return TunnelServer_getServerInfo_Results{st}, err
1082}
1083
1084func ReadRootTunnelServer_getServerInfo_Results(msg *capnp.Message) (TunnelServer_getServerInfo_Results, error) {
1085 root, err := msg.RootPtr()
1086 return TunnelServer_getServerInfo_Results{root.Struct()}, err
1087}
1088
1089func (s TunnelServer_getServerInfo_Results) String() string {
1090 str, _ := text.Marshal(0xe3e37d096a5b564e, s.Struct)
1091 return str
1092}
1093
1094func (s TunnelServer_getServerInfo_Results) Result() (ServerInfo, error) {
1095 p, err := s.Struct.Ptr(0)
1096 return ServerInfo{Struct: p.Struct()}, err
1097}
1098
1099func (s TunnelServer_getServerInfo_Results) HasResult() bool {
1100 p, err := s.Struct.Ptr(0)
1101 return p.IsValid() || err != nil
1102}
1103
1104func (s TunnelServer_getServerInfo_Results) SetResult(v ServerInfo) error {
1105 return s.Struct.SetPtr(0, v.Struct.ToPtr())
1106}
1107
1108// NewResult sets the result field to a newly
1109// allocated ServerInfo struct, preferring placement in s's segment.
1110func (s TunnelServer_getServerInfo_Results) NewResult() (ServerInfo, error) {
1111 ss, err := NewServerInfo(s.Struct.Segment())
1112 if err != nil {
1113 return ServerInfo{}, err
1114 }
1115 err = s.Struct.SetPtr(0, ss.Struct.ToPtr())
1116 return ss, err
1117}
1118
1119// TunnelServer_getServerInfo_Results_List is a list of TunnelServer_getServerInfo_Results.
1120type TunnelServer_getServerInfo_Results_List struct{ capnp.List }
1121
1122// NewTunnelServer_getServerInfo_Results creates a new list of TunnelServer_getServerInfo_Results.
1123func NewTunnelServer_getServerInfo_Results_List(s *capnp.Segment, sz int32) (TunnelServer_getServerInfo_Results_List, error) {
1124 l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1}, sz)
1125 return TunnelServer_getServerInfo_Results_List{l}, err
1126}
1127
1128func (s TunnelServer_getServerInfo_Results_List) At(i int) TunnelServer_getServerInfo_Results {
1129 return TunnelServer_getServerInfo_Results{s.List.Struct(i)}
1130}
1131
1132func (s TunnelServer_getServerInfo_Results_List) Set(i int, v TunnelServer_getServerInfo_Results) error {
1133 return s.List.SetStruct(i, v.Struct)
1134}
1135
1136// TunnelServer_getServerInfo_Results_Promise is a wrapper for a TunnelServer_getServerInfo_Results promised by a client call.
1137type TunnelServer_getServerInfo_Results_Promise struct{ *capnp.Pipeline }
1138
1139func (p TunnelServer_getServerInfo_Results_Promise) Struct() (TunnelServer_getServerInfo_Results, error) {
1140 s, err := p.Pipeline.Struct()
1141 return TunnelServer_getServerInfo_Results{s}, err
1142}
1143
1144func (p TunnelServer_getServerInfo_Results_Promise) Result() ServerInfo_Promise {
1145 return ServerInfo_Promise{Pipeline: p.Pipeline.GetPipeline(0)}
1146}
1147
1148type TunnelServer_unregisterTunnel_Params struct{ capnp.Struct }
1149
1150// TunnelServer_unregisterTunnel_Params_TypeID is the unique identifier for the type TunnelServer_unregisterTunnel_Params.
1151const TunnelServer_unregisterTunnel_Params_TypeID = 0x9b87b390babc2ccf
1152
1153func NewTunnelServer_unregisterTunnel_Params(s *capnp.Segment) (TunnelServer_unregisterTunnel_Params, error) {
1154 st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 0})
1155 return TunnelServer_unregisterTunnel_Params{st}, err
1156}
1157
1158func NewRootTunnelServer_unregisterTunnel_Params(s *capnp.Segment) (TunnelServer_unregisterTunnel_Params, error) {
1159 st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 0})
1160 return TunnelServer_unregisterTunnel_Params{st}, err
1161}
1162
1163func ReadRootTunnelServer_unregisterTunnel_Params(msg *capnp.Message) (TunnelServer_unregisterTunnel_Params, error) {
1164 root, err := msg.RootPtr()
1165 return TunnelServer_unregisterTunnel_Params{root.Struct()}, err
1166}
1167
1168func (s TunnelServer_unregisterTunnel_Params) String() string {
1169 str, _ := text.Marshal(0x9b87b390babc2ccf, s.Struct)
1170 return str
1171}
1172
1173func (s TunnelServer_unregisterTunnel_Params) GracePeriodNanoSec() int64 {
1174 return int64(s.Struct.Uint64(0))
1175}
1176
1177func (s TunnelServer_unregisterTunnel_Params) SetGracePeriodNanoSec(v int64) {
1178 s.Struct.SetUint64(0, uint64(v))
1179}
1180
1181// TunnelServer_unregisterTunnel_Params_List is a list of TunnelServer_unregisterTunnel_Params.
1182type TunnelServer_unregisterTunnel_Params_List struct{ capnp.List }
1183
1184// NewTunnelServer_unregisterTunnel_Params creates a new list of TunnelServer_unregisterTunnel_Params.
1185func NewTunnelServer_unregisterTunnel_Params_List(s *capnp.Segment, sz int32) (TunnelServer_unregisterTunnel_Params_List, error) {
1186 l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 0}, sz)
1187 return TunnelServer_unregisterTunnel_Params_List{l}, err
1188}
1189
1190func (s TunnelServer_unregisterTunnel_Params_List) At(i int) TunnelServer_unregisterTunnel_Params {
1191 return TunnelServer_unregisterTunnel_Params{s.List.Struct(i)}
1192}
1193
1194func (s TunnelServer_unregisterTunnel_Params_List) Set(i int, v TunnelServer_unregisterTunnel_Params) error {
1195 return s.List.SetStruct(i, v.Struct)
1196}
1197
1198// TunnelServer_unregisterTunnel_Params_Promise is a wrapper for a TunnelServer_unregisterTunnel_Params promised by a client call.
1199type TunnelServer_unregisterTunnel_Params_Promise struct{ *capnp.Pipeline }
1200
1201func (p TunnelServer_unregisterTunnel_Params_Promise) Struct() (TunnelServer_unregisterTunnel_Params, error) {
1202 s, err := p.Pipeline.Struct()
1203 return TunnelServer_unregisterTunnel_Params{s}, err
1204}
1205
1206type TunnelServer_unregisterTunnel_Results struct{ capnp.Struct }
1207
1208// TunnelServer_unregisterTunnel_Results_TypeID is the unique identifier for the type TunnelServer_unregisterTunnel_Results.
1209const TunnelServer_unregisterTunnel_Results_TypeID = 0xa29a916d4ebdd894
1210
1211func NewTunnelServer_unregisterTunnel_Results(s *capnp.Segment) (TunnelServer_unregisterTunnel_Results, error) {
1212 st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
1213 return TunnelServer_unregisterTunnel_Results{st}, err
1214}
1215
1216func NewRootTunnelServer_unregisterTunnel_Results(s *capnp.Segment) (TunnelServer_unregisterTunnel_Results, error) {
1217 st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
1218 return TunnelServer_unregisterTunnel_Results{st}, err
1219}
1220
1221func ReadRootTunnelServer_unregisterTunnel_Results(msg *capnp.Message) (TunnelServer_unregisterTunnel_Results, error) {
1222 root, err := msg.RootPtr()
1223 return TunnelServer_unregisterTunnel_Results{root.Struct()}, err
1224}
1225
1226func (s TunnelServer_unregisterTunnel_Results) String() string {
1227 str, _ := text.Marshal(0xa29a916d4ebdd894, s.Struct)
1228 return str
1229}
1230
1231// TunnelServer_unregisterTunnel_Results_List is a list of TunnelServer_unregisterTunnel_Results.
1232type TunnelServer_unregisterTunnel_Results_List struct{ capnp.List }
1233
1234// NewTunnelServer_unregisterTunnel_Results creates a new list of TunnelServer_unregisterTunnel_Results.
1235func NewTunnelServer_unregisterTunnel_Results_List(s *capnp.Segment, sz int32) (TunnelServer_unregisterTunnel_Results_List, error) {
1236 l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0}, sz)
1237 return TunnelServer_unregisterTunnel_Results_List{l}, err
1238}
1239
1240func (s TunnelServer_unregisterTunnel_Results_List) At(i int) TunnelServer_unregisterTunnel_Results {
1241 return TunnelServer_unregisterTunnel_Results{s.List.Struct(i)}
1242}
1243
1244func (s TunnelServer_unregisterTunnel_Results_List) Set(i int, v TunnelServer_unregisterTunnel_Results) error {
1245 return s.List.SetStruct(i, v.Struct)
1246}
1247
1248// TunnelServer_unregisterTunnel_Results_Promise is a wrapper for a TunnelServer_unregisterTunnel_Results promised by a client call.
1249type TunnelServer_unregisterTunnel_Results_Promise struct{ *capnp.Pipeline }
1250
1251func (p TunnelServer_unregisterTunnel_Results_Promise) Struct() (TunnelServer_unregisterTunnel_Results, error) {
1252 s, err := p.Pipeline.Struct()
1253 return TunnelServer_unregisterTunnel_Results{s}, err
1254}
1255
1256const schema_db8274f9144abc7e = "x\xda\x9cV]\x8c\x14\xd5\x12\xae\xef\x9c\x99\xedY\xb2" +
1257 "\xcbl\xa7\x87\\\x98\\2\x09Y\xc2OX.\\\xe0" +
1258 "f\xd9{\xaf\xfb\xe3\x82\x99uY\xa6\x190\x08\x98\xd0" +
1259 "\xcc\x1c\x86^{\xba'\xdd=\x08D~$\x18\x95(" +
1260 "Q\x91\x071\x18$1Qc\xfc\x89&\x06\x83\x09\xbe" +
1261 "H\x0c1\xbc\xa8\x91Hb\x94\xec\x03DC\xdc\xe8\x83" +
1262 "&\xa6\xcd\xe9\xd9\x9ei\x16\x05\xf4\xed\xccw\xeaT}" +
1263 "U]\xf5\xd5,\xfb\x07\x1f`\xcb\x93\xdf$\x89\xf4\xe1" +
1264 "d[\xf0\xbf\xea\xa53\xff9q\xf1\x08\xa9Y\x16\x1c" +
1265 "87\x92\xf9\xc5?\xfc5\x11V|\xc1\xf6A\xbb\xc6" +
1266 "\x14\"m\x82\xad'\x04\x97\x96\x9c\xfb\xf0\xd9\xf7\x9ex" +
1267 "\x89\xf4\x05\x00QB!Z\xf1\x1b\xfb\x15\x04M\xe5\xfd" +
1268 "\x84\xe0\x85\xaf>\x1a\xab>w\xf2\x0c\xa9\x0b\xa2\xfb\xd5" +
1269 "\x9c1J\x04\xb3\xf2\xb8r~y\xe2\x83\xc6M\x92\xcb" +
1270 "\xab\x1e~]>\x1d\xe4o\x13\x82\xb9?\x0cu\xda7" +
1271 "\x0e\x9f'5\x8b\x16\x8b\x86\xe1\xb7|\x04\xda\xcf\xf2\xa8" +
1272 "\xfd\x18\x1a\x8fl=\xfe|r\xe2\xf8\x05\xd2\xb3\x88q" +
1273 "N\xb6I\xebg\x12.\xb4W\xc2\xe0\xa7\x12\x0e#\x04" +
1274 "\xd9w\xfe\xfb\xd6P\xf9\xf2\xc5i\xbe\xc3\xcc\xd6)\x93" +
1275 "\xda\x83\x8a<mR\x1e!\x04l\xc2\x98s\xe8\xcb{" +
1276 "\xae\xc4RxW\xf9\x0e\x94\x08\xc6\x1e\xd8:\xde\xbe\xff" +
1277 "\xea\xd5\xa9\x14 \xaf^U\xc2\x14\xce*2\xfbU\xdb" +
1278 "\x07\xc5\xb6\xde\xcd\xd7I\xcd\xf2\x9b\x0ayY\xe9\x83v" +
1279 "-\x0c2\xa1\\\xd0\xaa)\x85(8v`x\xfd\xea" +
1280 "y\x1fO\xc6\xddmJMJwfJ\xba\xdb\xd9\xfb" +
1281 "\xfd}\xf3\x8f}29\x8duh\xf8Tj1\xb4\x17" +
1282 "\xa5\x1f\xed\x844\xbe\xb1\xf6\xe5\xcf\xb3\xe9\xecOz\x16" +
1283 "q\xdb\x90\xfe\xd9\xd48\xb4\xcf\xa4\xed\x8aOS9P" +
1284 "O\xe0\xd7m[Xn-Q\xfaWt,--\x19" +
1285 "5\xbb\xd6\xb7f\x8f\xe9\xf9\xa6]\xd9\x18\xe2\xfd\x05\xc7" +
1286 "2K{\x0b\x80\xde\x01F\xa4\xce\xed#\x02\xd4Y[" +
1287 "\x88\xc0Tu\x88\xa8\xdf\xac\xd8\x8e+\x82\xb2\xe9\x95\x1c" +
1288 "\xdb\x16\xc4K\xfe\xc1\x1d\x86e\xd8%\xd1\x0c\xd4vk" +
1289 "\xa0F\x80\xa2pw\x0bwi\xddvE\xc5\xf4|\xe1" +
1290 "6\xe0\xee\xfe\x82\xe1\x1aUOO\xf0\x04Q\x02Dj" +
1291 "\xe7I\"\xbd\x8bC\xff'CPq\x8d\x92(\x08\x17" +
1292 "\xa6S\x1e3l\xa7\xc8E\x09IbH\x12\x9aAg" +
1293 "\xfe\xd5\xa0\x1b\x84W\xb7|\x8f\x9a\xafn\xff~\xda\xeb" +
1294 "\x82\x91\x0e)w4)\xaf\xd9\"'\x8cC/0\xa8" +
1295 "@F\xce\x8c\xban\x84H\x1f\xe5\xd073\xa8\x8ce" +
1296 "\xc2\xb2n\x1a\"\xd2\x0b\x1c\xfa6\x86\xc0q\xcd\x8ai" +
1297 "\xdf+\x88\xbb>:\x89\xa1\x93\x10\xecr<\xdf6\xaa" +
1298 "\x82\x88\xd0A\x0c\x1d\x84\x83N\xcd7\x1d\xdbCWk" +
1299 "\x1e\x08\xe8\x8a\x95\xe0\x0f>\xf0`\xdd\xdf%l\xdf," +
1300 "\x19\xf21Q\xf8m[\x94\xe7\x11\xe9\x03\x1c\xfah\x8c" +
1301 "r\xfe\xdf\xb1<\"\xca\xebv\xb4\xf2P\x1e\x16{#" +
1302 "V9Q5L+\xfa\x15%3H\xca\xfd-\x9b\xdb" +
1303 "\xf1\xdb\x10V\xd5\x0d\xd9\xad\xaf\xe5\xc2\x0c%\xc7%\x11" +
1304 "Gm>F\x88\x8a\xdd\xe0(.C\x8b\xa6\xd6\x83!" +
1305 "\xa2\xe2B\x89\xafD\x8b\xa9\xb6\x1cY\xa2\xe2\x12\x89\xf7" +
1306 "\x82\x01<\x03N\xa4\xad\xc2\x1bD\xc5^\x09\x0fK\xf3" +
1307 "\x04\xcf A\xa4\x0d\x86\xee\x07$>*\xf1d\"\x83" +
1308 "$\x91\x96\xc7b\xa2\xe2\xb0\xc4\xb7K\xbc\x8de\xd0F" +
1309 "\xa4=\x84q\xa2\xe26\x89\xef\x92\xb8\x92\xcc\xc8\x11\xd5" +
1310 "\x04\\\xa2bY\xe25\x89\xa7fg\x90\"\xd2\xaa!" +
1311 "nI|\x8f\xc4\xdb\xe7d\xd0N\xa4\xd5q\x98\xa8\xe8" +
1312 "K\xfc\x90\xc4g \x83\x19D\xda~\x9c$*\x1e\x92" +
1313 "\xf8\xd3`\x08J\x96)l?_\x8ew\xc2n\xe1z" +
1314 "\xa6cG\xbf\xb9\xe35K-\xa6\x06\x1a\x8d6-8" +
1315 "i9\xd1H\xb7d\x9f\x804!\xa89\x8e5vs" +
1316 "\x87\xa5}\xa3\xe2a&\xa1\xc0\x81\xae\x96\x8c\x12$\x18" +
1317 "\x84\xf3^\xf2MJ;v\xbe\x8c6bhk~\xf2" +
1318 "Q\x87r%\xc3\xca\xd7\x9aLLo\xb0\xee;\xf5\x1a" +
1319 "\xe5\xca\x86/\xca\x001\x80\x10\xb8u{\xad\xebT7" +
1320 "B\xb8U\xd36,j\xde\x94\x9cj\xcd\x15\x9e\x07\xd3" +
1321 "\xb1\xf5\xbaa\x99\xdc\xdf\x8bvbh\x8f\xf5\x10\x9b\xde" +
1322 "C\xb9Z\xdfF\xa3\"{&\xd5\xec\xebE\x8b\x89\xf4" +
1323 "n\x0e}Y\xac\xaf{d_/\xe4\xd0W2\xa4\xe5" +
1324 "p5{x\xb7a\xd5\xc5-\xddz'\x15\xab\x08\xbf" +
1325 "q\xca\xdb;\x9d\xee\x82\xe1*F\xd5\xfb\x9b\xaf7\x08" +
1326 "/-\xc5(\xae\x80}Dz\x8aC\xcf0\xf4\xbb\xa1" +
1327 "V\xa1\xab\xb5%\xa6\x8d>\xff\xb3p\xfd\x8d(\x8d\xb9" +
1328 "O\x125W3\xa2\x8d\xa4\xea\xfb\x88\xa9y\x05\xadm" +
1329 "\x88h\xf9\xa9\xffw\x89\xa9\xab\x14\xb0\xe6\xbf\x01D[" +
1330 "_]t\x94\x98:_\x09\"e\xa4\xfeF\xc8\x01\x04" +
1331 "Qv\x94\x0b\xf3\x1b@\x10\xc9/\"\x05%\x1a@\x01" +
1332 "w_\xee[\xd4;\xe7\xddM\xc5\xa2Uy\xe7z5" +
1333 "\xe2\xa4%_Y\xad\x98\xdfq\"\xbd\x83C\x9f\xcd\x10" +
1334 "X\xce\x94\x94\xa6\xc7b-t;\x89k\x10\x8e\x84." +
1335 "-\x1fK\xff\x99\xa6\xff\xfdR\x85\xf7p\xe8Gb\xdd" +
1336 "\xfa\x98\x04\x1f\xe5\xd0\x9f\x8c\xa9\xf0\xe3r\x9b\x1c\xe1\xd0" +
1337 "O7\x85M=u\x94H?\xcd\xa1\xbf\xd9R5\xf5" +
1338 "ui\xf8\x1a\x87\xfe>\x83\"\\7\xe2\xa9\xd4\xdd\x96" +
1339 "X[Ne\xd4\xb4\x85'%`j\xea\xe5\x95\x9c\xf5" +
1340 "\x9ap\xab\x86-l\xf8k\x0d\xd3\xaa\xbb\x82Zc\xda" +
1341 "\xc8/?\x1cS\x8e\xdf\x03\x00\x00\xff\xff#\xa3\xb8\x8f"
1342
1343func init() {
1344 schemas.Register(schema_db8274f9144abc7e,
1345 0x84cb9536a2cf6d3c,
1346 0x9b87b390babc2ccf,
1347 0xa29a916d4ebdd894,
1348 0xb70431c0dc014915,
1349 0xc082ef6e0d42ed1d,
1350 0xc793e50592935b4a,
1351 0xcbd96442ae3bb01a,
1352 0xdc3ed6801961e502,
1353 0xe3e37d096a5b564e,
1354 0xea58385c65416035,
1355 0xf2c122394f447e8e,
1356 0xf2c68e2547ec3866,
1357 0xf41a0f001ad49e46)
1358}
1359