tunnelrpc.capnp.go 127 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586
  1. // Code generated by capnpc-go. DO NOT EDIT.
  2. package tunnelrpc
  3. import (
  4. context "golang.org/x/net/context"
  5. strconv "strconv"
  6. capnp "zombiezen.com/go/capnproto2"
  7. text "zombiezen.com/go/capnproto2/encoding/text"
  8. schemas "zombiezen.com/go/capnproto2/schemas"
  9. server "zombiezen.com/go/capnproto2/server"
  10. )
  11. type Authentication struct{ capnp.Struct }
  12. // Authentication_TypeID is the unique identifier for the type Authentication.
  13. const Authentication_TypeID = 0xc082ef6e0d42ed1d
  14. func NewAuthentication(s *capnp.Segment) (Authentication, error) {
  15. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 3})
  16. return Authentication{st}, err
  17. }
  18. func NewRootAuthentication(s *capnp.Segment) (Authentication, error) {
  19. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 3})
  20. return Authentication{st}, err
  21. }
  22. func ReadRootAuthentication(msg *capnp.Message) (Authentication, error) {
  23. root, err := msg.RootPtr()
  24. return Authentication{root.Struct()}, err
  25. }
  26. func (s Authentication) String() string {
  27. str, _ := text.Marshal(0xc082ef6e0d42ed1d, s.Struct)
  28. return str
  29. }
  30. func (s Authentication) Key() (string, error) {
  31. p, err := s.Struct.Ptr(0)
  32. return p.Text(), err
  33. }
  34. func (s Authentication) HasKey() bool {
  35. p, err := s.Struct.Ptr(0)
  36. return p.IsValid() || err != nil
  37. }
  38. func (s Authentication) KeyBytes() ([]byte, error) {
  39. p, err := s.Struct.Ptr(0)
  40. return p.TextBytes(), err
  41. }
  42. func (s Authentication) SetKey(v string) error {
  43. return s.Struct.SetText(0, v)
  44. }
  45. func (s Authentication) Email() (string, error) {
  46. p, err := s.Struct.Ptr(1)
  47. return p.Text(), err
  48. }
  49. func (s Authentication) HasEmail() bool {
  50. p, err := s.Struct.Ptr(1)
  51. return p.IsValid() || err != nil
  52. }
  53. func (s Authentication) EmailBytes() ([]byte, error) {
  54. p, err := s.Struct.Ptr(1)
  55. return p.TextBytes(), err
  56. }
  57. func (s Authentication) SetEmail(v string) error {
  58. return s.Struct.SetText(1, v)
  59. }
  60. func (s Authentication) OriginCAKey() (string, error) {
  61. p, err := s.Struct.Ptr(2)
  62. return p.Text(), err
  63. }
  64. func (s Authentication) HasOriginCAKey() bool {
  65. p, err := s.Struct.Ptr(2)
  66. return p.IsValid() || err != nil
  67. }
  68. func (s Authentication) OriginCAKeyBytes() ([]byte, error) {
  69. p, err := s.Struct.Ptr(2)
  70. return p.TextBytes(), err
  71. }
  72. func (s Authentication) SetOriginCAKey(v string) error {
  73. return s.Struct.SetText(2, v)
  74. }
  75. // Authentication_List is a list of Authentication.
  76. type Authentication_List struct{ capnp.List }
  77. // NewAuthentication creates a new list of Authentication.
  78. func NewAuthentication_List(s *capnp.Segment, sz int32) (Authentication_List, error) {
  79. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 3}, sz)
  80. return Authentication_List{l}, err
  81. }
  82. func (s Authentication_List) At(i int) Authentication { return Authentication{s.List.Struct(i)} }
  83. func (s Authentication_List) Set(i int, v Authentication) error { return s.List.SetStruct(i, v.Struct) }
  84. func (s Authentication_List) String() string {
  85. str, _ := text.MarshalList(0xc082ef6e0d42ed1d, s.List)
  86. return str
  87. }
  88. // Authentication_Promise is a wrapper for a Authentication promised by a client call.
  89. type Authentication_Promise struct{ *capnp.Pipeline }
  90. func (p Authentication_Promise) Struct() (Authentication, error) {
  91. s, err := p.Pipeline.Struct()
  92. return Authentication{s}, err
  93. }
  94. type TunnelRegistration struct{ capnp.Struct }
  95. // TunnelRegistration_TypeID is the unique identifier for the type TunnelRegistration.
  96. const TunnelRegistration_TypeID = 0xf41a0f001ad49e46
  97. func NewTunnelRegistration(s *capnp.Segment) (TunnelRegistration, error) {
  98. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 6})
  99. return TunnelRegistration{st}, err
  100. }
  101. func NewRootTunnelRegistration(s *capnp.Segment) (TunnelRegistration, error) {
  102. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 6})
  103. return TunnelRegistration{st}, err
  104. }
  105. func ReadRootTunnelRegistration(msg *capnp.Message) (TunnelRegistration, error) {
  106. root, err := msg.RootPtr()
  107. return TunnelRegistration{root.Struct()}, err
  108. }
  109. func (s TunnelRegistration) String() string {
  110. str, _ := text.Marshal(0xf41a0f001ad49e46, s.Struct)
  111. return str
  112. }
  113. func (s TunnelRegistration) Err() (string, error) {
  114. p, err := s.Struct.Ptr(0)
  115. return p.Text(), err
  116. }
  117. func (s TunnelRegistration) HasErr() bool {
  118. p, err := s.Struct.Ptr(0)
  119. return p.IsValid() || err != nil
  120. }
  121. func (s TunnelRegistration) ErrBytes() ([]byte, error) {
  122. p, err := s.Struct.Ptr(0)
  123. return p.TextBytes(), err
  124. }
  125. func (s TunnelRegistration) SetErr(v string) error {
  126. return s.Struct.SetText(0, v)
  127. }
  128. func (s TunnelRegistration) Url() (string, error) {
  129. p, err := s.Struct.Ptr(1)
  130. return p.Text(), err
  131. }
  132. func (s TunnelRegistration) HasUrl() bool {
  133. p, err := s.Struct.Ptr(1)
  134. return p.IsValid() || err != nil
  135. }
  136. func (s TunnelRegistration) UrlBytes() ([]byte, error) {
  137. p, err := s.Struct.Ptr(1)
  138. return p.TextBytes(), err
  139. }
  140. func (s TunnelRegistration) SetUrl(v string) error {
  141. return s.Struct.SetText(1, v)
  142. }
  143. func (s TunnelRegistration) LogLines() (capnp.TextList, error) {
  144. p, err := s.Struct.Ptr(2)
  145. return capnp.TextList{List: p.List()}, err
  146. }
  147. func (s TunnelRegistration) HasLogLines() bool {
  148. p, err := s.Struct.Ptr(2)
  149. return p.IsValid() || err != nil
  150. }
  151. func (s TunnelRegistration) SetLogLines(v capnp.TextList) error {
  152. return s.Struct.SetPtr(2, v.List.ToPtr())
  153. }
  154. // NewLogLines sets the logLines field to a newly
  155. // allocated capnp.TextList, preferring placement in s's segment.
  156. func (s TunnelRegistration) NewLogLines(n int32) (capnp.TextList, error) {
  157. l, err := capnp.NewTextList(s.Struct.Segment(), n)
  158. if err != nil {
  159. return capnp.TextList{}, err
  160. }
  161. err = s.Struct.SetPtr(2, l.List.ToPtr())
  162. return l, err
  163. }
  164. func (s TunnelRegistration) PermanentFailure() bool {
  165. return s.Struct.Bit(0)
  166. }
  167. func (s TunnelRegistration) SetPermanentFailure(v bool) {
  168. s.Struct.SetBit(0, v)
  169. }
  170. func (s TunnelRegistration) TunnelID() (string, error) {
  171. p, err := s.Struct.Ptr(3)
  172. return p.Text(), err
  173. }
  174. func (s TunnelRegistration) HasTunnelID() bool {
  175. p, err := s.Struct.Ptr(3)
  176. return p.IsValid() || err != nil
  177. }
  178. func (s TunnelRegistration) TunnelIDBytes() ([]byte, error) {
  179. p, err := s.Struct.Ptr(3)
  180. return p.TextBytes(), err
  181. }
  182. func (s TunnelRegistration) SetTunnelID(v string) error {
  183. return s.Struct.SetText(3, v)
  184. }
  185. func (s TunnelRegistration) RetryAfterSeconds() uint16 {
  186. return s.Struct.Uint16(2)
  187. }
  188. func (s TunnelRegistration) SetRetryAfterSeconds(v uint16) {
  189. s.Struct.SetUint16(2, v)
  190. }
  191. func (s TunnelRegistration) EventDigest() ([]byte, error) {
  192. p, err := s.Struct.Ptr(4)
  193. return []byte(p.Data()), err
  194. }
  195. func (s TunnelRegistration) HasEventDigest() bool {
  196. p, err := s.Struct.Ptr(4)
  197. return p.IsValid() || err != nil
  198. }
  199. func (s TunnelRegistration) SetEventDigest(v []byte) error {
  200. return s.Struct.SetData(4, v)
  201. }
  202. func (s TunnelRegistration) ConnDigest() ([]byte, error) {
  203. p, err := s.Struct.Ptr(5)
  204. return []byte(p.Data()), err
  205. }
  206. func (s TunnelRegistration) HasConnDigest() bool {
  207. p, err := s.Struct.Ptr(5)
  208. return p.IsValid() || err != nil
  209. }
  210. func (s TunnelRegistration) SetConnDigest(v []byte) error {
  211. return s.Struct.SetData(5, v)
  212. }
  213. // TunnelRegistration_List is a list of TunnelRegistration.
  214. type TunnelRegistration_List struct{ capnp.List }
  215. // NewTunnelRegistration creates a new list of TunnelRegistration.
  216. func NewTunnelRegistration_List(s *capnp.Segment, sz int32) (TunnelRegistration_List, error) {
  217. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 6}, sz)
  218. return TunnelRegistration_List{l}, err
  219. }
  220. func (s TunnelRegistration_List) At(i int) TunnelRegistration {
  221. return TunnelRegistration{s.List.Struct(i)}
  222. }
  223. func (s TunnelRegistration_List) Set(i int, v TunnelRegistration) error {
  224. return s.List.SetStruct(i, v.Struct)
  225. }
  226. func (s TunnelRegistration_List) String() string {
  227. str, _ := text.MarshalList(0xf41a0f001ad49e46, s.List)
  228. return str
  229. }
  230. // TunnelRegistration_Promise is a wrapper for a TunnelRegistration promised by a client call.
  231. type TunnelRegistration_Promise struct{ *capnp.Pipeline }
  232. func (p TunnelRegistration_Promise) Struct() (TunnelRegistration, error) {
  233. s, err := p.Pipeline.Struct()
  234. return TunnelRegistration{s}, err
  235. }
  236. type RegistrationOptions struct{ capnp.Struct }
  237. // RegistrationOptions_TypeID is the unique identifier for the type RegistrationOptions.
  238. const RegistrationOptions_TypeID = 0xc793e50592935b4a
  239. func NewRegistrationOptions(s *capnp.Segment) (RegistrationOptions, error) {
  240. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 16, PointerCount: 8})
  241. return RegistrationOptions{st}, err
  242. }
  243. func NewRootRegistrationOptions(s *capnp.Segment) (RegistrationOptions, error) {
  244. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 16, PointerCount: 8})
  245. return RegistrationOptions{st}, err
  246. }
  247. func ReadRootRegistrationOptions(msg *capnp.Message) (RegistrationOptions, error) {
  248. root, err := msg.RootPtr()
  249. return RegistrationOptions{root.Struct()}, err
  250. }
  251. func (s RegistrationOptions) String() string {
  252. str, _ := text.Marshal(0xc793e50592935b4a, s.Struct)
  253. return str
  254. }
  255. func (s RegistrationOptions) ClientId() (string, error) {
  256. p, err := s.Struct.Ptr(0)
  257. return p.Text(), err
  258. }
  259. func (s RegistrationOptions) HasClientId() bool {
  260. p, err := s.Struct.Ptr(0)
  261. return p.IsValid() || err != nil
  262. }
  263. func (s RegistrationOptions) ClientIdBytes() ([]byte, error) {
  264. p, err := s.Struct.Ptr(0)
  265. return p.TextBytes(), err
  266. }
  267. func (s RegistrationOptions) SetClientId(v string) error {
  268. return s.Struct.SetText(0, v)
  269. }
  270. func (s RegistrationOptions) Version() (string, error) {
  271. p, err := s.Struct.Ptr(1)
  272. return p.Text(), err
  273. }
  274. func (s RegistrationOptions) HasVersion() bool {
  275. p, err := s.Struct.Ptr(1)
  276. return p.IsValid() || err != nil
  277. }
  278. func (s RegistrationOptions) VersionBytes() ([]byte, error) {
  279. p, err := s.Struct.Ptr(1)
  280. return p.TextBytes(), err
  281. }
  282. func (s RegistrationOptions) SetVersion(v string) error {
  283. return s.Struct.SetText(1, v)
  284. }
  285. func (s RegistrationOptions) Os() (string, error) {
  286. p, err := s.Struct.Ptr(2)
  287. return p.Text(), err
  288. }
  289. func (s RegistrationOptions) HasOs() bool {
  290. p, err := s.Struct.Ptr(2)
  291. return p.IsValid() || err != nil
  292. }
  293. func (s RegistrationOptions) OsBytes() ([]byte, error) {
  294. p, err := s.Struct.Ptr(2)
  295. return p.TextBytes(), err
  296. }
  297. func (s RegistrationOptions) SetOs(v string) error {
  298. return s.Struct.SetText(2, v)
  299. }
  300. func (s RegistrationOptions) ExistingTunnelPolicy() ExistingTunnelPolicy {
  301. return ExistingTunnelPolicy(s.Struct.Uint16(0))
  302. }
  303. func (s RegistrationOptions) SetExistingTunnelPolicy(v ExistingTunnelPolicy) {
  304. s.Struct.SetUint16(0, uint16(v))
  305. }
  306. func (s RegistrationOptions) PoolName() (string, error) {
  307. p, err := s.Struct.Ptr(3)
  308. return p.Text(), err
  309. }
  310. func (s RegistrationOptions) HasPoolName() bool {
  311. p, err := s.Struct.Ptr(3)
  312. return p.IsValid() || err != nil
  313. }
  314. func (s RegistrationOptions) PoolNameBytes() ([]byte, error) {
  315. p, err := s.Struct.Ptr(3)
  316. return p.TextBytes(), err
  317. }
  318. func (s RegistrationOptions) SetPoolName(v string) error {
  319. return s.Struct.SetText(3, v)
  320. }
  321. func (s RegistrationOptions) Tags() (Tag_List, error) {
  322. p, err := s.Struct.Ptr(4)
  323. return Tag_List{List: p.List()}, err
  324. }
  325. func (s RegistrationOptions) HasTags() bool {
  326. p, err := s.Struct.Ptr(4)
  327. return p.IsValid() || err != nil
  328. }
  329. func (s RegistrationOptions) SetTags(v Tag_List) error {
  330. return s.Struct.SetPtr(4, v.List.ToPtr())
  331. }
  332. // NewTags sets the tags field to a newly
  333. // allocated Tag_List, preferring placement in s's segment.
  334. func (s RegistrationOptions) NewTags(n int32) (Tag_List, error) {
  335. l, err := NewTag_List(s.Struct.Segment(), n)
  336. if err != nil {
  337. return Tag_List{}, err
  338. }
  339. err = s.Struct.SetPtr(4, l.List.ToPtr())
  340. return l, err
  341. }
  342. func (s RegistrationOptions) ConnectionId() uint8 {
  343. return s.Struct.Uint8(2)
  344. }
  345. func (s RegistrationOptions) SetConnectionId(v uint8) {
  346. s.Struct.SetUint8(2, v)
  347. }
  348. func (s RegistrationOptions) OriginLocalIp() (string, error) {
  349. p, err := s.Struct.Ptr(5)
  350. return p.Text(), err
  351. }
  352. func (s RegistrationOptions) HasOriginLocalIp() bool {
  353. p, err := s.Struct.Ptr(5)
  354. return p.IsValid() || err != nil
  355. }
  356. func (s RegistrationOptions) OriginLocalIpBytes() ([]byte, error) {
  357. p, err := s.Struct.Ptr(5)
  358. return p.TextBytes(), err
  359. }
  360. func (s RegistrationOptions) SetOriginLocalIp(v string) error {
  361. return s.Struct.SetText(5, v)
  362. }
  363. func (s RegistrationOptions) IsAutoupdated() bool {
  364. return s.Struct.Bit(24)
  365. }
  366. func (s RegistrationOptions) SetIsAutoupdated(v bool) {
  367. s.Struct.SetBit(24, v)
  368. }
  369. func (s RegistrationOptions) RunFromTerminal() bool {
  370. return s.Struct.Bit(25)
  371. }
  372. func (s RegistrationOptions) SetRunFromTerminal(v bool) {
  373. s.Struct.SetBit(25, v)
  374. }
  375. func (s RegistrationOptions) CompressionQuality() uint64 {
  376. return s.Struct.Uint64(8)
  377. }
  378. func (s RegistrationOptions) SetCompressionQuality(v uint64) {
  379. s.Struct.SetUint64(8, v)
  380. }
  381. func (s RegistrationOptions) Uuid() (string, error) {
  382. p, err := s.Struct.Ptr(6)
  383. return p.Text(), err
  384. }
  385. func (s RegistrationOptions) HasUuid() bool {
  386. p, err := s.Struct.Ptr(6)
  387. return p.IsValid() || err != nil
  388. }
  389. func (s RegistrationOptions) UuidBytes() ([]byte, error) {
  390. p, err := s.Struct.Ptr(6)
  391. return p.TextBytes(), err
  392. }
  393. func (s RegistrationOptions) SetUuid(v string) error {
  394. return s.Struct.SetText(6, v)
  395. }
  396. func (s RegistrationOptions) NumPreviousAttempts() uint8 {
  397. return s.Struct.Uint8(4)
  398. }
  399. func (s RegistrationOptions) SetNumPreviousAttempts(v uint8) {
  400. s.Struct.SetUint8(4, v)
  401. }
  402. func (s RegistrationOptions) Features() (capnp.TextList, error) {
  403. p, err := s.Struct.Ptr(7)
  404. return capnp.TextList{List: p.List()}, err
  405. }
  406. func (s RegistrationOptions) HasFeatures() bool {
  407. p, err := s.Struct.Ptr(7)
  408. return p.IsValid() || err != nil
  409. }
  410. func (s RegistrationOptions) SetFeatures(v capnp.TextList) error {
  411. return s.Struct.SetPtr(7, v.List.ToPtr())
  412. }
  413. // NewFeatures sets the features field to a newly
  414. // allocated capnp.TextList, preferring placement in s's segment.
  415. func (s RegistrationOptions) NewFeatures(n int32) (capnp.TextList, error) {
  416. l, err := capnp.NewTextList(s.Struct.Segment(), n)
  417. if err != nil {
  418. return capnp.TextList{}, err
  419. }
  420. err = s.Struct.SetPtr(7, l.List.ToPtr())
  421. return l, err
  422. }
  423. // RegistrationOptions_List is a list of RegistrationOptions.
  424. type RegistrationOptions_List struct{ capnp.List }
  425. // NewRegistrationOptions creates a new list of RegistrationOptions.
  426. func NewRegistrationOptions_List(s *capnp.Segment, sz int32) (RegistrationOptions_List, error) {
  427. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 16, PointerCount: 8}, sz)
  428. return RegistrationOptions_List{l}, err
  429. }
  430. func (s RegistrationOptions_List) At(i int) RegistrationOptions {
  431. return RegistrationOptions{s.List.Struct(i)}
  432. }
  433. func (s RegistrationOptions_List) Set(i int, v RegistrationOptions) error {
  434. return s.List.SetStruct(i, v.Struct)
  435. }
  436. func (s RegistrationOptions_List) String() string {
  437. str, _ := text.MarshalList(0xc793e50592935b4a, s.List)
  438. return str
  439. }
  440. // RegistrationOptions_Promise is a wrapper for a RegistrationOptions promised by a client call.
  441. type RegistrationOptions_Promise struct{ *capnp.Pipeline }
  442. func (p RegistrationOptions_Promise) Struct() (RegistrationOptions, error) {
  443. s, err := p.Pipeline.Struct()
  444. return RegistrationOptions{s}, err
  445. }
  446. type Tag struct{ capnp.Struct }
  447. // Tag_TypeID is the unique identifier for the type Tag.
  448. const Tag_TypeID = 0xcbd96442ae3bb01a
  449. func NewTag(s *capnp.Segment) (Tag, error) {
  450. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
  451. return Tag{st}, err
  452. }
  453. func NewRootTag(s *capnp.Segment) (Tag, error) {
  454. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
  455. return Tag{st}, err
  456. }
  457. func ReadRootTag(msg *capnp.Message) (Tag, error) {
  458. root, err := msg.RootPtr()
  459. return Tag{root.Struct()}, err
  460. }
  461. func (s Tag) String() string {
  462. str, _ := text.Marshal(0xcbd96442ae3bb01a, s.Struct)
  463. return str
  464. }
  465. func (s Tag) Name() (string, error) {
  466. p, err := s.Struct.Ptr(0)
  467. return p.Text(), err
  468. }
  469. func (s Tag) HasName() bool {
  470. p, err := s.Struct.Ptr(0)
  471. return p.IsValid() || err != nil
  472. }
  473. func (s Tag) NameBytes() ([]byte, error) {
  474. p, err := s.Struct.Ptr(0)
  475. return p.TextBytes(), err
  476. }
  477. func (s Tag) SetName(v string) error {
  478. return s.Struct.SetText(0, v)
  479. }
  480. func (s Tag) Value() (string, error) {
  481. p, err := s.Struct.Ptr(1)
  482. return p.Text(), err
  483. }
  484. func (s Tag) HasValue() bool {
  485. p, err := s.Struct.Ptr(1)
  486. return p.IsValid() || err != nil
  487. }
  488. func (s Tag) ValueBytes() ([]byte, error) {
  489. p, err := s.Struct.Ptr(1)
  490. return p.TextBytes(), err
  491. }
  492. func (s Tag) SetValue(v string) error {
  493. return s.Struct.SetText(1, v)
  494. }
  495. // Tag_List is a list of Tag.
  496. type Tag_List struct{ capnp.List }
  497. // NewTag creates a new list of Tag.
  498. func NewTag_List(s *capnp.Segment, sz int32) (Tag_List, error) {
  499. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2}, sz)
  500. return Tag_List{l}, err
  501. }
  502. func (s Tag_List) At(i int) Tag { return Tag{s.List.Struct(i)} }
  503. func (s Tag_List) Set(i int, v Tag) error { return s.List.SetStruct(i, v.Struct) }
  504. func (s Tag_List) String() string {
  505. str, _ := text.MarshalList(0xcbd96442ae3bb01a, s.List)
  506. return str
  507. }
  508. // Tag_Promise is a wrapper for a Tag promised by a client call.
  509. type Tag_Promise struct{ *capnp.Pipeline }
  510. func (p Tag_Promise) Struct() (Tag, error) {
  511. s, err := p.Pipeline.Struct()
  512. return Tag{s}, err
  513. }
  514. type ExistingTunnelPolicy uint16
  515. // ExistingTunnelPolicy_TypeID is the unique identifier for the type ExistingTunnelPolicy.
  516. const ExistingTunnelPolicy_TypeID = 0x84cb9536a2cf6d3c
  517. // Values of ExistingTunnelPolicy.
  518. const (
  519. ExistingTunnelPolicy_ignore ExistingTunnelPolicy = 0
  520. ExistingTunnelPolicy_disconnect ExistingTunnelPolicy = 1
  521. ExistingTunnelPolicy_balance ExistingTunnelPolicy = 2
  522. )
  523. // String returns the enum's constant name.
  524. func (c ExistingTunnelPolicy) String() string {
  525. switch c {
  526. case ExistingTunnelPolicy_ignore:
  527. return "ignore"
  528. case ExistingTunnelPolicy_disconnect:
  529. return "disconnect"
  530. case ExistingTunnelPolicy_balance:
  531. return "balance"
  532. default:
  533. return ""
  534. }
  535. }
  536. // ExistingTunnelPolicyFromString returns the enum value with a name,
  537. // or the zero value if there's no such value.
  538. func ExistingTunnelPolicyFromString(c string) ExistingTunnelPolicy {
  539. switch c {
  540. case "ignore":
  541. return ExistingTunnelPolicy_ignore
  542. case "disconnect":
  543. return ExistingTunnelPolicy_disconnect
  544. case "balance":
  545. return ExistingTunnelPolicy_balance
  546. default:
  547. return 0
  548. }
  549. }
  550. type ExistingTunnelPolicy_List struct{ capnp.List }
  551. func NewExistingTunnelPolicy_List(s *capnp.Segment, sz int32) (ExistingTunnelPolicy_List, error) {
  552. l, err := capnp.NewUInt16List(s, sz)
  553. return ExistingTunnelPolicy_List{l.List}, err
  554. }
  555. func (l ExistingTunnelPolicy_List) At(i int) ExistingTunnelPolicy {
  556. ul := capnp.UInt16List{List: l.List}
  557. return ExistingTunnelPolicy(ul.At(i))
  558. }
  559. func (l ExistingTunnelPolicy_List) Set(i int, v ExistingTunnelPolicy) {
  560. ul := capnp.UInt16List{List: l.List}
  561. ul.Set(i, uint16(v))
  562. }
  563. type ServerInfo struct{ capnp.Struct }
  564. // ServerInfo_TypeID is the unique identifier for the type ServerInfo.
  565. const ServerInfo_TypeID = 0xf2c68e2547ec3866
  566. func NewServerInfo(s *capnp.Segment) (ServerInfo, error) {
  567. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
  568. return ServerInfo{st}, err
  569. }
  570. func NewRootServerInfo(s *capnp.Segment) (ServerInfo, error) {
  571. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
  572. return ServerInfo{st}, err
  573. }
  574. func ReadRootServerInfo(msg *capnp.Message) (ServerInfo, error) {
  575. root, err := msg.RootPtr()
  576. return ServerInfo{root.Struct()}, err
  577. }
  578. func (s ServerInfo) String() string {
  579. str, _ := text.Marshal(0xf2c68e2547ec3866, s.Struct)
  580. return str
  581. }
  582. func (s ServerInfo) LocationName() (string, error) {
  583. p, err := s.Struct.Ptr(0)
  584. return p.Text(), err
  585. }
  586. func (s ServerInfo) HasLocationName() bool {
  587. p, err := s.Struct.Ptr(0)
  588. return p.IsValid() || err != nil
  589. }
  590. func (s ServerInfo) LocationNameBytes() ([]byte, error) {
  591. p, err := s.Struct.Ptr(0)
  592. return p.TextBytes(), err
  593. }
  594. func (s ServerInfo) SetLocationName(v string) error {
  595. return s.Struct.SetText(0, v)
  596. }
  597. // ServerInfo_List is a list of ServerInfo.
  598. type ServerInfo_List struct{ capnp.List }
  599. // NewServerInfo creates a new list of ServerInfo.
  600. func NewServerInfo_List(s *capnp.Segment, sz int32) (ServerInfo_List, error) {
  601. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1}, sz)
  602. return ServerInfo_List{l}, err
  603. }
  604. func (s ServerInfo_List) At(i int) ServerInfo { return ServerInfo{s.List.Struct(i)} }
  605. func (s ServerInfo_List) Set(i int, v ServerInfo) error { return s.List.SetStruct(i, v.Struct) }
  606. func (s ServerInfo_List) String() string {
  607. str, _ := text.MarshalList(0xf2c68e2547ec3866, s.List)
  608. return str
  609. }
  610. // ServerInfo_Promise is a wrapper for a ServerInfo promised by a client call.
  611. type ServerInfo_Promise struct{ *capnp.Pipeline }
  612. func (p ServerInfo_Promise) Struct() (ServerInfo, error) {
  613. s, err := p.Pipeline.Struct()
  614. return ServerInfo{s}, err
  615. }
  616. type AuthenticateResponse struct{ capnp.Struct }
  617. // AuthenticateResponse_TypeID is the unique identifier for the type AuthenticateResponse.
  618. const AuthenticateResponse_TypeID = 0x82c325a07ad22a65
  619. func NewAuthenticateResponse(s *capnp.Segment) (AuthenticateResponse, error) {
  620. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 3})
  621. return AuthenticateResponse{st}, err
  622. }
  623. func NewRootAuthenticateResponse(s *capnp.Segment) (AuthenticateResponse, error) {
  624. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 3})
  625. return AuthenticateResponse{st}, err
  626. }
  627. func ReadRootAuthenticateResponse(msg *capnp.Message) (AuthenticateResponse, error) {
  628. root, err := msg.RootPtr()
  629. return AuthenticateResponse{root.Struct()}, err
  630. }
  631. func (s AuthenticateResponse) String() string {
  632. str, _ := text.Marshal(0x82c325a07ad22a65, s.Struct)
  633. return str
  634. }
  635. func (s AuthenticateResponse) PermanentErr() (string, error) {
  636. p, err := s.Struct.Ptr(0)
  637. return p.Text(), err
  638. }
  639. func (s AuthenticateResponse) HasPermanentErr() bool {
  640. p, err := s.Struct.Ptr(0)
  641. return p.IsValid() || err != nil
  642. }
  643. func (s AuthenticateResponse) PermanentErrBytes() ([]byte, error) {
  644. p, err := s.Struct.Ptr(0)
  645. return p.TextBytes(), err
  646. }
  647. func (s AuthenticateResponse) SetPermanentErr(v string) error {
  648. return s.Struct.SetText(0, v)
  649. }
  650. func (s AuthenticateResponse) RetryableErr() (string, error) {
  651. p, err := s.Struct.Ptr(1)
  652. return p.Text(), err
  653. }
  654. func (s AuthenticateResponse) HasRetryableErr() bool {
  655. p, err := s.Struct.Ptr(1)
  656. return p.IsValid() || err != nil
  657. }
  658. func (s AuthenticateResponse) RetryableErrBytes() ([]byte, error) {
  659. p, err := s.Struct.Ptr(1)
  660. return p.TextBytes(), err
  661. }
  662. func (s AuthenticateResponse) SetRetryableErr(v string) error {
  663. return s.Struct.SetText(1, v)
  664. }
  665. func (s AuthenticateResponse) Jwt() ([]byte, error) {
  666. p, err := s.Struct.Ptr(2)
  667. return []byte(p.Data()), err
  668. }
  669. func (s AuthenticateResponse) HasJwt() bool {
  670. p, err := s.Struct.Ptr(2)
  671. return p.IsValid() || err != nil
  672. }
  673. func (s AuthenticateResponse) SetJwt(v []byte) error {
  674. return s.Struct.SetData(2, v)
  675. }
  676. func (s AuthenticateResponse) HoursUntilRefresh() uint8 {
  677. return s.Struct.Uint8(0)
  678. }
  679. func (s AuthenticateResponse) SetHoursUntilRefresh(v uint8) {
  680. s.Struct.SetUint8(0, v)
  681. }
  682. // AuthenticateResponse_List is a list of AuthenticateResponse.
  683. type AuthenticateResponse_List struct{ capnp.List }
  684. // NewAuthenticateResponse creates a new list of AuthenticateResponse.
  685. func NewAuthenticateResponse_List(s *capnp.Segment, sz int32) (AuthenticateResponse_List, error) {
  686. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 3}, sz)
  687. return AuthenticateResponse_List{l}, err
  688. }
  689. func (s AuthenticateResponse_List) At(i int) AuthenticateResponse {
  690. return AuthenticateResponse{s.List.Struct(i)}
  691. }
  692. func (s AuthenticateResponse_List) Set(i int, v AuthenticateResponse) error {
  693. return s.List.SetStruct(i, v.Struct)
  694. }
  695. func (s AuthenticateResponse_List) String() string {
  696. str, _ := text.MarshalList(0x82c325a07ad22a65, s.List)
  697. return str
  698. }
  699. // AuthenticateResponse_Promise is a wrapper for a AuthenticateResponse promised by a client call.
  700. type AuthenticateResponse_Promise struct{ *capnp.Pipeline }
  701. func (p AuthenticateResponse_Promise) Struct() (AuthenticateResponse, error) {
  702. s, err := p.Pipeline.Struct()
  703. return AuthenticateResponse{s}, err
  704. }
  705. type ClientInfo struct{ capnp.Struct }
  706. // ClientInfo_TypeID is the unique identifier for the type ClientInfo.
  707. const ClientInfo_TypeID = 0x83ced0145b2f114b
  708. func NewClientInfo(s *capnp.Segment) (ClientInfo, error) {
  709. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 4})
  710. return ClientInfo{st}, err
  711. }
  712. func NewRootClientInfo(s *capnp.Segment) (ClientInfo, error) {
  713. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 4})
  714. return ClientInfo{st}, err
  715. }
  716. func ReadRootClientInfo(msg *capnp.Message) (ClientInfo, error) {
  717. root, err := msg.RootPtr()
  718. return ClientInfo{root.Struct()}, err
  719. }
  720. func (s ClientInfo) String() string {
  721. str, _ := text.Marshal(0x83ced0145b2f114b, s.Struct)
  722. return str
  723. }
  724. func (s ClientInfo) ClientId() ([]byte, error) {
  725. p, err := s.Struct.Ptr(0)
  726. return []byte(p.Data()), err
  727. }
  728. func (s ClientInfo) HasClientId() bool {
  729. p, err := s.Struct.Ptr(0)
  730. return p.IsValid() || err != nil
  731. }
  732. func (s ClientInfo) SetClientId(v []byte) error {
  733. return s.Struct.SetData(0, v)
  734. }
  735. func (s ClientInfo) Features() (capnp.TextList, error) {
  736. p, err := s.Struct.Ptr(1)
  737. return capnp.TextList{List: p.List()}, err
  738. }
  739. func (s ClientInfo) HasFeatures() bool {
  740. p, err := s.Struct.Ptr(1)
  741. return p.IsValid() || err != nil
  742. }
  743. func (s ClientInfo) SetFeatures(v capnp.TextList) error {
  744. return s.Struct.SetPtr(1, v.List.ToPtr())
  745. }
  746. // NewFeatures sets the features field to a newly
  747. // allocated capnp.TextList, preferring placement in s's segment.
  748. func (s ClientInfo) NewFeatures(n int32) (capnp.TextList, error) {
  749. l, err := capnp.NewTextList(s.Struct.Segment(), n)
  750. if err != nil {
  751. return capnp.TextList{}, err
  752. }
  753. err = s.Struct.SetPtr(1, l.List.ToPtr())
  754. return l, err
  755. }
  756. func (s ClientInfo) Version() (string, error) {
  757. p, err := s.Struct.Ptr(2)
  758. return p.Text(), err
  759. }
  760. func (s ClientInfo) HasVersion() bool {
  761. p, err := s.Struct.Ptr(2)
  762. return p.IsValid() || err != nil
  763. }
  764. func (s ClientInfo) VersionBytes() ([]byte, error) {
  765. p, err := s.Struct.Ptr(2)
  766. return p.TextBytes(), err
  767. }
  768. func (s ClientInfo) SetVersion(v string) error {
  769. return s.Struct.SetText(2, v)
  770. }
  771. func (s ClientInfo) Arch() (string, error) {
  772. p, err := s.Struct.Ptr(3)
  773. return p.Text(), err
  774. }
  775. func (s ClientInfo) HasArch() bool {
  776. p, err := s.Struct.Ptr(3)
  777. return p.IsValid() || err != nil
  778. }
  779. func (s ClientInfo) ArchBytes() ([]byte, error) {
  780. p, err := s.Struct.Ptr(3)
  781. return p.TextBytes(), err
  782. }
  783. func (s ClientInfo) SetArch(v string) error {
  784. return s.Struct.SetText(3, v)
  785. }
  786. // ClientInfo_List is a list of ClientInfo.
  787. type ClientInfo_List struct{ capnp.List }
  788. // NewClientInfo creates a new list of ClientInfo.
  789. func NewClientInfo_List(s *capnp.Segment, sz int32) (ClientInfo_List, error) {
  790. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 4}, sz)
  791. return ClientInfo_List{l}, err
  792. }
  793. func (s ClientInfo_List) At(i int) ClientInfo { return ClientInfo{s.List.Struct(i)} }
  794. func (s ClientInfo_List) Set(i int, v ClientInfo) error { return s.List.SetStruct(i, v.Struct) }
  795. func (s ClientInfo_List) String() string {
  796. str, _ := text.MarshalList(0x83ced0145b2f114b, s.List)
  797. return str
  798. }
  799. // ClientInfo_Promise is a wrapper for a ClientInfo promised by a client call.
  800. type ClientInfo_Promise struct{ *capnp.Pipeline }
  801. func (p ClientInfo_Promise) Struct() (ClientInfo, error) {
  802. s, err := p.Pipeline.Struct()
  803. return ClientInfo{s}, err
  804. }
  805. type ConnectionOptions struct{ capnp.Struct }
  806. // ConnectionOptions_TypeID is the unique identifier for the type ConnectionOptions.
  807. const ConnectionOptions_TypeID = 0xb4bf9861fe035d04
  808. func NewConnectionOptions(s *capnp.Segment) (ConnectionOptions, error) {
  809. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 2})
  810. return ConnectionOptions{st}, err
  811. }
  812. func NewRootConnectionOptions(s *capnp.Segment) (ConnectionOptions, error) {
  813. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 2})
  814. return ConnectionOptions{st}, err
  815. }
  816. func ReadRootConnectionOptions(msg *capnp.Message) (ConnectionOptions, error) {
  817. root, err := msg.RootPtr()
  818. return ConnectionOptions{root.Struct()}, err
  819. }
  820. func (s ConnectionOptions) String() string {
  821. str, _ := text.Marshal(0xb4bf9861fe035d04, s.Struct)
  822. return str
  823. }
  824. func (s ConnectionOptions) Client() (ClientInfo, error) {
  825. p, err := s.Struct.Ptr(0)
  826. return ClientInfo{Struct: p.Struct()}, err
  827. }
  828. func (s ConnectionOptions) HasClient() bool {
  829. p, err := s.Struct.Ptr(0)
  830. return p.IsValid() || err != nil
  831. }
  832. func (s ConnectionOptions) SetClient(v ClientInfo) error {
  833. return s.Struct.SetPtr(0, v.Struct.ToPtr())
  834. }
  835. // NewClient sets the client field to a newly
  836. // allocated ClientInfo struct, preferring placement in s's segment.
  837. func (s ConnectionOptions) NewClient() (ClientInfo, error) {
  838. ss, err := NewClientInfo(s.Struct.Segment())
  839. if err != nil {
  840. return ClientInfo{}, err
  841. }
  842. err = s.Struct.SetPtr(0, ss.Struct.ToPtr())
  843. return ss, err
  844. }
  845. func (s ConnectionOptions) OriginLocalIp() ([]byte, error) {
  846. p, err := s.Struct.Ptr(1)
  847. return []byte(p.Data()), err
  848. }
  849. func (s ConnectionOptions) HasOriginLocalIp() bool {
  850. p, err := s.Struct.Ptr(1)
  851. return p.IsValid() || err != nil
  852. }
  853. func (s ConnectionOptions) SetOriginLocalIp(v []byte) error {
  854. return s.Struct.SetData(1, v)
  855. }
  856. func (s ConnectionOptions) ReplaceExisting() bool {
  857. return s.Struct.Bit(0)
  858. }
  859. func (s ConnectionOptions) SetReplaceExisting(v bool) {
  860. s.Struct.SetBit(0, v)
  861. }
  862. func (s ConnectionOptions) CompressionQuality() uint8 {
  863. return s.Struct.Uint8(1)
  864. }
  865. func (s ConnectionOptions) SetCompressionQuality(v uint8) {
  866. s.Struct.SetUint8(1, v)
  867. }
  868. func (s ConnectionOptions) NumPreviousAttempts() uint8 {
  869. return s.Struct.Uint8(2)
  870. }
  871. func (s ConnectionOptions) SetNumPreviousAttempts(v uint8) {
  872. s.Struct.SetUint8(2, v)
  873. }
  874. // ConnectionOptions_List is a list of ConnectionOptions.
  875. type ConnectionOptions_List struct{ capnp.List }
  876. // NewConnectionOptions creates a new list of ConnectionOptions.
  877. func NewConnectionOptions_List(s *capnp.Segment, sz int32) (ConnectionOptions_List, error) {
  878. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 2}, sz)
  879. return ConnectionOptions_List{l}, err
  880. }
  881. func (s ConnectionOptions_List) At(i int) ConnectionOptions {
  882. return ConnectionOptions{s.List.Struct(i)}
  883. }
  884. func (s ConnectionOptions_List) Set(i int, v ConnectionOptions) error {
  885. return s.List.SetStruct(i, v.Struct)
  886. }
  887. func (s ConnectionOptions_List) String() string {
  888. str, _ := text.MarshalList(0xb4bf9861fe035d04, s.List)
  889. return str
  890. }
  891. // ConnectionOptions_Promise is a wrapper for a ConnectionOptions promised by a client call.
  892. type ConnectionOptions_Promise struct{ *capnp.Pipeline }
  893. func (p ConnectionOptions_Promise) Struct() (ConnectionOptions, error) {
  894. s, err := p.Pipeline.Struct()
  895. return ConnectionOptions{s}, err
  896. }
  897. func (p ConnectionOptions_Promise) Client() ClientInfo_Promise {
  898. return ClientInfo_Promise{Pipeline: p.Pipeline.GetPipeline(0)}
  899. }
  900. type ConnectionResponse struct{ capnp.Struct }
  901. type ConnectionResponse_result ConnectionResponse
  902. type ConnectionResponse_result_Which uint16
  903. const (
  904. ConnectionResponse_result_Which_error ConnectionResponse_result_Which = 0
  905. ConnectionResponse_result_Which_connectionDetails ConnectionResponse_result_Which = 1
  906. )
  907. func (w ConnectionResponse_result_Which) String() string {
  908. const s = "errorconnectionDetails"
  909. switch w {
  910. case ConnectionResponse_result_Which_error:
  911. return s[0:5]
  912. case ConnectionResponse_result_Which_connectionDetails:
  913. return s[5:22]
  914. }
  915. return "ConnectionResponse_result_Which(" + strconv.FormatUint(uint64(w), 10) + ")"
  916. }
  917. // ConnectionResponse_TypeID is the unique identifier for the type ConnectionResponse.
  918. const ConnectionResponse_TypeID = 0xdbaa9d03d52b62dc
  919. func NewConnectionResponse(s *capnp.Segment) (ConnectionResponse, error) {
  920. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 1})
  921. return ConnectionResponse{st}, err
  922. }
  923. func NewRootConnectionResponse(s *capnp.Segment) (ConnectionResponse, error) {
  924. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 1})
  925. return ConnectionResponse{st}, err
  926. }
  927. func ReadRootConnectionResponse(msg *capnp.Message) (ConnectionResponse, error) {
  928. root, err := msg.RootPtr()
  929. return ConnectionResponse{root.Struct()}, err
  930. }
  931. func (s ConnectionResponse) String() string {
  932. str, _ := text.Marshal(0xdbaa9d03d52b62dc, s.Struct)
  933. return str
  934. }
  935. func (s ConnectionResponse) Result() ConnectionResponse_result { return ConnectionResponse_result(s) }
  936. func (s ConnectionResponse_result) Which() ConnectionResponse_result_Which {
  937. return ConnectionResponse_result_Which(s.Struct.Uint16(0))
  938. }
  939. func (s ConnectionResponse_result) Error() (ConnectionError, error) {
  940. if s.Struct.Uint16(0) != 0 {
  941. panic("Which() != error")
  942. }
  943. p, err := s.Struct.Ptr(0)
  944. return ConnectionError{Struct: p.Struct()}, err
  945. }
  946. func (s ConnectionResponse_result) HasError() bool {
  947. if s.Struct.Uint16(0) != 0 {
  948. return false
  949. }
  950. p, err := s.Struct.Ptr(0)
  951. return p.IsValid() || err != nil
  952. }
  953. func (s ConnectionResponse_result) SetError(v ConnectionError) error {
  954. s.Struct.SetUint16(0, 0)
  955. return s.Struct.SetPtr(0, v.Struct.ToPtr())
  956. }
  957. // NewError sets the error field to a newly
  958. // allocated ConnectionError struct, preferring placement in s's segment.
  959. func (s ConnectionResponse_result) NewError() (ConnectionError, error) {
  960. s.Struct.SetUint16(0, 0)
  961. ss, err := NewConnectionError(s.Struct.Segment())
  962. if err != nil {
  963. return ConnectionError{}, err
  964. }
  965. err = s.Struct.SetPtr(0, ss.Struct.ToPtr())
  966. return ss, err
  967. }
  968. func (s ConnectionResponse_result) ConnectionDetails() (ConnectionDetails, error) {
  969. if s.Struct.Uint16(0) != 1 {
  970. panic("Which() != connectionDetails")
  971. }
  972. p, err := s.Struct.Ptr(0)
  973. return ConnectionDetails{Struct: p.Struct()}, err
  974. }
  975. func (s ConnectionResponse_result) HasConnectionDetails() bool {
  976. if s.Struct.Uint16(0) != 1 {
  977. return false
  978. }
  979. p, err := s.Struct.Ptr(0)
  980. return p.IsValid() || err != nil
  981. }
  982. func (s ConnectionResponse_result) SetConnectionDetails(v ConnectionDetails) error {
  983. s.Struct.SetUint16(0, 1)
  984. return s.Struct.SetPtr(0, v.Struct.ToPtr())
  985. }
  986. // NewConnectionDetails sets the connectionDetails field to a newly
  987. // allocated ConnectionDetails struct, preferring placement in s's segment.
  988. func (s ConnectionResponse_result) NewConnectionDetails() (ConnectionDetails, error) {
  989. s.Struct.SetUint16(0, 1)
  990. ss, err := NewConnectionDetails(s.Struct.Segment())
  991. if err != nil {
  992. return ConnectionDetails{}, err
  993. }
  994. err = s.Struct.SetPtr(0, ss.Struct.ToPtr())
  995. return ss, err
  996. }
  997. // ConnectionResponse_List is a list of ConnectionResponse.
  998. type ConnectionResponse_List struct{ capnp.List }
  999. // NewConnectionResponse creates a new list of ConnectionResponse.
  1000. func NewConnectionResponse_List(s *capnp.Segment, sz int32) (ConnectionResponse_List, error) {
  1001. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 1}, sz)
  1002. return ConnectionResponse_List{l}, err
  1003. }
  1004. func (s ConnectionResponse_List) At(i int) ConnectionResponse {
  1005. return ConnectionResponse{s.List.Struct(i)}
  1006. }
  1007. func (s ConnectionResponse_List) Set(i int, v ConnectionResponse) error {
  1008. return s.List.SetStruct(i, v.Struct)
  1009. }
  1010. func (s ConnectionResponse_List) String() string {
  1011. str, _ := text.MarshalList(0xdbaa9d03d52b62dc, s.List)
  1012. return str
  1013. }
  1014. // ConnectionResponse_Promise is a wrapper for a ConnectionResponse promised by a client call.
  1015. type ConnectionResponse_Promise struct{ *capnp.Pipeline }
  1016. func (p ConnectionResponse_Promise) Struct() (ConnectionResponse, error) {
  1017. s, err := p.Pipeline.Struct()
  1018. return ConnectionResponse{s}, err
  1019. }
  1020. func (p ConnectionResponse_Promise) Result() ConnectionResponse_result_Promise {
  1021. return ConnectionResponse_result_Promise{p.Pipeline}
  1022. }
  1023. // ConnectionResponse_result_Promise is a wrapper for a ConnectionResponse_result promised by a client call.
  1024. type ConnectionResponse_result_Promise struct{ *capnp.Pipeline }
  1025. func (p ConnectionResponse_result_Promise) Struct() (ConnectionResponse_result, error) {
  1026. s, err := p.Pipeline.Struct()
  1027. return ConnectionResponse_result{s}, err
  1028. }
  1029. func (p ConnectionResponse_result_Promise) Error() ConnectionError_Promise {
  1030. return ConnectionError_Promise{Pipeline: p.Pipeline.GetPipeline(0)}
  1031. }
  1032. func (p ConnectionResponse_result_Promise) ConnectionDetails() ConnectionDetails_Promise {
  1033. return ConnectionDetails_Promise{Pipeline: p.Pipeline.GetPipeline(0)}
  1034. }
  1035. type ConnectionError struct{ capnp.Struct }
  1036. // ConnectionError_TypeID is the unique identifier for the type ConnectionError.
  1037. const ConnectionError_TypeID = 0xf5f383d2785edb86
  1038. func NewConnectionError(s *capnp.Segment) (ConnectionError, error) {
  1039. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 16, PointerCount: 1})
  1040. return ConnectionError{st}, err
  1041. }
  1042. func NewRootConnectionError(s *capnp.Segment) (ConnectionError, error) {
  1043. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 16, PointerCount: 1})
  1044. return ConnectionError{st}, err
  1045. }
  1046. func ReadRootConnectionError(msg *capnp.Message) (ConnectionError, error) {
  1047. root, err := msg.RootPtr()
  1048. return ConnectionError{root.Struct()}, err
  1049. }
  1050. func (s ConnectionError) String() string {
  1051. str, _ := text.Marshal(0xf5f383d2785edb86, s.Struct)
  1052. return str
  1053. }
  1054. func (s ConnectionError) Cause() (string, error) {
  1055. p, err := s.Struct.Ptr(0)
  1056. return p.Text(), err
  1057. }
  1058. func (s ConnectionError) HasCause() bool {
  1059. p, err := s.Struct.Ptr(0)
  1060. return p.IsValid() || err != nil
  1061. }
  1062. func (s ConnectionError) CauseBytes() ([]byte, error) {
  1063. p, err := s.Struct.Ptr(0)
  1064. return p.TextBytes(), err
  1065. }
  1066. func (s ConnectionError) SetCause(v string) error {
  1067. return s.Struct.SetText(0, v)
  1068. }
  1069. func (s ConnectionError) RetryAfter() int64 {
  1070. return int64(s.Struct.Uint64(0))
  1071. }
  1072. func (s ConnectionError) SetRetryAfter(v int64) {
  1073. s.Struct.SetUint64(0, uint64(v))
  1074. }
  1075. func (s ConnectionError) ShouldRetry() bool {
  1076. return s.Struct.Bit(64)
  1077. }
  1078. func (s ConnectionError) SetShouldRetry(v bool) {
  1079. s.Struct.SetBit(64, v)
  1080. }
  1081. // ConnectionError_List is a list of ConnectionError.
  1082. type ConnectionError_List struct{ capnp.List }
  1083. // NewConnectionError creates a new list of ConnectionError.
  1084. func NewConnectionError_List(s *capnp.Segment, sz int32) (ConnectionError_List, error) {
  1085. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 16, PointerCount: 1}, sz)
  1086. return ConnectionError_List{l}, err
  1087. }
  1088. func (s ConnectionError_List) At(i int) ConnectionError { return ConnectionError{s.List.Struct(i)} }
  1089. func (s ConnectionError_List) Set(i int, v ConnectionError) error {
  1090. return s.List.SetStruct(i, v.Struct)
  1091. }
  1092. func (s ConnectionError_List) String() string {
  1093. str, _ := text.MarshalList(0xf5f383d2785edb86, s.List)
  1094. return str
  1095. }
  1096. // ConnectionError_Promise is a wrapper for a ConnectionError promised by a client call.
  1097. type ConnectionError_Promise struct{ *capnp.Pipeline }
  1098. func (p ConnectionError_Promise) Struct() (ConnectionError, error) {
  1099. s, err := p.Pipeline.Struct()
  1100. return ConnectionError{s}, err
  1101. }
  1102. type ConnectionDetails struct{ capnp.Struct }
  1103. // ConnectionDetails_TypeID is the unique identifier for the type ConnectionDetails.
  1104. const ConnectionDetails_TypeID = 0xb5f39f082b9ac18a
  1105. func NewConnectionDetails(s *capnp.Segment) (ConnectionDetails, error) {
  1106. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
  1107. return ConnectionDetails{st}, err
  1108. }
  1109. func NewRootConnectionDetails(s *capnp.Segment) (ConnectionDetails, error) {
  1110. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
  1111. return ConnectionDetails{st}, err
  1112. }
  1113. func ReadRootConnectionDetails(msg *capnp.Message) (ConnectionDetails, error) {
  1114. root, err := msg.RootPtr()
  1115. return ConnectionDetails{root.Struct()}, err
  1116. }
  1117. func (s ConnectionDetails) String() string {
  1118. str, _ := text.Marshal(0xb5f39f082b9ac18a, s.Struct)
  1119. return str
  1120. }
  1121. func (s ConnectionDetails) Uuid() ([]byte, error) {
  1122. p, err := s.Struct.Ptr(0)
  1123. return []byte(p.Data()), err
  1124. }
  1125. func (s ConnectionDetails) HasUuid() bool {
  1126. p, err := s.Struct.Ptr(0)
  1127. return p.IsValid() || err != nil
  1128. }
  1129. func (s ConnectionDetails) SetUuid(v []byte) error {
  1130. return s.Struct.SetData(0, v)
  1131. }
  1132. func (s ConnectionDetails) LocationName() (string, error) {
  1133. p, err := s.Struct.Ptr(1)
  1134. return p.Text(), err
  1135. }
  1136. func (s ConnectionDetails) HasLocationName() bool {
  1137. p, err := s.Struct.Ptr(1)
  1138. return p.IsValid() || err != nil
  1139. }
  1140. func (s ConnectionDetails) LocationNameBytes() ([]byte, error) {
  1141. p, err := s.Struct.Ptr(1)
  1142. return p.TextBytes(), err
  1143. }
  1144. func (s ConnectionDetails) SetLocationName(v string) error {
  1145. return s.Struct.SetText(1, v)
  1146. }
  1147. // ConnectionDetails_List is a list of ConnectionDetails.
  1148. type ConnectionDetails_List struct{ capnp.List }
  1149. // NewConnectionDetails creates a new list of ConnectionDetails.
  1150. func NewConnectionDetails_List(s *capnp.Segment, sz int32) (ConnectionDetails_List, error) {
  1151. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2}, sz)
  1152. return ConnectionDetails_List{l}, err
  1153. }
  1154. func (s ConnectionDetails_List) At(i int) ConnectionDetails {
  1155. return ConnectionDetails{s.List.Struct(i)}
  1156. }
  1157. func (s ConnectionDetails_List) Set(i int, v ConnectionDetails) error {
  1158. return s.List.SetStruct(i, v.Struct)
  1159. }
  1160. func (s ConnectionDetails_List) String() string {
  1161. str, _ := text.MarshalList(0xb5f39f082b9ac18a, s.List)
  1162. return str
  1163. }
  1164. // ConnectionDetails_Promise is a wrapper for a ConnectionDetails promised by a client call.
  1165. type ConnectionDetails_Promise struct{ *capnp.Pipeline }
  1166. func (p ConnectionDetails_Promise) Struct() (ConnectionDetails, error) {
  1167. s, err := p.Pipeline.Struct()
  1168. return ConnectionDetails{s}, err
  1169. }
  1170. type TunnelAuth struct{ capnp.Struct }
  1171. // TunnelAuth_TypeID is the unique identifier for the type TunnelAuth.
  1172. const TunnelAuth_TypeID = 0x9496331ab9cd463f
  1173. func NewTunnelAuth(s *capnp.Segment) (TunnelAuth, error) {
  1174. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
  1175. return TunnelAuth{st}, err
  1176. }
  1177. func NewRootTunnelAuth(s *capnp.Segment) (TunnelAuth, error) {
  1178. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
  1179. return TunnelAuth{st}, err
  1180. }
  1181. func ReadRootTunnelAuth(msg *capnp.Message) (TunnelAuth, error) {
  1182. root, err := msg.RootPtr()
  1183. return TunnelAuth{root.Struct()}, err
  1184. }
  1185. func (s TunnelAuth) String() string {
  1186. str, _ := text.Marshal(0x9496331ab9cd463f, s.Struct)
  1187. return str
  1188. }
  1189. func (s TunnelAuth) AccountTag() (string, error) {
  1190. p, err := s.Struct.Ptr(0)
  1191. return p.Text(), err
  1192. }
  1193. func (s TunnelAuth) HasAccountTag() bool {
  1194. p, err := s.Struct.Ptr(0)
  1195. return p.IsValid() || err != nil
  1196. }
  1197. func (s TunnelAuth) AccountTagBytes() ([]byte, error) {
  1198. p, err := s.Struct.Ptr(0)
  1199. return p.TextBytes(), err
  1200. }
  1201. func (s TunnelAuth) SetAccountTag(v string) error {
  1202. return s.Struct.SetText(0, v)
  1203. }
  1204. func (s TunnelAuth) TunnelSecret() ([]byte, error) {
  1205. p, err := s.Struct.Ptr(1)
  1206. return []byte(p.Data()), err
  1207. }
  1208. func (s TunnelAuth) HasTunnelSecret() bool {
  1209. p, err := s.Struct.Ptr(1)
  1210. return p.IsValid() || err != nil
  1211. }
  1212. func (s TunnelAuth) SetTunnelSecret(v []byte) error {
  1213. return s.Struct.SetData(1, v)
  1214. }
  1215. // TunnelAuth_List is a list of TunnelAuth.
  1216. type TunnelAuth_List struct{ capnp.List }
  1217. // NewTunnelAuth creates a new list of TunnelAuth.
  1218. func NewTunnelAuth_List(s *capnp.Segment, sz int32) (TunnelAuth_List, error) {
  1219. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2}, sz)
  1220. return TunnelAuth_List{l}, err
  1221. }
  1222. func (s TunnelAuth_List) At(i int) TunnelAuth { return TunnelAuth{s.List.Struct(i)} }
  1223. func (s TunnelAuth_List) Set(i int, v TunnelAuth) error { return s.List.SetStruct(i, v.Struct) }
  1224. func (s TunnelAuth_List) String() string {
  1225. str, _ := text.MarshalList(0x9496331ab9cd463f, s.List)
  1226. return str
  1227. }
  1228. // TunnelAuth_Promise is a wrapper for a TunnelAuth promised by a client call.
  1229. type TunnelAuth_Promise struct{ *capnp.Pipeline }
  1230. func (p TunnelAuth_Promise) Struct() (TunnelAuth, error) {
  1231. s, err := p.Pipeline.Struct()
  1232. return TunnelAuth{s}, err
  1233. }
  1234. type RegistrationServer struct{ Client capnp.Client }
  1235. // RegistrationServer_TypeID is the unique identifier for the type RegistrationServer.
  1236. const RegistrationServer_TypeID = 0xf71695ec7fe85497
  1237. func (c RegistrationServer) RegisterConnection(ctx context.Context, params func(RegistrationServer_registerConnection_Params) error, opts ...capnp.CallOption) RegistrationServer_registerConnection_Results_Promise {
  1238. if c.Client == nil {
  1239. return RegistrationServer_registerConnection_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
  1240. }
  1241. call := &capnp.Call{
  1242. Ctx: ctx,
  1243. Method: capnp.Method{
  1244. InterfaceID: 0xf71695ec7fe85497,
  1245. MethodID: 0,
  1246. InterfaceName: "tunnelrpc/tunnelrpc.capnp:RegistrationServer",
  1247. MethodName: "registerConnection",
  1248. },
  1249. Options: capnp.NewCallOptions(opts),
  1250. }
  1251. if params != nil {
  1252. call.ParamsSize = capnp.ObjectSize{DataSize: 8, PointerCount: 3}
  1253. call.ParamsFunc = func(s capnp.Struct) error { return params(RegistrationServer_registerConnection_Params{Struct: s}) }
  1254. }
  1255. return RegistrationServer_registerConnection_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
  1256. }
  1257. func (c RegistrationServer) UnregisterConnection(ctx context.Context, params func(RegistrationServer_unregisterConnection_Params) error, opts ...capnp.CallOption) RegistrationServer_unregisterConnection_Results_Promise {
  1258. if c.Client == nil {
  1259. return RegistrationServer_unregisterConnection_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
  1260. }
  1261. call := &capnp.Call{
  1262. Ctx: ctx,
  1263. Method: capnp.Method{
  1264. InterfaceID: 0xf71695ec7fe85497,
  1265. MethodID: 1,
  1266. InterfaceName: "tunnelrpc/tunnelrpc.capnp:RegistrationServer",
  1267. MethodName: "unregisterConnection",
  1268. },
  1269. Options: capnp.NewCallOptions(opts),
  1270. }
  1271. if params != nil {
  1272. call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 0}
  1273. call.ParamsFunc = func(s capnp.Struct) error { return params(RegistrationServer_unregisterConnection_Params{Struct: s}) }
  1274. }
  1275. return RegistrationServer_unregisterConnection_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
  1276. }
  1277. type RegistrationServer_Server interface {
  1278. RegisterConnection(RegistrationServer_registerConnection) error
  1279. UnregisterConnection(RegistrationServer_unregisterConnection) error
  1280. }
  1281. func RegistrationServer_ServerToClient(s RegistrationServer_Server) RegistrationServer {
  1282. c, _ := s.(server.Closer)
  1283. return RegistrationServer{Client: server.New(RegistrationServer_Methods(nil, s), c)}
  1284. }
  1285. func RegistrationServer_Methods(methods []server.Method, s RegistrationServer_Server) []server.Method {
  1286. if cap(methods) == 0 {
  1287. methods = make([]server.Method, 0, 2)
  1288. }
  1289. methods = append(methods, server.Method{
  1290. Method: capnp.Method{
  1291. InterfaceID: 0xf71695ec7fe85497,
  1292. MethodID: 0,
  1293. InterfaceName: "tunnelrpc/tunnelrpc.capnp:RegistrationServer",
  1294. MethodName: "registerConnection",
  1295. },
  1296. Impl: func(c context.Context, opts capnp.CallOptions, p, r capnp.Struct) error {
  1297. call := RegistrationServer_registerConnection{c, opts, RegistrationServer_registerConnection_Params{Struct: p}, RegistrationServer_registerConnection_Results{Struct: r}}
  1298. return s.RegisterConnection(call)
  1299. },
  1300. ResultsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 1},
  1301. })
  1302. methods = append(methods, server.Method{
  1303. Method: capnp.Method{
  1304. InterfaceID: 0xf71695ec7fe85497,
  1305. MethodID: 1,
  1306. InterfaceName: "tunnelrpc/tunnelrpc.capnp:RegistrationServer",
  1307. MethodName: "unregisterConnection",
  1308. },
  1309. Impl: func(c context.Context, opts capnp.CallOptions, p, r capnp.Struct) error {
  1310. call := RegistrationServer_unregisterConnection{c, opts, RegistrationServer_unregisterConnection_Params{Struct: p}, RegistrationServer_unregisterConnection_Results{Struct: r}}
  1311. return s.UnregisterConnection(call)
  1312. },
  1313. ResultsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 0},
  1314. })
  1315. return methods
  1316. }
  1317. // RegistrationServer_registerConnection holds the arguments for a server call to RegistrationServer.registerConnection.
  1318. type RegistrationServer_registerConnection struct {
  1319. Ctx context.Context
  1320. Options capnp.CallOptions
  1321. Params RegistrationServer_registerConnection_Params
  1322. Results RegistrationServer_registerConnection_Results
  1323. }
  1324. // RegistrationServer_unregisterConnection holds the arguments for a server call to RegistrationServer.unregisterConnection.
  1325. type RegistrationServer_unregisterConnection struct {
  1326. Ctx context.Context
  1327. Options capnp.CallOptions
  1328. Params RegistrationServer_unregisterConnection_Params
  1329. Results RegistrationServer_unregisterConnection_Results
  1330. }
  1331. type RegistrationServer_registerConnection_Params struct{ capnp.Struct }
  1332. // RegistrationServer_registerConnection_Params_TypeID is the unique identifier for the type RegistrationServer_registerConnection_Params.
  1333. const RegistrationServer_registerConnection_Params_TypeID = 0xe6646dec8feaa6ee
  1334. func NewRegistrationServer_registerConnection_Params(s *capnp.Segment) (RegistrationServer_registerConnection_Params, error) {
  1335. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 3})
  1336. return RegistrationServer_registerConnection_Params{st}, err
  1337. }
  1338. func NewRootRegistrationServer_registerConnection_Params(s *capnp.Segment) (RegistrationServer_registerConnection_Params, error) {
  1339. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 3})
  1340. return RegistrationServer_registerConnection_Params{st}, err
  1341. }
  1342. func ReadRootRegistrationServer_registerConnection_Params(msg *capnp.Message) (RegistrationServer_registerConnection_Params, error) {
  1343. root, err := msg.RootPtr()
  1344. return RegistrationServer_registerConnection_Params{root.Struct()}, err
  1345. }
  1346. func (s RegistrationServer_registerConnection_Params) String() string {
  1347. str, _ := text.Marshal(0xe6646dec8feaa6ee, s.Struct)
  1348. return str
  1349. }
  1350. func (s RegistrationServer_registerConnection_Params) Auth() (TunnelAuth, error) {
  1351. p, err := s.Struct.Ptr(0)
  1352. return TunnelAuth{Struct: p.Struct()}, err
  1353. }
  1354. func (s RegistrationServer_registerConnection_Params) HasAuth() bool {
  1355. p, err := s.Struct.Ptr(0)
  1356. return p.IsValid() || err != nil
  1357. }
  1358. func (s RegistrationServer_registerConnection_Params) SetAuth(v TunnelAuth) error {
  1359. return s.Struct.SetPtr(0, v.Struct.ToPtr())
  1360. }
  1361. // NewAuth sets the auth field to a newly
  1362. // allocated TunnelAuth struct, preferring placement in s's segment.
  1363. func (s RegistrationServer_registerConnection_Params) NewAuth() (TunnelAuth, error) {
  1364. ss, err := NewTunnelAuth(s.Struct.Segment())
  1365. if err != nil {
  1366. return TunnelAuth{}, err
  1367. }
  1368. err = s.Struct.SetPtr(0, ss.Struct.ToPtr())
  1369. return ss, err
  1370. }
  1371. func (s RegistrationServer_registerConnection_Params) TunnelId() ([]byte, error) {
  1372. p, err := s.Struct.Ptr(1)
  1373. return []byte(p.Data()), err
  1374. }
  1375. func (s RegistrationServer_registerConnection_Params) HasTunnelId() bool {
  1376. p, err := s.Struct.Ptr(1)
  1377. return p.IsValid() || err != nil
  1378. }
  1379. func (s RegistrationServer_registerConnection_Params) SetTunnelId(v []byte) error {
  1380. return s.Struct.SetData(1, v)
  1381. }
  1382. func (s RegistrationServer_registerConnection_Params) ConnIndex() uint8 {
  1383. return s.Struct.Uint8(0)
  1384. }
  1385. func (s RegistrationServer_registerConnection_Params) SetConnIndex(v uint8) {
  1386. s.Struct.SetUint8(0, v)
  1387. }
  1388. func (s RegistrationServer_registerConnection_Params) Options() (ConnectionOptions, error) {
  1389. p, err := s.Struct.Ptr(2)
  1390. return ConnectionOptions{Struct: p.Struct()}, err
  1391. }
  1392. func (s RegistrationServer_registerConnection_Params) HasOptions() bool {
  1393. p, err := s.Struct.Ptr(2)
  1394. return p.IsValid() || err != nil
  1395. }
  1396. func (s RegistrationServer_registerConnection_Params) SetOptions(v ConnectionOptions) error {
  1397. return s.Struct.SetPtr(2, v.Struct.ToPtr())
  1398. }
  1399. // NewOptions sets the options field to a newly
  1400. // allocated ConnectionOptions struct, preferring placement in s's segment.
  1401. func (s RegistrationServer_registerConnection_Params) NewOptions() (ConnectionOptions, error) {
  1402. ss, err := NewConnectionOptions(s.Struct.Segment())
  1403. if err != nil {
  1404. return ConnectionOptions{}, err
  1405. }
  1406. err = s.Struct.SetPtr(2, ss.Struct.ToPtr())
  1407. return ss, err
  1408. }
  1409. // RegistrationServer_registerConnection_Params_List is a list of RegistrationServer_registerConnection_Params.
  1410. type RegistrationServer_registerConnection_Params_List struct{ capnp.List }
  1411. // NewRegistrationServer_registerConnection_Params creates a new list of RegistrationServer_registerConnection_Params.
  1412. func NewRegistrationServer_registerConnection_Params_List(s *capnp.Segment, sz int32) (RegistrationServer_registerConnection_Params_List, error) {
  1413. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 3}, sz)
  1414. return RegistrationServer_registerConnection_Params_List{l}, err
  1415. }
  1416. func (s RegistrationServer_registerConnection_Params_List) At(i int) RegistrationServer_registerConnection_Params {
  1417. return RegistrationServer_registerConnection_Params{s.List.Struct(i)}
  1418. }
  1419. func (s RegistrationServer_registerConnection_Params_List) Set(i int, v RegistrationServer_registerConnection_Params) error {
  1420. return s.List.SetStruct(i, v.Struct)
  1421. }
  1422. func (s RegistrationServer_registerConnection_Params_List) String() string {
  1423. str, _ := text.MarshalList(0xe6646dec8feaa6ee, s.List)
  1424. return str
  1425. }
  1426. // RegistrationServer_registerConnection_Params_Promise is a wrapper for a RegistrationServer_registerConnection_Params promised by a client call.
  1427. type RegistrationServer_registerConnection_Params_Promise struct{ *capnp.Pipeline }
  1428. func (p RegistrationServer_registerConnection_Params_Promise) Struct() (RegistrationServer_registerConnection_Params, error) {
  1429. s, err := p.Pipeline.Struct()
  1430. return RegistrationServer_registerConnection_Params{s}, err
  1431. }
  1432. func (p RegistrationServer_registerConnection_Params_Promise) Auth() TunnelAuth_Promise {
  1433. return TunnelAuth_Promise{Pipeline: p.Pipeline.GetPipeline(0)}
  1434. }
  1435. func (p RegistrationServer_registerConnection_Params_Promise) Options() ConnectionOptions_Promise {
  1436. return ConnectionOptions_Promise{Pipeline: p.Pipeline.GetPipeline(2)}
  1437. }
  1438. type RegistrationServer_registerConnection_Results struct{ capnp.Struct }
  1439. // RegistrationServer_registerConnection_Results_TypeID is the unique identifier for the type RegistrationServer_registerConnection_Results.
  1440. const RegistrationServer_registerConnection_Results_TypeID = 0xea50d822450d1f17
  1441. func NewRegistrationServer_registerConnection_Results(s *capnp.Segment) (RegistrationServer_registerConnection_Results, error) {
  1442. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
  1443. return RegistrationServer_registerConnection_Results{st}, err
  1444. }
  1445. func NewRootRegistrationServer_registerConnection_Results(s *capnp.Segment) (RegistrationServer_registerConnection_Results, error) {
  1446. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
  1447. return RegistrationServer_registerConnection_Results{st}, err
  1448. }
  1449. func ReadRootRegistrationServer_registerConnection_Results(msg *capnp.Message) (RegistrationServer_registerConnection_Results, error) {
  1450. root, err := msg.RootPtr()
  1451. return RegistrationServer_registerConnection_Results{root.Struct()}, err
  1452. }
  1453. func (s RegistrationServer_registerConnection_Results) String() string {
  1454. str, _ := text.Marshal(0xea50d822450d1f17, s.Struct)
  1455. return str
  1456. }
  1457. func (s RegistrationServer_registerConnection_Results) Result() (ConnectionResponse, error) {
  1458. p, err := s.Struct.Ptr(0)
  1459. return ConnectionResponse{Struct: p.Struct()}, err
  1460. }
  1461. func (s RegistrationServer_registerConnection_Results) HasResult() bool {
  1462. p, err := s.Struct.Ptr(0)
  1463. return p.IsValid() || err != nil
  1464. }
  1465. func (s RegistrationServer_registerConnection_Results) SetResult(v ConnectionResponse) error {
  1466. return s.Struct.SetPtr(0, v.Struct.ToPtr())
  1467. }
  1468. // NewResult sets the result field to a newly
  1469. // allocated ConnectionResponse struct, preferring placement in s's segment.
  1470. func (s RegistrationServer_registerConnection_Results) NewResult() (ConnectionResponse, error) {
  1471. ss, err := NewConnectionResponse(s.Struct.Segment())
  1472. if err != nil {
  1473. return ConnectionResponse{}, err
  1474. }
  1475. err = s.Struct.SetPtr(0, ss.Struct.ToPtr())
  1476. return ss, err
  1477. }
  1478. // RegistrationServer_registerConnection_Results_List is a list of RegistrationServer_registerConnection_Results.
  1479. type RegistrationServer_registerConnection_Results_List struct{ capnp.List }
  1480. // NewRegistrationServer_registerConnection_Results creates a new list of RegistrationServer_registerConnection_Results.
  1481. func NewRegistrationServer_registerConnection_Results_List(s *capnp.Segment, sz int32) (RegistrationServer_registerConnection_Results_List, error) {
  1482. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1}, sz)
  1483. return RegistrationServer_registerConnection_Results_List{l}, err
  1484. }
  1485. func (s RegistrationServer_registerConnection_Results_List) At(i int) RegistrationServer_registerConnection_Results {
  1486. return RegistrationServer_registerConnection_Results{s.List.Struct(i)}
  1487. }
  1488. func (s RegistrationServer_registerConnection_Results_List) Set(i int, v RegistrationServer_registerConnection_Results) error {
  1489. return s.List.SetStruct(i, v.Struct)
  1490. }
  1491. func (s RegistrationServer_registerConnection_Results_List) String() string {
  1492. str, _ := text.MarshalList(0xea50d822450d1f17, s.List)
  1493. return str
  1494. }
  1495. // RegistrationServer_registerConnection_Results_Promise is a wrapper for a RegistrationServer_registerConnection_Results promised by a client call.
  1496. type RegistrationServer_registerConnection_Results_Promise struct{ *capnp.Pipeline }
  1497. func (p RegistrationServer_registerConnection_Results_Promise) Struct() (RegistrationServer_registerConnection_Results, error) {
  1498. s, err := p.Pipeline.Struct()
  1499. return RegistrationServer_registerConnection_Results{s}, err
  1500. }
  1501. func (p RegistrationServer_registerConnection_Results_Promise) Result() ConnectionResponse_Promise {
  1502. return ConnectionResponse_Promise{Pipeline: p.Pipeline.GetPipeline(0)}
  1503. }
  1504. type RegistrationServer_unregisterConnection_Params struct{ capnp.Struct }
  1505. // RegistrationServer_unregisterConnection_Params_TypeID is the unique identifier for the type RegistrationServer_unregisterConnection_Params.
  1506. const RegistrationServer_unregisterConnection_Params_TypeID = 0xf9cb7f4431a307d0
  1507. func NewRegistrationServer_unregisterConnection_Params(s *capnp.Segment) (RegistrationServer_unregisterConnection_Params, error) {
  1508. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
  1509. return RegistrationServer_unregisterConnection_Params{st}, err
  1510. }
  1511. func NewRootRegistrationServer_unregisterConnection_Params(s *capnp.Segment) (RegistrationServer_unregisterConnection_Params, error) {
  1512. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
  1513. return RegistrationServer_unregisterConnection_Params{st}, err
  1514. }
  1515. func ReadRootRegistrationServer_unregisterConnection_Params(msg *capnp.Message) (RegistrationServer_unregisterConnection_Params, error) {
  1516. root, err := msg.RootPtr()
  1517. return RegistrationServer_unregisterConnection_Params{root.Struct()}, err
  1518. }
  1519. func (s RegistrationServer_unregisterConnection_Params) String() string {
  1520. str, _ := text.Marshal(0xf9cb7f4431a307d0, s.Struct)
  1521. return str
  1522. }
  1523. // RegistrationServer_unregisterConnection_Params_List is a list of RegistrationServer_unregisterConnection_Params.
  1524. type RegistrationServer_unregisterConnection_Params_List struct{ capnp.List }
  1525. // NewRegistrationServer_unregisterConnection_Params creates a new list of RegistrationServer_unregisterConnection_Params.
  1526. func NewRegistrationServer_unregisterConnection_Params_List(s *capnp.Segment, sz int32) (RegistrationServer_unregisterConnection_Params_List, error) {
  1527. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0}, sz)
  1528. return RegistrationServer_unregisterConnection_Params_List{l}, err
  1529. }
  1530. func (s RegistrationServer_unregisterConnection_Params_List) At(i int) RegistrationServer_unregisterConnection_Params {
  1531. return RegistrationServer_unregisterConnection_Params{s.List.Struct(i)}
  1532. }
  1533. func (s RegistrationServer_unregisterConnection_Params_List) Set(i int, v RegistrationServer_unregisterConnection_Params) error {
  1534. return s.List.SetStruct(i, v.Struct)
  1535. }
  1536. func (s RegistrationServer_unregisterConnection_Params_List) String() string {
  1537. str, _ := text.MarshalList(0xf9cb7f4431a307d0, s.List)
  1538. return str
  1539. }
  1540. // RegistrationServer_unregisterConnection_Params_Promise is a wrapper for a RegistrationServer_unregisterConnection_Params promised by a client call.
  1541. type RegistrationServer_unregisterConnection_Params_Promise struct{ *capnp.Pipeline }
  1542. func (p RegistrationServer_unregisterConnection_Params_Promise) Struct() (RegistrationServer_unregisterConnection_Params, error) {
  1543. s, err := p.Pipeline.Struct()
  1544. return RegistrationServer_unregisterConnection_Params{s}, err
  1545. }
  1546. type RegistrationServer_unregisterConnection_Results struct{ capnp.Struct }
  1547. // RegistrationServer_unregisterConnection_Results_TypeID is the unique identifier for the type RegistrationServer_unregisterConnection_Results.
  1548. const RegistrationServer_unregisterConnection_Results_TypeID = 0xb046e578094b1ead
  1549. func NewRegistrationServer_unregisterConnection_Results(s *capnp.Segment) (RegistrationServer_unregisterConnection_Results, error) {
  1550. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
  1551. return RegistrationServer_unregisterConnection_Results{st}, err
  1552. }
  1553. func NewRootRegistrationServer_unregisterConnection_Results(s *capnp.Segment) (RegistrationServer_unregisterConnection_Results, error) {
  1554. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
  1555. return RegistrationServer_unregisterConnection_Results{st}, err
  1556. }
  1557. func ReadRootRegistrationServer_unregisterConnection_Results(msg *capnp.Message) (RegistrationServer_unregisterConnection_Results, error) {
  1558. root, err := msg.RootPtr()
  1559. return RegistrationServer_unregisterConnection_Results{root.Struct()}, err
  1560. }
  1561. func (s RegistrationServer_unregisterConnection_Results) String() string {
  1562. str, _ := text.Marshal(0xb046e578094b1ead, s.Struct)
  1563. return str
  1564. }
  1565. // RegistrationServer_unregisterConnection_Results_List is a list of RegistrationServer_unregisterConnection_Results.
  1566. type RegistrationServer_unregisterConnection_Results_List struct{ capnp.List }
  1567. // NewRegistrationServer_unregisterConnection_Results creates a new list of RegistrationServer_unregisterConnection_Results.
  1568. func NewRegistrationServer_unregisterConnection_Results_List(s *capnp.Segment, sz int32) (RegistrationServer_unregisterConnection_Results_List, error) {
  1569. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0}, sz)
  1570. return RegistrationServer_unregisterConnection_Results_List{l}, err
  1571. }
  1572. func (s RegistrationServer_unregisterConnection_Results_List) At(i int) RegistrationServer_unregisterConnection_Results {
  1573. return RegistrationServer_unregisterConnection_Results{s.List.Struct(i)}
  1574. }
  1575. func (s RegistrationServer_unregisterConnection_Results_List) Set(i int, v RegistrationServer_unregisterConnection_Results) error {
  1576. return s.List.SetStruct(i, v.Struct)
  1577. }
  1578. func (s RegistrationServer_unregisterConnection_Results_List) String() string {
  1579. str, _ := text.MarshalList(0xb046e578094b1ead, s.List)
  1580. return str
  1581. }
  1582. // RegistrationServer_unregisterConnection_Results_Promise is a wrapper for a RegistrationServer_unregisterConnection_Results promised by a client call.
  1583. type RegistrationServer_unregisterConnection_Results_Promise struct{ *capnp.Pipeline }
  1584. func (p RegistrationServer_unregisterConnection_Results_Promise) Struct() (RegistrationServer_unregisterConnection_Results, error) {
  1585. s, err := p.Pipeline.Struct()
  1586. return RegistrationServer_unregisterConnection_Results{s}, err
  1587. }
  1588. type TunnelServer struct{ Client capnp.Client }
  1589. // TunnelServer_TypeID is the unique identifier for the type TunnelServer.
  1590. const TunnelServer_TypeID = 0xea58385c65416035
  1591. func (c TunnelServer) RegisterTunnel(ctx context.Context, params func(TunnelServer_registerTunnel_Params) error, opts ...capnp.CallOption) TunnelServer_registerTunnel_Results_Promise {
  1592. if c.Client == nil {
  1593. return TunnelServer_registerTunnel_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
  1594. }
  1595. call := &capnp.Call{
  1596. Ctx: ctx,
  1597. Method: capnp.Method{
  1598. InterfaceID: 0xea58385c65416035,
  1599. MethodID: 0,
  1600. InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
  1601. MethodName: "registerTunnel",
  1602. },
  1603. Options: capnp.NewCallOptions(opts),
  1604. }
  1605. if params != nil {
  1606. call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 3}
  1607. call.ParamsFunc = func(s capnp.Struct) error { return params(TunnelServer_registerTunnel_Params{Struct: s}) }
  1608. }
  1609. return TunnelServer_registerTunnel_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
  1610. }
  1611. func (c TunnelServer) GetServerInfo(ctx context.Context, params func(TunnelServer_getServerInfo_Params) error, opts ...capnp.CallOption) TunnelServer_getServerInfo_Results_Promise {
  1612. if c.Client == nil {
  1613. return TunnelServer_getServerInfo_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
  1614. }
  1615. call := &capnp.Call{
  1616. Ctx: ctx,
  1617. Method: capnp.Method{
  1618. InterfaceID: 0xea58385c65416035,
  1619. MethodID: 1,
  1620. InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
  1621. MethodName: "getServerInfo",
  1622. },
  1623. Options: capnp.NewCallOptions(opts),
  1624. }
  1625. if params != nil {
  1626. call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 0}
  1627. call.ParamsFunc = func(s capnp.Struct) error { return params(TunnelServer_getServerInfo_Params{Struct: s}) }
  1628. }
  1629. return TunnelServer_getServerInfo_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
  1630. }
  1631. func (c TunnelServer) UnregisterTunnel(ctx context.Context, params func(TunnelServer_unregisterTunnel_Params) error, opts ...capnp.CallOption) TunnelServer_unregisterTunnel_Results_Promise {
  1632. if c.Client == nil {
  1633. return TunnelServer_unregisterTunnel_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
  1634. }
  1635. call := &capnp.Call{
  1636. Ctx: ctx,
  1637. Method: capnp.Method{
  1638. InterfaceID: 0xea58385c65416035,
  1639. MethodID: 2,
  1640. InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
  1641. MethodName: "unregisterTunnel",
  1642. },
  1643. Options: capnp.NewCallOptions(opts),
  1644. }
  1645. if params != nil {
  1646. call.ParamsSize = capnp.ObjectSize{DataSize: 8, PointerCount: 0}
  1647. call.ParamsFunc = func(s capnp.Struct) error { return params(TunnelServer_unregisterTunnel_Params{Struct: s}) }
  1648. }
  1649. return TunnelServer_unregisterTunnel_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
  1650. }
  1651. func (c TunnelServer) ObsoleteDeclarativeTunnelConnect(ctx context.Context, params func(TunnelServer_obsoleteDeclarativeTunnelConnect_Params) error, opts ...capnp.CallOption) TunnelServer_obsoleteDeclarativeTunnelConnect_Results_Promise {
  1652. if c.Client == nil {
  1653. return TunnelServer_obsoleteDeclarativeTunnelConnect_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
  1654. }
  1655. call := &capnp.Call{
  1656. Ctx: ctx,
  1657. Method: capnp.Method{
  1658. InterfaceID: 0xea58385c65416035,
  1659. MethodID: 3,
  1660. InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
  1661. MethodName: "obsoleteDeclarativeTunnelConnect",
  1662. },
  1663. Options: capnp.NewCallOptions(opts),
  1664. }
  1665. if params != nil {
  1666. call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 0}
  1667. call.ParamsFunc = func(s capnp.Struct) error {
  1668. return params(TunnelServer_obsoleteDeclarativeTunnelConnect_Params{Struct: s})
  1669. }
  1670. }
  1671. return TunnelServer_obsoleteDeclarativeTunnelConnect_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
  1672. }
  1673. func (c TunnelServer) Authenticate(ctx context.Context, params func(TunnelServer_authenticate_Params) error, opts ...capnp.CallOption) TunnelServer_authenticate_Results_Promise {
  1674. if c.Client == nil {
  1675. return TunnelServer_authenticate_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
  1676. }
  1677. call := &capnp.Call{
  1678. Ctx: ctx,
  1679. Method: capnp.Method{
  1680. InterfaceID: 0xea58385c65416035,
  1681. MethodID: 4,
  1682. InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
  1683. MethodName: "authenticate",
  1684. },
  1685. Options: capnp.NewCallOptions(opts),
  1686. }
  1687. if params != nil {
  1688. call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 3}
  1689. call.ParamsFunc = func(s capnp.Struct) error { return params(TunnelServer_authenticate_Params{Struct: s}) }
  1690. }
  1691. return TunnelServer_authenticate_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
  1692. }
  1693. func (c TunnelServer) ReconnectTunnel(ctx context.Context, params func(TunnelServer_reconnectTunnel_Params) error, opts ...capnp.CallOption) TunnelServer_reconnectTunnel_Results_Promise {
  1694. if c.Client == nil {
  1695. return TunnelServer_reconnectTunnel_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
  1696. }
  1697. call := &capnp.Call{
  1698. Ctx: ctx,
  1699. Method: capnp.Method{
  1700. InterfaceID: 0xea58385c65416035,
  1701. MethodID: 5,
  1702. InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
  1703. MethodName: "reconnectTunnel",
  1704. },
  1705. Options: capnp.NewCallOptions(opts),
  1706. }
  1707. if params != nil {
  1708. call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 5}
  1709. call.ParamsFunc = func(s capnp.Struct) error { return params(TunnelServer_reconnectTunnel_Params{Struct: s}) }
  1710. }
  1711. return TunnelServer_reconnectTunnel_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
  1712. }
  1713. func (c TunnelServer) RegisterConnection(ctx context.Context, params func(RegistrationServer_registerConnection_Params) error, opts ...capnp.CallOption) RegistrationServer_registerConnection_Results_Promise {
  1714. if c.Client == nil {
  1715. return RegistrationServer_registerConnection_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
  1716. }
  1717. call := &capnp.Call{
  1718. Ctx: ctx,
  1719. Method: capnp.Method{
  1720. InterfaceID: 0xf71695ec7fe85497,
  1721. MethodID: 0,
  1722. InterfaceName: "tunnelrpc/tunnelrpc.capnp:RegistrationServer",
  1723. MethodName: "registerConnection",
  1724. },
  1725. Options: capnp.NewCallOptions(opts),
  1726. }
  1727. if params != nil {
  1728. call.ParamsSize = capnp.ObjectSize{DataSize: 8, PointerCount: 3}
  1729. call.ParamsFunc = func(s capnp.Struct) error { return params(RegistrationServer_registerConnection_Params{Struct: s}) }
  1730. }
  1731. return RegistrationServer_registerConnection_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
  1732. }
  1733. func (c TunnelServer) UnregisterConnection(ctx context.Context, params func(RegistrationServer_unregisterConnection_Params) error, opts ...capnp.CallOption) RegistrationServer_unregisterConnection_Results_Promise {
  1734. if c.Client == nil {
  1735. return RegistrationServer_unregisterConnection_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
  1736. }
  1737. call := &capnp.Call{
  1738. Ctx: ctx,
  1739. Method: capnp.Method{
  1740. InterfaceID: 0xf71695ec7fe85497,
  1741. MethodID: 1,
  1742. InterfaceName: "tunnelrpc/tunnelrpc.capnp:RegistrationServer",
  1743. MethodName: "unregisterConnection",
  1744. },
  1745. Options: capnp.NewCallOptions(opts),
  1746. }
  1747. if params != nil {
  1748. call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 0}
  1749. call.ParamsFunc = func(s capnp.Struct) error { return params(RegistrationServer_unregisterConnection_Params{Struct: s}) }
  1750. }
  1751. return RegistrationServer_unregisterConnection_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
  1752. }
  1753. type TunnelServer_Server interface {
  1754. RegisterTunnel(TunnelServer_registerTunnel) error
  1755. GetServerInfo(TunnelServer_getServerInfo) error
  1756. UnregisterTunnel(TunnelServer_unregisterTunnel) error
  1757. ObsoleteDeclarativeTunnelConnect(TunnelServer_obsoleteDeclarativeTunnelConnect) error
  1758. Authenticate(TunnelServer_authenticate) error
  1759. ReconnectTunnel(TunnelServer_reconnectTunnel) error
  1760. RegisterConnection(RegistrationServer_registerConnection) error
  1761. UnregisterConnection(RegistrationServer_unregisterConnection) error
  1762. }
  1763. func TunnelServer_ServerToClient(s TunnelServer_Server) TunnelServer {
  1764. c, _ := s.(server.Closer)
  1765. return TunnelServer{Client: server.New(TunnelServer_Methods(nil, s), c)}
  1766. }
  1767. func TunnelServer_Methods(methods []server.Method, s TunnelServer_Server) []server.Method {
  1768. if cap(methods) == 0 {
  1769. methods = make([]server.Method, 0, 8)
  1770. }
  1771. methods = append(methods, server.Method{
  1772. Method: capnp.Method{
  1773. InterfaceID: 0xea58385c65416035,
  1774. MethodID: 0,
  1775. InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
  1776. MethodName: "registerTunnel",
  1777. },
  1778. Impl: func(c context.Context, opts capnp.CallOptions, p, r capnp.Struct) error {
  1779. call := TunnelServer_registerTunnel{c, opts, TunnelServer_registerTunnel_Params{Struct: p}, TunnelServer_registerTunnel_Results{Struct: r}}
  1780. return s.RegisterTunnel(call)
  1781. },
  1782. ResultsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 1},
  1783. })
  1784. methods = append(methods, server.Method{
  1785. Method: capnp.Method{
  1786. InterfaceID: 0xea58385c65416035,
  1787. MethodID: 1,
  1788. InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
  1789. MethodName: "getServerInfo",
  1790. },
  1791. Impl: func(c context.Context, opts capnp.CallOptions, p, r capnp.Struct) error {
  1792. call := TunnelServer_getServerInfo{c, opts, TunnelServer_getServerInfo_Params{Struct: p}, TunnelServer_getServerInfo_Results{Struct: r}}
  1793. return s.GetServerInfo(call)
  1794. },
  1795. ResultsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 1},
  1796. })
  1797. methods = append(methods, server.Method{
  1798. Method: capnp.Method{
  1799. InterfaceID: 0xea58385c65416035,
  1800. MethodID: 2,
  1801. InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
  1802. MethodName: "unregisterTunnel",
  1803. },
  1804. Impl: func(c context.Context, opts capnp.CallOptions, p, r capnp.Struct) error {
  1805. call := TunnelServer_unregisterTunnel{c, opts, TunnelServer_unregisterTunnel_Params{Struct: p}, TunnelServer_unregisterTunnel_Results{Struct: r}}
  1806. return s.UnregisterTunnel(call)
  1807. },
  1808. ResultsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 0},
  1809. })
  1810. methods = append(methods, server.Method{
  1811. Method: capnp.Method{
  1812. InterfaceID: 0xea58385c65416035,
  1813. MethodID: 3,
  1814. InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
  1815. MethodName: "obsoleteDeclarativeTunnelConnect",
  1816. },
  1817. Impl: func(c context.Context, opts capnp.CallOptions, p, r capnp.Struct) error {
  1818. call := TunnelServer_obsoleteDeclarativeTunnelConnect{c, opts, TunnelServer_obsoleteDeclarativeTunnelConnect_Params{Struct: p}, TunnelServer_obsoleteDeclarativeTunnelConnect_Results{Struct: r}}
  1819. return s.ObsoleteDeclarativeTunnelConnect(call)
  1820. },
  1821. ResultsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 0},
  1822. })
  1823. methods = append(methods, server.Method{
  1824. Method: capnp.Method{
  1825. InterfaceID: 0xea58385c65416035,
  1826. MethodID: 4,
  1827. InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
  1828. MethodName: "authenticate",
  1829. },
  1830. Impl: func(c context.Context, opts capnp.CallOptions, p, r capnp.Struct) error {
  1831. call := TunnelServer_authenticate{c, opts, TunnelServer_authenticate_Params{Struct: p}, TunnelServer_authenticate_Results{Struct: r}}
  1832. return s.Authenticate(call)
  1833. },
  1834. ResultsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 1},
  1835. })
  1836. methods = append(methods, server.Method{
  1837. Method: capnp.Method{
  1838. InterfaceID: 0xea58385c65416035,
  1839. MethodID: 5,
  1840. InterfaceName: "tunnelrpc/tunnelrpc.capnp:TunnelServer",
  1841. MethodName: "reconnectTunnel",
  1842. },
  1843. Impl: func(c context.Context, opts capnp.CallOptions, p, r capnp.Struct) error {
  1844. call := TunnelServer_reconnectTunnel{c, opts, TunnelServer_reconnectTunnel_Params{Struct: p}, TunnelServer_reconnectTunnel_Results{Struct: r}}
  1845. return s.ReconnectTunnel(call)
  1846. },
  1847. ResultsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 1},
  1848. })
  1849. methods = append(methods, server.Method{
  1850. Method: capnp.Method{
  1851. InterfaceID: 0xf71695ec7fe85497,
  1852. MethodID: 0,
  1853. InterfaceName: "tunnelrpc/tunnelrpc.capnp:RegistrationServer",
  1854. MethodName: "registerConnection",
  1855. },
  1856. Impl: func(c context.Context, opts capnp.CallOptions, p, r capnp.Struct) error {
  1857. call := RegistrationServer_registerConnection{c, opts, RegistrationServer_registerConnection_Params{Struct: p}, RegistrationServer_registerConnection_Results{Struct: r}}
  1858. return s.RegisterConnection(call)
  1859. },
  1860. ResultsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 1},
  1861. })
  1862. methods = append(methods, server.Method{
  1863. Method: capnp.Method{
  1864. InterfaceID: 0xf71695ec7fe85497,
  1865. MethodID: 1,
  1866. InterfaceName: "tunnelrpc/tunnelrpc.capnp:RegistrationServer",
  1867. MethodName: "unregisterConnection",
  1868. },
  1869. Impl: func(c context.Context, opts capnp.CallOptions, p, r capnp.Struct) error {
  1870. call := RegistrationServer_unregisterConnection{c, opts, RegistrationServer_unregisterConnection_Params{Struct: p}, RegistrationServer_unregisterConnection_Results{Struct: r}}
  1871. return s.UnregisterConnection(call)
  1872. },
  1873. ResultsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 0},
  1874. })
  1875. return methods
  1876. }
  1877. // TunnelServer_registerTunnel holds the arguments for a server call to TunnelServer.registerTunnel.
  1878. type TunnelServer_registerTunnel struct {
  1879. Ctx context.Context
  1880. Options capnp.CallOptions
  1881. Params TunnelServer_registerTunnel_Params
  1882. Results TunnelServer_registerTunnel_Results
  1883. }
  1884. // TunnelServer_getServerInfo holds the arguments for a server call to TunnelServer.getServerInfo.
  1885. type TunnelServer_getServerInfo struct {
  1886. Ctx context.Context
  1887. Options capnp.CallOptions
  1888. Params TunnelServer_getServerInfo_Params
  1889. Results TunnelServer_getServerInfo_Results
  1890. }
  1891. // TunnelServer_unregisterTunnel holds the arguments for a server call to TunnelServer.unregisterTunnel.
  1892. type TunnelServer_unregisterTunnel struct {
  1893. Ctx context.Context
  1894. Options capnp.CallOptions
  1895. Params TunnelServer_unregisterTunnel_Params
  1896. Results TunnelServer_unregisterTunnel_Results
  1897. }
  1898. // TunnelServer_obsoleteDeclarativeTunnelConnect holds the arguments for a server call to TunnelServer.obsoleteDeclarativeTunnelConnect.
  1899. type TunnelServer_obsoleteDeclarativeTunnelConnect struct {
  1900. Ctx context.Context
  1901. Options capnp.CallOptions
  1902. Params TunnelServer_obsoleteDeclarativeTunnelConnect_Params
  1903. Results TunnelServer_obsoleteDeclarativeTunnelConnect_Results
  1904. }
  1905. // TunnelServer_authenticate holds the arguments for a server call to TunnelServer.authenticate.
  1906. type TunnelServer_authenticate struct {
  1907. Ctx context.Context
  1908. Options capnp.CallOptions
  1909. Params TunnelServer_authenticate_Params
  1910. Results TunnelServer_authenticate_Results
  1911. }
  1912. // TunnelServer_reconnectTunnel holds the arguments for a server call to TunnelServer.reconnectTunnel.
  1913. type TunnelServer_reconnectTunnel struct {
  1914. Ctx context.Context
  1915. Options capnp.CallOptions
  1916. Params TunnelServer_reconnectTunnel_Params
  1917. Results TunnelServer_reconnectTunnel_Results
  1918. }
  1919. type TunnelServer_registerTunnel_Params struct{ capnp.Struct }
  1920. // TunnelServer_registerTunnel_Params_TypeID is the unique identifier for the type TunnelServer_registerTunnel_Params.
  1921. const TunnelServer_registerTunnel_Params_TypeID = 0xb70431c0dc014915
  1922. func NewTunnelServer_registerTunnel_Params(s *capnp.Segment) (TunnelServer_registerTunnel_Params, error) {
  1923. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 3})
  1924. return TunnelServer_registerTunnel_Params{st}, err
  1925. }
  1926. func NewRootTunnelServer_registerTunnel_Params(s *capnp.Segment) (TunnelServer_registerTunnel_Params, error) {
  1927. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 3})
  1928. return TunnelServer_registerTunnel_Params{st}, err
  1929. }
  1930. func ReadRootTunnelServer_registerTunnel_Params(msg *capnp.Message) (TunnelServer_registerTunnel_Params, error) {
  1931. root, err := msg.RootPtr()
  1932. return TunnelServer_registerTunnel_Params{root.Struct()}, err
  1933. }
  1934. func (s TunnelServer_registerTunnel_Params) String() string {
  1935. str, _ := text.Marshal(0xb70431c0dc014915, s.Struct)
  1936. return str
  1937. }
  1938. func (s TunnelServer_registerTunnel_Params) OriginCert() ([]byte, error) {
  1939. p, err := s.Struct.Ptr(0)
  1940. return []byte(p.Data()), err
  1941. }
  1942. func (s TunnelServer_registerTunnel_Params) HasOriginCert() bool {
  1943. p, err := s.Struct.Ptr(0)
  1944. return p.IsValid() || err != nil
  1945. }
  1946. func (s TunnelServer_registerTunnel_Params) SetOriginCert(v []byte) error {
  1947. return s.Struct.SetData(0, v)
  1948. }
  1949. func (s TunnelServer_registerTunnel_Params) Hostname() (string, error) {
  1950. p, err := s.Struct.Ptr(1)
  1951. return p.Text(), err
  1952. }
  1953. func (s TunnelServer_registerTunnel_Params) HasHostname() bool {
  1954. p, err := s.Struct.Ptr(1)
  1955. return p.IsValid() || err != nil
  1956. }
  1957. func (s TunnelServer_registerTunnel_Params) HostnameBytes() ([]byte, error) {
  1958. p, err := s.Struct.Ptr(1)
  1959. return p.TextBytes(), err
  1960. }
  1961. func (s TunnelServer_registerTunnel_Params) SetHostname(v string) error {
  1962. return s.Struct.SetText(1, v)
  1963. }
  1964. func (s TunnelServer_registerTunnel_Params) Options() (RegistrationOptions, error) {
  1965. p, err := s.Struct.Ptr(2)
  1966. return RegistrationOptions{Struct: p.Struct()}, err
  1967. }
  1968. func (s TunnelServer_registerTunnel_Params) HasOptions() bool {
  1969. p, err := s.Struct.Ptr(2)
  1970. return p.IsValid() || err != nil
  1971. }
  1972. func (s TunnelServer_registerTunnel_Params) SetOptions(v RegistrationOptions) error {
  1973. return s.Struct.SetPtr(2, v.Struct.ToPtr())
  1974. }
  1975. // NewOptions sets the options field to a newly
  1976. // allocated RegistrationOptions struct, preferring placement in s's segment.
  1977. func (s TunnelServer_registerTunnel_Params) NewOptions() (RegistrationOptions, error) {
  1978. ss, err := NewRegistrationOptions(s.Struct.Segment())
  1979. if err != nil {
  1980. return RegistrationOptions{}, err
  1981. }
  1982. err = s.Struct.SetPtr(2, ss.Struct.ToPtr())
  1983. return ss, err
  1984. }
  1985. // TunnelServer_registerTunnel_Params_List is a list of TunnelServer_registerTunnel_Params.
  1986. type TunnelServer_registerTunnel_Params_List struct{ capnp.List }
  1987. // NewTunnelServer_registerTunnel_Params creates a new list of TunnelServer_registerTunnel_Params.
  1988. func NewTunnelServer_registerTunnel_Params_List(s *capnp.Segment, sz int32) (TunnelServer_registerTunnel_Params_List, error) {
  1989. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 3}, sz)
  1990. return TunnelServer_registerTunnel_Params_List{l}, err
  1991. }
  1992. func (s TunnelServer_registerTunnel_Params_List) At(i int) TunnelServer_registerTunnel_Params {
  1993. return TunnelServer_registerTunnel_Params{s.List.Struct(i)}
  1994. }
  1995. func (s TunnelServer_registerTunnel_Params_List) Set(i int, v TunnelServer_registerTunnel_Params) error {
  1996. return s.List.SetStruct(i, v.Struct)
  1997. }
  1998. func (s TunnelServer_registerTunnel_Params_List) String() string {
  1999. str, _ := text.MarshalList(0xb70431c0dc014915, s.List)
  2000. return str
  2001. }
  2002. // TunnelServer_registerTunnel_Params_Promise is a wrapper for a TunnelServer_registerTunnel_Params promised by a client call.
  2003. type TunnelServer_registerTunnel_Params_Promise struct{ *capnp.Pipeline }
  2004. func (p TunnelServer_registerTunnel_Params_Promise) Struct() (TunnelServer_registerTunnel_Params, error) {
  2005. s, err := p.Pipeline.Struct()
  2006. return TunnelServer_registerTunnel_Params{s}, err
  2007. }
  2008. func (p TunnelServer_registerTunnel_Params_Promise) Options() RegistrationOptions_Promise {
  2009. return RegistrationOptions_Promise{Pipeline: p.Pipeline.GetPipeline(2)}
  2010. }
  2011. type TunnelServer_registerTunnel_Results struct{ capnp.Struct }
  2012. // TunnelServer_registerTunnel_Results_TypeID is the unique identifier for the type TunnelServer_registerTunnel_Results.
  2013. const TunnelServer_registerTunnel_Results_TypeID = 0xf2c122394f447e8e
  2014. func NewTunnelServer_registerTunnel_Results(s *capnp.Segment) (TunnelServer_registerTunnel_Results, error) {
  2015. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
  2016. return TunnelServer_registerTunnel_Results{st}, err
  2017. }
  2018. func NewRootTunnelServer_registerTunnel_Results(s *capnp.Segment) (TunnelServer_registerTunnel_Results, error) {
  2019. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
  2020. return TunnelServer_registerTunnel_Results{st}, err
  2021. }
  2022. func ReadRootTunnelServer_registerTunnel_Results(msg *capnp.Message) (TunnelServer_registerTunnel_Results, error) {
  2023. root, err := msg.RootPtr()
  2024. return TunnelServer_registerTunnel_Results{root.Struct()}, err
  2025. }
  2026. func (s TunnelServer_registerTunnel_Results) String() string {
  2027. str, _ := text.Marshal(0xf2c122394f447e8e, s.Struct)
  2028. return str
  2029. }
  2030. func (s TunnelServer_registerTunnel_Results) Result() (TunnelRegistration, error) {
  2031. p, err := s.Struct.Ptr(0)
  2032. return TunnelRegistration{Struct: p.Struct()}, err
  2033. }
  2034. func (s TunnelServer_registerTunnel_Results) HasResult() bool {
  2035. p, err := s.Struct.Ptr(0)
  2036. return p.IsValid() || err != nil
  2037. }
  2038. func (s TunnelServer_registerTunnel_Results) SetResult(v TunnelRegistration) error {
  2039. return s.Struct.SetPtr(0, v.Struct.ToPtr())
  2040. }
  2041. // NewResult sets the result field to a newly
  2042. // allocated TunnelRegistration struct, preferring placement in s's segment.
  2043. func (s TunnelServer_registerTunnel_Results) NewResult() (TunnelRegistration, error) {
  2044. ss, err := NewTunnelRegistration(s.Struct.Segment())
  2045. if err != nil {
  2046. return TunnelRegistration{}, err
  2047. }
  2048. err = s.Struct.SetPtr(0, ss.Struct.ToPtr())
  2049. return ss, err
  2050. }
  2051. // TunnelServer_registerTunnel_Results_List is a list of TunnelServer_registerTunnel_Results.
  2052. type TunnelServer_registerTunnel_Results_List struct{ capnp.List }
  2053. // NewTunnelServer_registerTunnel_Results creates a new list of TunnelServer_registerTunnel_Results.
  2054. func NewTunnelServer_registerTunnel_Results_List(s *capnp.Segment, sz int32) (TunnelServer_registerTunnel_Results_List, error) {
  2055. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1}, sz)
  2056. return TunnelServer_registerTunnel_Results_List{l}, err
  2057. }
  2058. func (s TunnelServer_registerTunnel_Results_List) At(i int) TunnelServer_registerTunnel_Results {
  2059. return TunnelServer_registerTunnel_Results{s.List.Struct(i)}
  2060. }
  2061. func (s TunnelServer_registerTunnel_Results_List) Set(i int, v TunnelServer_registerTunnel_Results) error {
  2062. return s.List.SetStruct(i, v.Struct)
  2063. }
  2064. func (s TunnelServer_registerTunnel_Results_List) String() string {
  2065. str, _ := text.MarshalList(0xf2c122394f447e8e, s.List)
  2066. return str
  2067. }
  2068. // TunnelServer_registerTunnel_Results_Promise is a wrapper for a TunnelServer_registerTunnel_Results promised by a client call.
  2069. type TunnelServer_registerTunnel_Results_Promise struct{ *capnp.Pipeline }
  2070. func (p TunnelServer_registerTunnel_Results_Promise) Struct() (TunnelServer_registerTunnel_Results, error) {
  2071. s, err := p.Pipeline.Struct()
  2072. return TunnelServer_registerTunnel_Results{s}, err
  2073. }
  2074. func (p TunnelServer_registerTunnel_Results_Promise) Result() TunnelRegistration_Promise {
  2075. return TunnelRegistration_Promise{Pipeline: p.Pipeline.GetPipeline(0)}
  2076. }
  2077. type TunnelServer_getServerInfo_Params struct{ capnp.Struct }
  2078. // TunnelServer_getServerInfo_Params_TypeID is the unique identifier for the type TunnelServer_getServerInfo_Params.
  2079. const TunnelServer_getServerInfo_Params_TypeID = 0xdc3ed6801961e502
  2080. func NewTunnelServer_getServerInfo_Params(s *capnp.Segment) (TunnelServer_getServerInfo_Params, error) {
  2081. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
  2082. return TunnelServer_getServerInfo_Params{st}, err
  2083. }
  2084. func NewRootTunnelServer_getServerInfo_Params(s *capnp.Segment) (TunnelServer_getServerInfo_Params, error) {
  2085. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
  2086. return TunnelServer_getServerInfo_Params{st}, err
  2087. }
  2088. func ReadRootTunnelServer_getServerInfo_Params(msg *capnp.Message) (TunnelServer_getServerInfo_Params, error) {
  2089. root, err := msg.RootPtr()
  2090. return TunnelServer_getServerInfo_Params{root.Struct()}, err
  2091. }
  2092. func (s TunnelServer_getServerInfo_Params) String() string {
  2093. str, _ := text.Marshal(0xdc3ed6801961e502, s.Struct)
  2094. return str
  2095. }
  2096. // TunnelServer_getServerInfo_Params_List is a list of TunnelServer_getServerInfo_Params.
  2097. type TunnelServer_getServerInfo_Params_List struct{ capnp.List }
  2098. // NewTunnelServer_getServerInfo_Params creates a new list of TunnelServer_getServerInfo_Params.
  2099. func NewTunnelServer_getServerInfo_Params_List(s *capnp.Segment, sz int32) (TunnelServer_getServerInfo_Params_List, error) {
  2100. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0}, sz)
  2101. return TunnelServer_getServerInfo_Params_List{l}, err
  2102. }
  2103. func (s TunnelServer_getServerInfo_Params_List) At(i int) TunnelServer_getServerInfo_Params {
  2104. return TunnelServer_getServerInfo_Params{s.List.Struct(i)}
  2105. }
  2106. func (s TunnelServer_getServerInfo_Params_List) Set(i int, v TunnelServer_getServerInfo_Params) error {
  2107. return s.List.SetStruct(i, v.Struct)
  2108. }
  2109. func (s TunnelServer_getServerInfo_Params_List) String() string {
  2110. str, _ := text.MarshalList(0xdc3ed6801961e502, s.List)
  2111. return str
  2112. }
  2113. // TunnelServer_getServerInfo_Params_Promise is a wrapper for a TunnelServer_getServerInfo_Params promised by a client call.
  2114. type TunnelServer_getServerInfo_Params_Promise struct{ *capnp.Pipeline }
  2115. func (p TunnelServer_getServerInfo_Params_Promise) Struct() (TunnelServer_getServerInfo_Params, error) {
  2116. s, err := p.Pipeline.Struct()
  2117. return TunnelServer_getServerInfo_Params{s}, err
  2118. }
  2119. type TunnelServer_getServerInfo_Results struct{ capnp.Struct }
  2120. // TunnelServer_getServerInfo_Results_TypeID is the unique identifier for the type TunnelServer_getServerInfo_Results.
  2121. const TunnelServer_getServerInfo_Results_TypeID = 0xe3e37d096a5b564e
  2122. func NewTunnelServer_getServerInfo_Results(s *capnp.Segment) (TunnelServer_getServerInfo_Results, error) {
  2123. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
  2124. return TunnelServer_getServerInfo_Results{st}, err
  2125. }
  2126. func NewRootTunnelServer_getServerInfo_Results(s *capnp.Segment) (TunnelServer_getServerInfo_Results, error) {
  2127. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
  2128. return TunnelServer_getServerInfo_Results{st}, err
  2129. }
  2130. func ReadRootTunnelServer_getServerInfo_Results(msg *capnp.Message) (TunnelServer_getServerInfo_Results, error) {
  2131. root, err := msg.RootPtr()
  2132. return TunnelServer_getServerInfo_Results{root.Struct()}, err
  2133. }
  2134. func (s TunnelServer_getServerInfo_Results) String() string {
  2135. str, _ := text.Marshal(0xe3e37d096a5b564e, s.Struct)
  2136. return str
  2137. }
  2138. func (s TunnelServer_getServerInfo_Results) Result() (ServerInfo, error) {
  2139. p, err := s.Struct.Ptr(0)
  2140. return ServerInfo{Struct: p.Struct()}, err
  2141. }
  2142. func (s TunnelServer_getServerInfo_Results) HasResult() bool {
  2143. p, err := s.Struct.Ptr(0)
  2144. return p.IsValid() || err != nil
  2145. }
  2146. func (s TunnelServer_getServerInfo_Results) SetResult(v ServerInfo) error {
  2147. return s.Struct.SetPtr(0, v.Struct.ToPtr())
  2148. }
  2149. // NewResult sets the result field to a newly
  2150. // allocated ServerInfo struct, preferring placement in s's segment.
  2151. func (s TunnelServer_getServerInfo_Results) NewResult() (ServerInfo, error) {
  2152. ss, err := NewServerInfo(s.Struct.Segment())
  2153. if err != nil {
  2154. return ServerInfo{}, err
  2155. }
  2156. err = s.Struct.SetPtr(0, ss.Struct.ToPtr())
  2157. return ss, err
  2158. }
  2159. // TunnelServer_getServerInfo_Results_List is a list of TunnelServer_getServerInfo_Results.
  2160. type TunnelServer_getServerInfo_Results_List struct{ capnp.List }
  2161. // NewTunnelServer_getServerInfo_Results creates a new list of TunnelServer_getServerInfo_Results.
  2162. func NewTunnelServer_getServerInfo_Results_List(s *capnp.Segment, sz int32) (TunnelServer_getServerInfo_Results_List, error) {
  2163. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1}, sz)
  2164. return TunnelServer_getServerInfo_Results_List{l}, err
  2165. }
  2166. func (s TunnelServer_getServerInfo_Results_List) At(i int) TunnelServer_getServerInfo_Results {
  2167. return TunnelServer_getServerInfo_Results{s.List.Struct(i)}
  2168. }
  2169. func (s TunnelServer_getServerInfo_Results_List) Set(i int, v TunnelServer_getServerInfo_Results) error {
  2170. return s.List.SetStruct(i, v.Struct)
  2171. }
  2172. func (s TunnelServer_getServerInfo_Results_List) String() string {
  2173. str, _ := text.MarshalList(0xe3e37d096a5b564e, s.List)
  2174. return str
  2175. }
  2176. // TunnelServer_getServerInfo_Results_Promise is a wrapper for a TunnelServer_getServerInfo_Results promised by a client call.
  2177. type TunnelServer_getServerInfo_Results_Promise struct{ *capnp.Pipeline }
  2178. func (p TunnelServer_getServerInfo_Results_Promise) Struct() (TunnelServer_getServerInfo_Results, error) {
  2179. s, err := p.Pipeline.Struct()
  2180. return TunnelServer_getServerInfo_Results{s}, err
  2181. }
  2182. func (p TunnelServer_getServerInfo_Results_Promise) Result() ServerInfo_Promise {
  2183. return ServerInfo_Promise{Pipeline: p.Pipeline.GetPipeline(0)}
  2184. }
  2185. type TunnelServer_unregisterTunnel_Params struct{ capnp.Struct }
  2186. // TunnelServer_unregisterTunnel_Params_TypeID is the unique identifier for the type TunnelServer_unregisterTunnel_Params.
  2187. const TunnelServer_unregisterTunnel_Params_TypeID = 0x9b87b390babc2ccf
  2188. func NewTunnelServer_unregisterTunnel_Params(s *capnp.Segment) (TunnelServer_unregisterTunnel_Params, error) {
  2189. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 0})
  2190. return TunnelServer_unregisterTunnel_Params{st}, err
  2191. }
  2192. func NewRootTunnelServer_unregisterTunnel_Params(s *capnp.Segment) (TunnelServer_unregisterTunnel_Params, error) {
  2193. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 0})
  2194. return TunnelServer_unregisterTunnel_Params{st}, err
  2195. }
  2196. func ReadRootTunnelServer_unregisterTunnel_Params(msg *capnp.Message) (TunnelServer_unregisterTunnel_Params, error) {
  2197. root, err := msg.RootPtr()
  2198. return TunnelServer_unregisterTunnel_Params{root.Struct()}, err
  2199. }
  2200. func (s TunnelServer_unregisterTunnel_Params) String() string {
  2201. str, _ := text.Marshal(0x9b87b390babc2ccf, s.Struct)
  2202. return str
  2203. }
  2204. func (s TunnelServer_unregisterTunnel_Params) GracePeriodNanoSec() int64 {
  2205. return int64(s.Struct.Uint64(0))
  2206. }
  2207. func (s TunnelServer_unregisterTunnel_Params) SetGracePeriodNanoSec(v int64) {
  2208. s.Struct.SetUint64(0, uint64(v))
  2209. }
  2210. // TunnelServer_unregisterTunnel_Params_List is a list of TunnelServer_unregisterTunnel_Params.
  2211. type TunnelServer_unregisterTunnel_Params_List struct{ capnp.List }
  2212. // NewTunnelServer_unregisterTunnel_Params creates a new list of TunnelServer_unregisterTunnel_Params.
  2213. func NewTunnelServer_unregisterTunnel_Params_List(s *capnp.Segment, sz int32) (TunnelServer_unregisterTunnel_Params_List, error) {
  2214. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 0}, sz)
  2215. return TunnelServer_unregisterTunnel_Params_List{l}, err
  2216. }
  2217. func (s TunnelServer_unregisterTunnel_Params_List) At(i int) TunnelServer_unregisterTunnel_Params {
  2218. return TunnelServer_unregisterTunnel_Params{s.List.Struct(i)}
  2219. }
  2220. func (s TunnelServer_unregisterTunnel_Params_List) Set(i int, v TunnelServer_unregisterTunnel_Params) error {
  2221. return s.List.SetStruct(i, v.Struct)
  2222. }
  2223. func (s TunnelServer_unregisterTunnel_Params_List) String() string {
  2224. str, _ := text.MarshalList(0x9b87b390babc2ccf, s.List)
  2225. return str
  2226. }
  2227. // TunnelServer_unregisterTunnel_Params_Promise is a wrapper for a TunnelServer_unregisterTunnel_Params promised by a client call.
  2228. type TunnelServer_unregisterTunnel_Params_Promise struct{ *capnp.Pipeline }
  2229. func (p TunnelServer_unregisterTunnel_Params_Promise) Struct() (TunnelServer_unregisterTunnel_Params, error) {
  2230. s, err := p.Pipeline.Struct()
  2231. return TunnelServer_unregisterTunnel_Params{s}, err
  2232. }
  2233. type TunnelServer_unregisterTunnel_Results struct{ capnp.Struct }
  2234. // TunnelServer_unregisterTunnel_Results_TypeID is the unique identifier for the type TunnelServer_unregisterTunnel_Results.
  2235. const TunnelServer_unregisterTunnel_Results_TypeID = 0xa29a916d4ebdd894
  2236. func NewTunnelServer_unregisterTunnel_Results(s *capnp.Segment) (TunnelServer_unregisterTunnel_Results, error) {
  2237. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
  2238. return TunnelServer_unregisterTunnel_Results{st}, err
  2239. }
  2240. func NewRootTunnelServer_unregisterTunnel_Results(s *capnp.Segment) (TunnelServer_unregisterTunnel_Results, error) {
  2241. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
  2242. return TunnelServer_unregisterTunnel_Results{st}, err
  2243. }
  2244. func ReadRootTunnelServer_unregisterTunnel_Results(msg *capnp.Message) (TunnelServer_unregisterTunnel_Results, error) {
  2245. root, err := msg.RootPtr()
  2246. return TunnelServer_unregisterTunnel_Results{root.Struct()}, err
  2247. }
  2248. func (s TunnelServer_unregisterTunnel_Results) String() string {
  2249. str, _ := text.Marshal(0xa29a916d4ebdd894, s.Struct)
  2250. return str
  2251. }
  2252. // TunnelServer_unregisterTunnel_Results_List is a list of TunnelServer_unregisterTunnel_Results.
  2253. type TunnelServer_unregisterTunnel_Results_List struct{ capnp.List }
  2254. // NewTunnelServer_unregisterTunnel_Results creates a new list of TunnelServer_unregisterTunnel_Results.
  2255. func NewTunnelServer_unregisterTunnel_Results_List(s *capnp.Segment, sz int32) (TunnelServer_unregisterTunnel_Results_List, error) {
  2256. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0}, sz)
  2257. return TunnelServer_unregisterTunnel_Results_List{l}, err
  2258. }
  2259. func (s TunnelServer_unregisterTunnel_Results_List) At(i int) TunnelServer_unregisterTunnel_Results {
  2260. return TunnelServer_unregisterTunnel_Results{s.List.Struct(i)}
  2261. }
  2262. func (s TunnelServer_unregisterTunnel_Results_List) Set(i int, v TunnelServer_unregisterTunnel_Results) error {
  2263. return s.List.SetStruct(i, v.Struct)
  2264. }
  2265. func (s TunnelServer_unregisterTunnel_Results_List) String() string {
  2266. str, _ := text.MarshalList(0xa29a916d4ebdd894, s.List)
  2267. return str
  2268. }
  2269. // TunnelServer_unregisterTunnel_Results_Promise is a wrapper for a TunnelServer_unregisterTunnel_Results promised by a client call.
  2270. type TunnelServer_unregisterTunnel_Results_Promise struct{ *capnp.Pipeline }
  2271. func (p TunnelServer_unregisterTunnel_Results_Promise) Struct() (TunnelServer_unregisterTunnel_Results, error) {
  2272. s, err := p.Pipeline.Struct()
  2273. return TunnelServer_unregisterTunnel_Results{s}, err
  2274. }
  2275. type TunnelServer_obsoleteDeclarativeTunnelConnect_Params struct{ capnp.Struct }
  2276. // TunnelServer_obsoleteDeclarativeTunnelConnect_Params_TypeID is the unique identifier for the type TunnelServer_obsoleteDeclarativeTunnelConnect_Params.
  2277. const TunnelServer_obsoleteDeclarativeTunnelConnect_Params_TypeID = 0xa766b24d4fe5da35
  2278. func NewTunnelServer_obsoleteDeclarativeTunnelConnect_Params(s *capnp.Segment) (TunnelServer_obsoleteDeclarativeTunnelConnect_Params, error) {
  2279. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
  2280. return TunnelServer_obsoleteDeclarativeTunnelConnect_Params{st}, err
  2281. }
  2282. func NewRootTunnelServer_obsoleteDeclarativeTunnelConnect_Params(s *capnp.Segment) (TunnelServer_obsoleteDeclarativeTunnelConnect_Params, error) {
  2283. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
  2284. return TunnelServer_obsoleteDeclarativeTunnelConnect_Params{st}, err
  2285. }
  2286. func ReadRootTunnelServer_obsoleteDeclarativeTunnelConnect_Params(msg *capnp.Message) (TunnelServer_obsoleteDeclarativeTunnelConnect_Params, error) {
  2287. root, err := msg.RootPtr()
  2288. return TunnelServer_obsoleteDeclarativeTunnelConnect_Params{root.Struct()}, err
  2289. }
  2290. func (s TunnelServer_obsoleteDeclarativeTunnelConnect_Params) String() string {
  2291. str, _ := text.Marshal(0xa766b24d4fe5da35, s.Struct)
  2292. return str
  2293. }
  2294. // TunnelServer_obsoleteDeclarativeTunnelConnect_Params_List is a list of TunnelServer_obsoleteDeclarativeTunnelConnect_Params.
  2295. type TunnelServer_obsoleteDeclarativeTunnelConnect_Params_List struct{ capnp.List }
  2296. // NewTunnelServer_obsoleteDeclarativeTunnelConnect_Params creates a new list of TunnelServer_obsoleteDeclarativeTunnelConnect_Params.
  2297. func NewTunnelServer_obsoleteDeclarativeTunnelConnect_Params_List(s *capnp.Segment, sz int32) (TunnelServer_obsoleteDeclarativeTunnelConnect_Params_List, error) {
  2298. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0}, sz)
  2299. return TunnelServer_obsoleteDeclarativeTunnelConnect_Params_List{l}, err
  2300. }
  2301. func (s TunnelServer_obsoleteDeclarativeTunnelConnect_Params_List) At(i int) TunnelServer_obsoleteDeclarativeTunnelConnect_Params {
  2302. return TunnelServer_obsoleteDeclarativeTunnelConnect_Params{s.List.Struct(i)}
  2303. }
  2304. func (s TunnelServer_obsoleteDeclarativeTunnelConnect_Params_List) Set(i int, v TunnelServer_obsoleteDeclarativeTunnelConnect_Params) error {
  2305. return s.List.SetStruct(i, v.Struct)
  2306. }
  2307. func (s TunnelServer_obsoleteDeclarativeTunnelConnect_Params_List) String() string {
  2308. str, _ := text.MarshalList(0xa766b24d4fe5da35, s.List)
  2309. return str
  2310. }
  2311. // TunnelServer_obsoleteDeclarativeTunnelConnect_Params_Promise is a wrapper for a TunnelServer_obsoleteDeclarativeTunnelConnect_Params promised by a client call.
  2312. type TunnelServer_obsoleteDeclarativeTunnelConnect_Params_Promise struct{ *capnp.Pipeline }
  2313. func (p TunnelServer_obsoleteDeclarativeTunnelConnect_Params_Promise) Struct() (TunnelServer_obsoleteDeclarativeTunnelConnect_Params, error) {
  2314. s, err := p.Pipeline.Struct()
  2315. return TunnelServer_obsoleteDeclarativeTunnelConnect_Params{s}, err
  2316. }
  2317. type TunnelServer_obsoleteDeclarativeTunnelConnect_Results struct{ capnp.Struct }
  2318. // TunnelServer_obsoleteDeclarativeTunnelConnect_Results_TypeID is the unique identifier for the type TunnelServer_obsoleteDeclarativeTunnelConnect_Results.
  2319. const TunnelServer_obsoleteDeclarativeTunnelConnect_Results_TypeID = 0xfeac5c8f4899ef7c
  2320. func NewTunnelServer_obsoleteDeclarativeTunnelConnect_Results(s *capnp.Segment) (TunnelServer_obsoleteDeclarativeTunnelConnect_Results, error) {
  2321. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
  2322. return TunnelServer_obsoleteDeclarativeTunnelConnect_Results{st}, err
  2323. }
  2324. func NewRootTunnelServer_obsoleteDeclarativeTunnelConnect_Results(s *capnp.Segment) (TunnelServer_obsoleteDeclarativeTunnelConnect_Results, error) {
  2325. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
  2326. return TunnelServer_obsoleteDeclarativeTunnelConnect_Results{st}, err
  2327. }
  2328. func ReadRootTunnelServer_obsoleteDeclarativeTunnelConnect_Results(msg *capnp.Message) (TunnelServer_obsoleteDeclarativeTunnelConnect_Results, error) {
  2329. root, err := msg.RootPtr()
  2330. return TunnelServer_obsoleteDeclarativeTunnelConnect_Results{root.Struct()}, err
  2331. }
  2332. func (s TunnelServer_obsoleteDeclarativeTunnelConnect_Results) String() string {
  2333. str, _ := text.Marshal(0xfeac5c8f4899ef7c, s.Struct)
  2334. return str
  2335. }
  2336. // TunnelServer_obsoleteDeclarativeTunnelConnect_Results_List is a list of TunnelServer_obsoleteDeclarativeTunnelConnect_Results.
  2337. type TunnelServer_obsoleteDeclarativeTunnelConnect_Results_List struct{ capnp.List }
  2338. // NewTunnelServer_obsoleteDeclarativeTunnelConnect_Results creates a new list of TunnelServer_obsoleteDeclarativeTunnelConnect_Results.
  2339. func NewTunnelServer_obsoleteDeclarativeTunnelConnect_Results_List(s *capnp.Segment, sz int32) (TunnelServer_obsoleteDeclarativeTunnelConnect_Results_List, error) {
  2340. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0}, sz)
  2341. return TunnelServer_obsoleteDeclarativeTunnelConnect_Results_List{l}, err
  2342. }
  2343. func (s TunnelServer_obsoleteDeclarativeTunnelConnect_Results_List) At(i int) TunnelServer_obsoleteDeclarativeTunnelConnect_Results {
  2344. return TunnelServer_obsoleteDeclarativeTunnelConnect_Results{s.List.Struct(i)}
  2345. }
  2346. func (s TunnelServer_obsoleteDeclarativeTunnelConnect_Results_List) Set(i int, v TunnelServer_obsoleteDeclarativeTunnelConnect_Results) error {
  2347. return s.List.SetStruct(i, v.Struct)
  2348. }
  2349. func (s TunnelServer_obsoleteDeclarativeTunnelConnect_Results_List) String() string {
  2350. str, _ := text.MarshalList(0xfeac5c8f4899ef7c, s.List)
  2351. return str
  2352. }
  2353. // TunnelServer_obsoleteDeclarativeTunnelConnect_Results_Promise is a wrapper for a TunnelServer_obsoleteDeclarativeTunnelConnect_Results promised by a client call.
  2354. type TunnelServer_obsoleteDeclarativeTunnelConnect_Results_Promise struct{ *capnp.Pipeline }
  2355. func (p TunnelServer_obsoleteDeclarativeTunnelConnect_Results_Promise) Struct() (TunnelServer_obsoleteDeclarativeTunnelConnect_Results, error) {
  2356. s, err := p.Pipeline.Struct()
  2357. return TunnelServer_obsoleteDeclarativeTunnelConnect_Results{s}, err
  2358. }
  2359. type TunnelServer_authenticate_Params struct{ capnp.Struct }
  2360. // TunnelServer_authenticate_Params_TypeID is the unique identifier for the type TunnelServer_authenticate_Params.
  2361. const TunnelServer_authenticate_Params_TypeID = 0x85c8cea1ab1894f3
  2362. func NewTunnelServer_authenticate_Params(s *capnp.Segment) (TunnelServer_authenticate_Params, error) {
  2363. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 3})
  2364. return TunnelServer_authenticate_Params{st}, err
  2365. }
  2366. func NewRootTunnelServer_authenticate_Params(s *capnp.Segment) (TunnelServer_authenticate_Params, error) {
  2367. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 3})
  2368. return TunnelServer_authenticate_Params{st}, err
  2369. }
  2370. func ReadRootTunnelServer_authenticate_Params(msg *capnp.Message) (TunnelServer_authenticate_Params, error) {
  2371. root, err := msg.RootPtr()
  2372. return TunnelServer_authenticate_Params{root.Struct()}, err
  2373. }
  2374. func (s TunnelServer_authenticate_Params) String() string {
  2375. str, _ := text.Marshal(0x85c8cea1ab1894f3, s.Struct)
  2376. return str
  2377. }
  2378. func (s TunnelServer_authenticate_Params) OriginCert() ([]byte, error) {
  2379. p, err := s.Struct.Ptr(0)
  2380. return []byte(p.Data()), err
  2381. }
  2382. func (s TunnelServer_authenticate_Params) HasOriginCert() bool {
  2383. p, err := s.Struct.Ptr(0)
  2384. return p.IsValid() || err != nil
  2385. }
  2386. func (s TunnelServer_authenticate_Params) SetOriginCert(v []byte) error {
  2387. return s.Struct.SetData(0, v)
  2388. }
  2389. func (s TunnelServer_authenticate_Params) Hostname() (string, error) {
  2390. p, err := s.Struct.Ptr(1)
  2391. return p.Text(), err
  2392. }
  2393. func (s TunnelServer_authenticate_Params) HasHostname() bool {
  2394. p, err := s.Struct.Ptr(1)
  2395. return p.IsValid() || err != nil
  2396. }
  2397. func (s TunnelServer_authenticate_Params) HostnameBytes() ([]byte, error) {
  2398. p, err := s.Struct.Ptr(1)
  2399. return p.TextBytes(), err
  2400. }
  2401. func (s TunnelServer_authenticate_Params) SetHostname(v string) error {
  2402. return s.Struct.SetText(1, v)
  2403. }
  2404. func (s TunnelServer_authenticate_Params) Options() (RegistrationOptions, error) {
  2405. p, err := s.Struct.Ptr(2)
  2406. return RegistrationOptions{Struct: p.Struct()}, err
  2407. }
  2408. func (s TunnelServer_authenticate_Params) HasOptions() bool {
  2409. p, err := s.Struct.Ptr(2)
  2410. return p.IsValid() || err != nil
  2411. }
  2412. func (s TunnelServer_authenticate_Params) SetOptions(v RegistrationOptions) error {
  2413. return s.Struct.SetPtr(2, v.Struct.ToPtr())
  2414. }
  2415. // NewOptions sets the options field to a newly
  2416. // allocated RegistrationOptions struct, preferring placement in s's segment.
  2417. func (s TunnelServer_authenticate_Params) NewOptions() (RegistrationOptions, error) {
  2418. ss, err := NewRegistrationOptions(s.Struct.Segment())
  2419. if err != nil {
  2420. return RegistrationOptions{}, err
  2421. }
  2422. err = s.Struct.SetPtr(2, ss.Struct.ToPtr())
  2423. return ss, err
  2424. }
  2425. // TunnelServer_authenticate_Params_List is a list of TunnelServer_authenticate_Params.
  2426. type TunnelServer_authenticate_Params_List struct{ capnp.List }
  2427. // NewTunnelServer_authenticate_Params creates a new list of TunnelServer_authenticate_Params.
  2428. func NewTunnelServer_authenticate_Params_List(s *capnp.Segment, sz int32) (TunnelServer_authenticate_Params_List, error) {
  2429. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 3}, sz)
  2430. return TunnelServer_authenticate_Params_List{l}, err
  2431. }
  2432. func (s TunnelServer_authenticate_Params_List) At(i int) TunnelServer_authenticate_Params {
  2433. return TunnelServer_authenticate_Params{s.List.Struct(i)}
  2434. }
  2435. func (s TunnelServer_authenticate_Params_List) Set(i int, v TunnelServer_authenticate_Params) error {
  2436. return s.List.SetStruct(i, v.Struct)
  2437. }
  2438. func (s TunnelServer_authenticate_Params_List) String() string {
  2439. str, _ := text.MarshalList(0x85c8cea1ab1894f3, s.List)
  2440. return str
  2441. }
  2442. // TunnelServer_authenticate_Params_Promise is a wrapper for a TunnelServer_authenticate_Params promised by a client call.
  2443. type TunnelServer_authenticate_Params_Promise struct{ *capnp.Pipeline }
  2444. func (p TunnelServer_authenticate_Params_Promise) Struct() (TunnelServer_authenticate_Params, error) {
  2445. s, err := p.Pipeline.Struct()
  2446. return TunnelServer_authenticate_Params{s}, err
  2447. }
  2448. func (p TunnelServer_authenticate_Params_Promise) Options() RegistrationOptions_Promise {
  2449. return RegistrationOptions_Promise{Pipeline: p.Pipeline.GetPipeline(2)}
  2450. }
  2451. type TunnelServer_authenticate_Results struct{ capnp.Struct }
  2452. // TunnelServer_authenticate_Results_TypeID is the unique identifier for the type TunnelServer_authenticate_Results.
  2453. const TunnelServer_authenticate_Results_TypeID = 0xfc5edf80e39c0796
  2454. func NewTunnelServer_authenticate_Results(s *capnp.Segment) (TunnelServer_authenticate_Results, error) {
  2455. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
  2456. return TunnelServer_authenticate_Results{st}, err
  2457. }
  2458. func NewRootTunnelServer_authenticate_Results(s *capnp.Segment) (TunnelServer_authenticate_Results, error) {
  2459. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
  2460. return TunnelServer_authenticate_Results{st}, err
  2461. }
  2462. func ReadRootTunnelServer_authenticate_Results(msg *capnp.Message) (TunnelServer_authenticate_Results, error) {
  2463. root, err := msg.RootPtr()
  2464. return TunnelServer_authenticate_Results{root.Struct()}, err
  2465. }
  2466. func (s TunnelServer_authenticate_Results) String() string {
  2467. str, _ := text.Marshal(0xfc5edf80e39c0796, s.Struct)
  2468. return str
  2469. }
  2470. func (s TunnelServer_authenticate_Results) Result() (AuthenticateResponse, error) {
  2471. p, err := s.Struct.Ptr(0)
  2472. return AuthenticateResponse{Struct: p.Struct()}, err
  2473. }
  2474. func (s TunnelServer_authenticate_Results) HasResult() bool {
  2475. p, err := s.Struct.Ptr(0)
  2476. return p.IsValid() || err != nil
  2477. }
  2478. func (s TunnelServer_authenticate_Results) SetResult(v AuthenticateResponse) error {
  2479. return s.Struct.SetPtr(0, v.Struct.ToPtr())
  2480. }
  2481. // NewResult sets the result field to a newly
  2482. // allocated AuthenticateResponse struct, preferring placement in s's segment.
  2483. func (s TunnelServer_authenticate_Results) NewResult() (AuthenticateResponse, error) {
  2484. ss, err := NewAuthenticateResponse(s.Struct.Segment())
  2485. if err != nil {
  2486. return AuthenticateResponse{}, err
  2487. }
  2488. err = s.Struct.SetPtr(0, ss.Struct.ToPtr())
  2489. return ss, err
  2490. }
  2491. // TunnelServer_authenticate_Results_List is a list of TunnelServer_authenticate_Results.
  2492. type TunnelServer_authenticate_Results_List struct{ capnp.List }
  2493. // NewTunnelServer_authenticate_Results creates a new list of TunnelServer_authenticate_Results.
  2494. func NewTunnelServer_authenticate_Results_List(s *capnp.Segment, sz int32) (TunnelServer_authenticate_Results_List, error) {
  2495. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1}, sz)
  2496. return TunnelServer_authenticate_Results_List{l}, err
  2497. }
  2498. func (s TunnelServer_authenticate_Results_List) At(i int) TunnelServer_authenticate_Results {
  2499. return TunnelServer_authenticate_Results{s.List.Struct(i)}
  2500. }
  2501. func (s TunnelServer_authenticate_Results_List) Set(i int, v TunnelServer_authenticate_Results) error {
  2502. return s.List.SetStruct(i, v.Struct)
  2503. }
  2504. func (s TunnelServer_authenticate_Results_List) String() string {
  2505. str, _ := text.MarshalList(0xfc5edf80e39c0796, s.List)
  2506. return str
  2507. }
  2508. // TunnelServer_authenticate_Results_Promise is a wrapper for a TunnelServer_authenticate_Results promised by a client call.
  2509. type TunnelServer_authenticate_Results_Promise struct{ *capnp.Pipeline }
  2510. func (p TunnelServer_authenticate_Results_Promise) Struct() (TunnelServer_authenticate_Results, error) {
  2511. s, err := p.Pipeline.Struct()
  2512. return TunnelServer_authenticate_Results{s}, err
  2513. }
  2514. func (p TunnelServer_authenticate_Results_Promise) Result() AuthenticateResponse_Promise {
  2515. return AuthenticateResponse_Promise{Pipeline: p.Pipeline.GetPipeline(0)}
  2516. }
  2517. type TunnelServer_reconnectTunnel_Params struct{ capnp.Struct }
  2518. // TunnelServer_reconnectTunnel_Params_TypeID is the unique identifier for the type TunnelServer_reconnectTunnel_Params.
  2519. const TunnelServer_reconnectTunnel_Params_TypeID = 0xa353a3556df74984
  2520. func NewTunnelServer_reconnectTunnel_Params(s *capnp.Segment) (TunnelServer_reconnectTunnel_Params, error) {
  2521. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 5})
  2522. return TunnelServer_reconnectTunnel_Params{st}, err
  2523. }
  2524. func NewRootTunnelServer_reconnectTunnel_Params(s *capnp.Segment) (TunnelServer_reconnectTunnel_Params, error) {
  2525. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 5})
  2526. return TunnelServer_reconnectTunnel_Params{st}, err
  2527. }
  2528. func ReadRootTunnelServer_reconnectTunnel_Params(msg *capnp.Message) (TunnelServer_reconnectTunnel_Params, error) {
  2529. root, err := msg.RootPtr()
  2530. return TunnelServer_reconnectTunnel_Params{root.Struct()}, err
  2531. }
  2532. func (s TunnelServer_reconnectTunnel_Params) String() string {
  2533. str, _ := text.Marshal(0xa353a3556df74984, s.Struct)
  2534. return str
  2535. }
  2536. func (s TunnelServer_reconnectTunnel_Params) Jwt() ([]byte, error) {
  2537. p, err := s.Struct.Ptr(0)
  2538. return []byte(p.Data()), err
  2539. }
  2540. func (s TunnelServer_reconnectTunnel_Params) HasJwt() bool {
  2541. p, err := s.Struct.Ptr(0)
  2542. return p.IsValid() || err != nil
  2543. }
  2544. func (s TunnelServer_reconnectTunnel_Params) SetJwt(v []byte) error {
  2545. return s.Struct.SetData(0, v)
  2546. }
  2547. func (s TunnelServer_reconnectTunnel_Params) EventDigest() ([]byte, error) {
  2548. p, err := s.Struct.Ptr(1)
  2549. return []byte(p.Data()), err
  2550. }
  2551. func (s TunnelServer_reconnectTunnel_Params) HasEventDigest() bool {
  2552. p, err := s.Struct.Ptr(1)
  2553. return p.IsValid() || err != nil
  2554. }
  2555. func (s TunnelServer_reconnectTunnel_Params) SetEventDigest(v []byte) error {
  2556. return s.Struct.SetData(1, v)
  2557. }
  2558. func (s TunnelServer_reconnectTunnel_Params) ConnDigest() ([]byte, error) {
  2559. p, err := s.Struct.Ptr(2)
  2560. return []byte(p.Data()), err
  2561. }
  2562. func (s TunnelServer_reconnectTunnel_Params) HasConnDigest() bool {
  2563. p, err := s.Struct.Ptr(2)
  2564. return p.IsValid() || err != nil
  2565. }
  2566. func (s TunnelServer_reconnectTunnel_Params) SetConnDigest(v []byte) error {
  2567. return s.Struct.SetData(2, v)
  2568. }
  2569. func (s TunnelServer_reconnectTunnel_Params) Hostname() (string, error) {
  2570. p, err := s.Struct.Ptr(3)
  2571. return p.Text(), err
  2572. }
  2573. func (s TunnelServer_reconnectTunnel_Params) HasHostname() bool {
  2574. p, err := s.Struct.Ptr(3)
  2575. return p.IsValid() || err != nil
  2576. }
  2577. func (s TunnelServer_reconnectTunnel_Params) HostnameBytes() ([]byte, error) {
  2578. p, err := s.Struct.Ptr(3)
  2579. return p.TextBytes(), err
  2580. }
  2581. func (s TunnelServer_reconnectTunnel_Params) SetHostname(v string) error {
  2582. return s.Struct.SetText(3, v)
  2583. }
  2584. func (s TunnelServer_reconnectTunnel_Params) Options() (RegistrationOptions, error) {
  2585. p, err := s.Struct.Ptr(4)
  2586. return RegistrationOptions{Struct: p.Struct()}, err
  2587. }
  2588. func (s TunnelServer_reconnectTunnel_Params) HasOptions() bool {
  2589. p, err := s.Struct.Ptr(4)
  2590. return p.IsValid() || err != nil
  2591. }
  2592. func (s TunnelServer_reconnectTunnel_Params) SetOptions(v RegistrationOptions) error {
  2593. return s.Struct.SetPtr(4, v.Struct.ToPtr())
  2594. }
  2595. // NewOptions sets the options field to a newly
  2596. // allocated RegistrationOptions struct, preferring placement in s's segment.
  2597. func (s TunnelServer_reconnectTunnel_Params) NewOptions() (RegistrationOptions, error) {
  2598. ss, err := NewRegistrationOptions(s.Struct.Segment())
  2599. if err != nil {
  2600. return RegistrationOptions{}, err
  2601. }
  2602. err = s.Struct.SetPtr(4, ss.Struct.ToPtr())
  2603. return ss, err
  2604. }
  2605. // TunnelServer_reconnectTunnel_Params_List is a list of TunnelServer_reconnectTunnel_Params.
  2606. type TunnelServer_reconnectTunnel_Params_List struct{ capnp.List }
  2607. // NewTunnelServer_reconnectTunnel_Params creates a new list of TunnelServer_reconnectTunnel_Params.
  2608. func NewTunnelServer_reconnectTunnel_Params_List(s *capnp.Segment, sz int32) (TunnelServer_reconnectTunnel_Params_List, error) {
  2609. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 5}, sz)
  2610. return TunnelServer_reconnectTunnel_Params_List{l}, err
  2611. }
  2612. func (s TunnelServer_reconnectTunnel_Params_List) At(i int) TunnelServer_reconnectTunnel_Params {
  2613. return TunnelServer_reconnectTunnel_Params{s.List.Struct(i)}
  2614. }
  2615. func (s TunnelServer_reconnectTunnel_Params_List) Set(i int, v TunnelServer_reconnectTunnel_Params) error {
  2616. return s.List.SetStruct(i, v.Struct)
  2617. }
  2618. func (s TunnelServer_reconnectTunnel_Params_List) String() string {
  2619. str, _ := text.MarshalList(0xa353a3556df74984, s.List)
  2620. return str
  2621. }
  2622. // TunnelServer_reconnectTunnel_Params_Promise is a wrapper for a TunnelServer_reconnectTunnel_Params promised by a client call.
  2623. type TunnelServer_reconnectTunnel_Params_Promise struct{ *capnp.Pipeline }
  2624. func (p TunnelServer_reconnectTunnel_Params_Promise) Struct() (TunnelServer_reconnectTunnel_Params, error) {
  2625. s, err := p.Pipeline.Struct()
  2626. return TunnelServer_reconnectTunnel_Params{s}, err
  2627. }
  2628. func (p TunnelServer_reconnectTunnel_Params_Promise) Options() RegistrationOptions_Promise {
  2629. return RegistrationOptions_Promise{Pipeline: p.Pipeline.GetPipeline(4)}
  2630. }
  2631. type TunnelServer_reconnectTunnel_Results struct{ capnp.Struct }
  2632. // TunnelServer_reconnectTunnel_Results_TypeID is the unique identifier for the type TunnelServer_reconnectTunnel_Results.
  2633. const TunnelServer_reconnectTunnel_Results_TypeID = 0xd4d18de97bb12de3
  2634. func NewTunnelServer_reconnectTunnel_Results(s *capnp.Segment) (TunnelServer_reconnectTunnel_Results, error) {
  2635. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
  2636. return TunnelServer_reconnectTunnel_Results{st}, err
  2637. }
  2638. func NewRootTunnelServer_reconnectTunnel_Results(s *capnp.Segment) (TunnelServer_reconnectTunnel_Results, error) {
  2639. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1})
  2640. return TunnelServer_reconnectTunnel_Results{st}, err
  2641. }
  2642. func ReadRootTunnelServer_reconnectTunnel_Results(msg *capnp.Message) (TunnelServer_reconnectTunnel_Results, error) {
  2643. root, err := msg.RootPtr()
  2644. return TunnelServer_reconnectTunnel_Results{root.Struct()}, err
  2645. }
  2646. func (s TunnelServer_reconnectTunnel_Results) String() string {
  2647. str, _ := text.Marshal(0xd4d18de97bb12de3, s.Struct)
  2648. return str
  2649. }
  2650. func (s TunnelServer_reconnectTunnel_Results) Result() (TunnelRegistration, error) {
  2651. p, err := s.Struct.Ptr(0)
  2652. return TunnelRegistration{Struct: p.Struct()}, err
  2653. }
  2654. func (s TunnelServer_reconnectTunnel_Results) HasResult() bool {
  2655. p, err := s.Struct.Ptr(0)
  2656. return p.IsValid() || err != nil
  2657. }
  2658. func (s TunnelServer_reconnectTunnel_Results) SetResult(v TunnelRegistration) error {
  2659. return s.Struct.SetPtr(0, v.Struct.ToPtr())
  2660. }
  2661. // NewResult sets the result field to a newly
  2662. // allocated TunnelRegistration struct, preferring placement in s's segment.
  2663. func (s TunnelServer_reconnectTunnel_Results) NewResult() (TunnelRegistration, error) {
  2664. ss, err := NewTunnelRegistration(s.Struct.Segment())
  2665. if err != nil {
  2666. return TunnelRegistration{}, err
  2667. }
  2668. err = s.Struct.SetPtr(0, ss.Struct.ToPtr())
  2669. return ss, err
  2670. }
  2671. // TunnelServer_reconnectTunnel_Results_List is a list of TunnelServer_reconnectTunnel_Results.
  2672. type TunnelServer_reconnectTunnel_Results_List struct{ capnp.List }
  2673. // NewTunnelServer_reconnectTunnel_Results creates a new list of TunnelServer_reconnectTunnel_Results.
  2674. func NewTunnelServer_reconnectTunnel_Results_List(s *capnp.Segment, sz int32) (TunnelServer_reconnectTunnel_Results_List, error) {
  2675. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 1}, sz)
  2676. return TunnelServer_reconnectTunnel_Results_List{l}, err
  2677. }
  2678. func (s TunnelServer_reconnectTunnel_Results_List) At(i int) TunnelServer_reconnectTunnel_Results {
  2679. return TunnelServer_reconnectTunnel_Results{s.List.Struct(i)}
  2680. }
  2681. func (s TunnelServer_reconnectTunnel_Results_List) Set(i int, v TunnelServer_reconnectTunnel_Results) error {
  2682. return s.List.SetStruct(i, v.Struct)
  2683. }
  2684. func (s TunnelServer_reconnectTunnel_Results_List) String() string {
  2685. str, _ := text.MarshalList(0xd4d18de97bb12de3, s.List)
  2686. return str
  2687. }
  2688. // TunnelServer_reconnectTunnel_Results_Promise is a wrapper for a TunnelServer_reconnectTunnel_Results promised by a client call.
  2689. type TunnelServer_reconnectTunnel_Results_Promise struct{ *capnp.Pipeline }
  2690. func (p TunnelServer_reconnectTunnel_Results_Promise) Struct() (TunnelServer_reconnectTunnel_Results, error) {
  2691. s, err := p.Pipeline.Struct()
  2692. return TunnelServer_reconnectTunnel_Results{s}, err
  2693. }
  2694. func (p TunnelServer_reconnectTunnel_Results_Promise) Result() TunnelRegistration_Promise {
  2695. return TunnelRegistration_Promise{Pipeline: p.Pipeline.GetPipeline(0)}
  2696. }
  2697. const schema_db8274f9144abc7e = "x\xda\xccY{l\x1c\xd5\xd5?g\xee\xaeg\xed\xd8" +
  2698. "\xac\x87\xd9\xc4\x89\x05\x9f\xbf/\x0a\xe2\xc3`\xc0q\xa9" +
  2699. "\xd2\x94\xd6v\xb0Sl\xf2\xf0x\x93\x96G\x82\x18\xef" +
  2700. "\xde\xd8\xe3\xee\xce,3\xb3\xc6N\x13\x92\x98\xa4\x10\xc4" +
  2701. "+!\xe1\x91\x926\x04\xd1\xaa\x14ZR@m*\xaa" +
  2702. "B_\x80x\xa3P%\x10\xd4\x96\x90>\xa2PJ\xa0" +
  2703. "BT\x94\xa9\xce\xcc\xce\xc3kc;\xd0?\xfa\xdf\xea" +
  2704. "\xcc\xb9\xf7\x9es~\xe7\x9e\xf3\xbbg\xcf\xff\x9a\xd8&" +
  2705. "4\xc7\xc5\x19\x00\xca\xc6x\x85\xc3\x1b_Y\xbb\xe7\x8c" +
  2706. "_\x8d\x82R\x8f\xe8\\\xfbxw\xeaC{\xf4u\x88" +
  2707. "3\x11\xa0E\x8b\xafEy}\\\x04\x90G\xe2\x7f\x06" +
  2708. "t.\x91\xce\xbb\"\xf5\xd2\x0b\xd7\x81T\x1fU\x8e\x91" +
  2709. "\xf2\xea\x8aF\x94\xf3\x15\xa4\xacU\x90\xf2\x85\xf9\x17\xf7" +
  2710. "~~\xe7\xb3\x9bA\xaa\x17Be\xc0\x96\x95\xe2Z\x94" +
  2711. "5\x914\xb9\xb8\x1c\xd0yo\xc7\xec\x1f\xdc\xfb\xc2\xd3" +
  2712. "[@:\x13\xa1t\xf6z\xf15\x04\x94\xb7\x89?\x02" +
  2713. "tZ\x17?\xbf\xbf\xbe\xe5\x8e\x1de\xe7\x0a\xa4\xd8\x9c" +
  2714. "hD\xb9=A\xbb})q\x0d\xa03w\xe8\x8c\xab" +
  2715. "~\xf9\x9bG\xee\x04\xa5\x09\xd19\xdcw\xf6\xabl\xf7" +
  2716. "\x03\xaf\xc3J\x14Q\x00h\xb97\xb1\x976\xde\xe7\xea" +
  2717. "\xbex\xce\xe3?\xbb\xed\x91\xeb\xbf\x05\xca\x99\x88\x00\xae" +
  2718. "#3+\xffI\x0agU\xb6\x02:;\x0e\xfe|Y" +
  2719. "~\xdb\xae\xbd\x9ei\xeew\xa5R\x10 \xe6l\xee\xfa" +
  2720. " \xbf\xf2\xbe\xf4}%\xa3)J-\x9d\x95'\x10\xb0" +
  2721. "\xe5\xb2\xca\x06\x04t.x\xed\xe8\xf2\xa5?^\xf3\xbd" +
  2722. "\xc8\xdab\xd5ZZ\xfb\xd0\xff\\R9|t\xf1\xc3" +
  2723. " 5\xf9_\xae\xae\xea\xa5/\xb1\xd5\xecc\xf5\xae_" +
  2724. "<Z\x8e\x87\xebj\xbe\xaa\x0f\xe5MUnx\xaa\xdc" +
  2725. "#n|r\xd7\xd9\x89\xef\xbc\xf7\xd8D\x81\xb9\x7fF" +
  2726. "\x1f\xca\xfbgP`\x1e\x9bA\xce\xce\xec\xc2\xc3O4" +
  2727. "\xc7~\x12\x0d\xf3\xcc\xeac\xae\xb3\xd5\x14\xe6\xd3\xdf^" +
  2728. "T\xa3\xbf3\xfaD\xd9n\xae\xe23\xd5\xdd(\xbfQ" +
  2729. "M\xbb\x1dr\x95\xbb\xaf\xb8}{\xfc\xe8\xedO\x91\xa5" +
  2730. "\x11|\xe3\x09\xd7\xcf\x1a\x13\xe5\xad5\xf4sKM\x1d" +
  2731. "\x03t\xea\x1f\xfe\xe2\x0f\x17e\x0f=;\x81\xa5r\\" +
  2732. ":!K\x12\xfd\xaa\x91\xc8\xd0#M\xfb\xbe\xf1\xd7\x9b" +
  2733. "_>P2\x14\xdd\\\x94\\T\xd6K\x84J\x00j" +
  2734. "Y\x94\\\xcd\xdd\xd2 \xca\xfb\xdc\xed\x1er\xb5\x85\xa3" +
  2735. "\xea\x9c\x8d\xbf\xfb\xf2\xe1\x08\x0e\xfb\xa47\x11b\xce\xb2" +
  2736. "\xaf^1X\xb9\xfe\xc8\x91\xe8A\xf7KnD\xf6\xbb" +
  2737. "K\xff\xf6\xddc\xb7\x1e\xcfg\xff\xe4\xe6\x92\x1f\xb3C" +
  2738. "\xd2B\x01P~W\xa2,\xafk\xa8\xe9\x9c{\xb0\xe7" +
  2739. "\x98\x07\xa5\xb7\xc5\xf3\xa7.\"\x85\xa3\xa7\xd2\x16\x17\\" +
  2740. "\xd5\xceW-\xb8\xf4\x18H\xf5l\xcc5\x88\xcb\x0bQ" +
  2741. "\x9e)\xd3\x02I\xbe\x1e\xe5\xb3Ru\x00\xce-\xd7v" +
  2742. ",\xff\xc2\xdc'ODM\x9a\x93\xa2\xb4\x92\x9bR\xb4" +
  2743. "\xdf\x9a\x05\xc7\xbfr\xc6-\xbf=Q\x16HWqi" +
  2744. "\xaa\x11\xe5\xd5)r\xfd2R~g\xf1\xb7\x0f\xd4'" +
  2745. "\xeb\xdf/\x0bS\x85\x9bA\xa9A\x94\xb7\x91n\xcb\xcd" +
  2746. "\xa9\xa7(\x99\xbe\xf9\xfa\x95\xc3\xaf\\\xf7\xde?\xca\x11" +
  2747. "u\xb7\xde4\xab\x17\xe5\x9d\xb3h\xebm\xb3\x08\xff;" +
  2748. "W\xfce\xc3\xf1\x9d\xb3>\x18\xe7Ws\xdd \xca\x9d" +
  2749. "u\xa4\xd9^w\xbd|/\xfdr^\x12\xefk\xee\xd8" +
  2750. "\xf0\xec\x87\x91\x8c\xdfZ\xd7M\x19\x7f\x87x\xcf\x91\x8d" +
  2751. "\xbf\xbf\xf2\xa3\xa8\xc3[\xea\xde$\x87\xef\xae#\x87\xd7" +
  2752. "\xbds\xf7\xc5\xb7\xaez\xf0\xe3\x08|\xfb\xebFi\xa9" +
  2753. "]\xd4u\x9e3\x0b\xb1\xccy\xfe\xcf\xcc\xb9\x19\xb5\xa0" +
  2754. "\x17\x16\xb6\x17\xed\x01\xae\xdbZF\xb5y/o\xb5\x0a" +
  2755. "\x86n\xf1\x1eD\xa5\x96\xc5\x00b\x08 \xa9\x83\x00\xca" +
  2756. "U\x0c\x95\x9c\x80\x12b\x8a\x00\x964\x12\x0e0Tl" +
  2757. "\x01%AHQ\xc9\x90\xae\x9e\x0b\xa0\xe4\x18*\xc3\x02" +
  2758. "\"K!\x03\x90\x8a\xdb\x01\x94a\x86\xcaf\x01\x9d\x02" +
  2759. "7\xf3\xaa\xceuH\xda\x9d\xa6\x89\xd5 `5\xa0c" +
  2760. "r\xdb\x1cQ\xfbr\x90\xe4\x11\xb18x\x8d\x8d5 " +
  2761. "`\x0d\xa03`\x14Mk\xa5n\xa3\x96\xeb\xe5kL" +
  2762. "n\xe1\x00V\x80\x80\x15\x80\x81{l\xbc{\x17\xe54" +
  2763. "\xae\xdb\xc9.}\x8dQ\xe6T\xf7DNu\x97\x9c\xda" +
  2764. "\x1cqj\xd3\"\x00e\x1dC\xe5\x06\x01%V\xf2j" +
  2765. "K#\xf5\x05\x86\xcaM\x02:\x19\xf7\x90\xae,\x00\x04" +
  2766. "\xf6\xae\xe1\xaa]4\xb9E\xb2S\x00{\x18\xban\x9d" +
  2767. "\x02\xb8a\x88\x9b\x96f\xe8\xbe\x9bI\xd5\xcc\x0c\x04\xa1" +
  2768. "\x98\x04\xaa\xcea\xcd\xb25\xbd\x7f\x85+o\xed1r" +
  2769. "Zf\x84\xbc\xaav\xed<}!\x00\xa24\xf3r\x00" +
  2770. "\x14$i\x11@\xab\xd6\xaf\x1b&w\xb2\x9a\x951t" +
  2771. "\x9d\x03\xcb\xd8\x1b\xfa\xd4\x9c\xaagxpP\xc5\xf8\x83" +
  2772. "\xbc\x03\xd2\xdc\x1c\xe2\xe6\xb9j$A\xe6\xf5\xa8\xa6\xca" +
  2773. "\xf2\x96R\x1d\xc4\xb1\xf3r\x00\xa5\x83\xa1\xd2\x13\x89\xe3" +
  2774. "R\x8a\xe3\x12\x86\xca\xa5\x918\xae\xa48\xf60TV" +
  2775. "\x09\xe8\x18\xa6\xd6\xaf\xe9\x17q`f\x14c\xcb\xd6\xd5" +
  2776. "<\xa7\x98\x95\xe2\xb1\xc1(\xd8\x9a\xa1[X\x1b\xd6Q" +
  2777. "@\xac\x9d\x1cu\xcf\x81$\xe56\xc5'\x11X{\x16" +
  2778. "Y\xfb\xff\x0c\x95\xcfE\xacm\xa6T>\x9f\xa1r\xa1" +
  2779. "\x80\x8e\x9a\xc9\x18E\xdd^\x01L\xed/\x03%\xcd!" +
  2780. "\x991yh\xaf\x7fl|\x82\xbc\xa3xg\xc8\xf4^" +
  2781. "\xee\xdd\xa9sMn\x89\xc5\x9cM\xd6T;\x8eg\xce" +
  2782. "|\x00e\x1eC\xe5|\x01k\xf0c\xc7\xb3\xa7i{" +
  2783. "hO\x037M\xc3\xc4\xda\xb0\xe6\x94\xbc\xcf\x94\x0e@" +
  2784. "C\xef\xe0\xb6\xaa\xe5\x90b\x14\xb4\xb9\xb2\x18M\x05r" +
  2785. "Q7y\xbff\xd9\xdc\xf4\xc4\xf3Z\x09\xe9\xbc\xa5\xc4" +
  2786. "\x82\xd0\xd5\xec\x02Pj\x19*\xa7\x09\xe8\xf4\x9bj\x86" +
  2787. "\xf7p\x135#\xbbL\xd5\x8d4\xe3\x19\x8c\x83\x80\xf1" +
  2788. "\xc8\xa1\xa7\x9c\xec\xa1\xbd\xdc*\xe6l\x0b\x82U\x93\xaf" +
  2789. "7y)\x08\xa5\xe5=\x0d\x9e\xcd\xa9\xc0\xe6\xf5s\xc3" +
  2790. "\xda\x13\xc0\xbd\xa9/\xbc\xbaArn\xa5\xc4\xb8\x81\xa1" +
  2791. "\xb2#r\xc9\xb7Q\x1a\xdf\xc6P\xb9G@)\x16K" +
  2792. "a\x0c@\xba\x9b\xd2x\x07Ce\x8f0\xb6B\xf1!" +
  2793. "\xae\xdb\x1dZ?\x88\xdc\x0a\xa5db\x87\xd6\xcf\x81Y" +
  2794. "\x9f5\xd1\x13S\xc4\xc3\xe8\xb3\x8c\x1c\xb7y\x07\xcf\xe4" +
  2795. "TS\xb5\xb5!\xee}/%\xa3\x0f\xead\x1b\xf6\xba" +
  2796. "\x88\xd0bC\x1f\x07S\x98\xd4%\xa8\xd0\x9a\xac^\x85" +
  2797. "\xea\xcb\x0b\xb6&\x1a\xbaE\x971\x82\xce\xc2\x89\xd01" +
  2798. "Ct\xd0\x07g4\x0a\x0e\x96\xc0\xd9\x15\xe2 \xc5\x04" +
  2799. "\x0f\x9c\xdd{\x01\x94=\x0c\x95\x07\x05l\xf5\xca2\xd6" +
  2800. "\x86l\xbc\x14P\xaf\xf8,1\xa0!\xa3\xe6\xba\x0a\x01" +
  2801. ",&/\xe4\xd4\x0c\xef\xc4R\xa1\x05D\x10\x10]\x14" +
  2802. "\xf3\x05\x93[\x16j\x86\xae\x14\xd5\x9c\xc6\xec\x91\xa0\xfd" +
  2803. "\xe8\xc5|\x8f\xc9\x8744\x8aV\xbbm\xf3\xbcX\xb0" +
  2804. "\xadq\xcdi\xd2\x00\xd1\x15\x16\xb5\x9cUV\xad\x1a\xc3" +
  2805. "\xf2\x10\x04\xa8\x89\xaa\xd59\x0c\x95\x05\x02&\x8bE-" +
  2806. "\x1b\x98\x9f32.n\x90\\\xa6\xe6\xf9\xb8\x8eR1" +
  2807. "\xe5u\x1as\x19{\xd4\xa4{\x9b\xfe\x9bJ\xfd\xe4\xfc" +
  2808. "\x85\\\x07\xb7\x1f\x86&S\x01hc\xa8,\x89\x98\xdc" +
  2809. "5?\xe2\x87o\xf2\xd2\xbe\xd0\x0f\xf1\xeb|\xc4\xb7\xaa" +
  2810. "\x81\xe7\xa9\xb8\xfa\xc1,9\xd3\x0e\xe2%\xa1\xced\xf6" +
  2811. "E/\xd4\xf2B\x83\xeb!\xd9\xb8\xc0\xb7Q\x1e\xc1n" +
  2812. "\x80\xf402Lo\xc6\xd0Ly\x13.\x02H\xaf#" +
  2813. "\xf9\x0d\x18Z*o\xc1z\x80\xf4F\x92\xdf\x84\x01\xcf" +
  2814. "\x92\xb7\xe2\x03\x00\xe9\x9bH|\x17\xa9\xc7\x98{%\xe4" +
  2815. "\x9d\xee\xf6;H\xbe\x87\xe4\xf1X\x0a\xe3\x00\xf2nl" +
  2816. "\x04H\xdfE\xf2GI^!\xa4\xb0\x02@\xde\x87\x83" +
  2817. "\x00\xe9\x87I\xfe8\xc9\xc5x\x8a\xa8\xa6\xbc\x1fM\x80" +
  2818. "\xf4OI\xfek\x92'f\xa70\x01 ?\xe9\xca\x9f" +
  2819. " \xf9s$\xaf\x9c\x93\xc2J\x00\xf9\x19\x1c\x05H?" +
  2820. "M\xf2\x03$\xaf\xc2\x14V\x01\xc8/\xe3.\x80\xf4\x01" +
  2821. "\x92\xff\x81\xe43*R8\x03@~\xc3\xb5\xe7 \xc9" +
  2822. "\xdf\"yu,\x85\xd5\x00\xf2\x1fq/@\xfa-\x92" +
  2823. "\xff\x9d\xe45b\x0ak\x00\xe4\xb7]\xbf\x8e\x93<!" +
  2824. "\x94\x910?\xa3\xca\x98\x163\xac\x002^\xba\xe3\xe8" +
  2825. "\xa5{\x8f\x91$6\x85\xc9\xf05\x0e\x88I@\xa7`" +
  2826. "\x18\xb9ec35i\xab\xfd\x96\xcf\xeaj\xc3\x17\x1b" +
  2827. " \x09\x83\xd6\x0cIC\xef\xca\x06\x85\xa0\xbc\xea\xf8\x96" +
  2828. "hV{\xd16\x8a\x05h\xc8\xaa6\xcf\x065\xc7," +
  2829. "\xea\x8bM#\xbf\x02\xb9\x99\xd7t57E5\xaa\x04" +
  2830. "\x01+\xa1T\x12\xfc\xbd'/M\x9f\xccQ\x83\x8c\x16" +
  2831. "\xca3\xba\xa1\xb0p\x85\xda?\x9d:5?\xa4ZI" +
  2832. "=R\x90\x1a\x86\xd4\\\xf1\xd3\x94\xa7\xb1\xdd\xbe\xb7\xd5" +
  2833. "c\x0bQ\x8aB\x0d%\xc1PI\x09\xd8jz\x1d\xaa" +
  2834. "\xd6\x7f\xdaM]J\xc6r\xb6\xa4\xff\x10r\xf7\xc7\xc8" +
  2835. "\xb8\x84\xce\x11J\xfbO\xdb\xfc~n{\xbf\xe8)B" +
  2836. "<Z\x8cv\xe2\x93[\xdd\xcb\xad\xe4t\\\x0f\x9f\xc0" +
  2837. "e\xce\x8b\xd3j\xfc\x13\xb4}\x9f\x16F\xdeQ\x84\xfd" +
  2838. "*\x86\xca@\x04{NM!\xcbP)\x84M<\xdf" +
  2839. "\x1b\xbe\x0d%&\x94\x1e\x87\xd4(\x0a\x0c\x95u\x02&" +
  2840. "\xe9\xa5\x81\xb5\xe1\x0ck\x8c\xd1c_W\x94\x0a]z" +
  2841. "\x96\x03\x0e\xfb\xd9\x1ci\x1f\xc1lhj\x025=\xb7" +
  2842. "}b:e\xc0\x83y\xcbt\xdf(\xad\xde\xa1\x94g" +
  2843. "\xb3Y\x1c \x98=\xa1?\xdf\x90\xf6\xad\x05A\xfa\xbe" +
  2844. "\x88\xe1|\x06\xfdq\x8c\xb4\xdb\x04A\xda)\xa2\x10\x0c" +
  2845. "\xe8\xd0\x1f\xc4I[o\x04A\xda\"\"\x0b\xe6k\xe8" +
  2846. "O\x08\x9aG\xaa\x10\x04i\xbd\x88\xb1`\xa6\x88\xfe|" +
  2847. "A\xbaz\x10\x04I\x131\x1e\x8c\xee\xd0\x1f4I\xab" +
  2848. "GA\x90V\x8a\x8e\x1f$h\xf5\xfchC\xc7\xcfQ" +
  2849. "hp\xb3\xb4\x0d\x1d\x9f9\xa2O*\x00\xda\xd0\xf1i" +
  2850. "*\xfb$\x9e\xeaj\xf9\xcfNH\xd2\xc3\xb3\x8d\xc8\x99" +
  2851. "w\xff\xb1T\x00\xa0\x0d\x95\x18F\xc6+\x00\x9f\x96\xea" +
  2852. "\xf4\xf2\x86\xcfRJ&\x00\xd7;'\x18;D\xf6%" +
  2853. "\xf6V\xcdP\x99-LI\xd8b\x9f\xe4\x85\x9f\xb4I" +
  2854. "ZL\xfb\xffo\xb0\xff\xcbDx\x9ec\xa8\x1c\x8c\\" +
  2855. "\xc7WI\xf8\x12C\xe5p\x84\xf0\x1c\xa2;z\x90\xa1" +
  2856. "\xf2~8\xaby\xf7F\x00\xe5}\x86\xbd\x11\x02!\xfd" +
  2857. "\x8b\x14?\xa26\xeb\xd2\x07\xf4\xe8C\x1c\xb7\x03\xa4\x13" +
  2858. "\xd4~S.}\x88y\xf4A\xc2>\x80t-\xc9O" +
  2859. "\x8b\xd2\x879x9@z6\xc9\xe7\xa1\x80\"\x8f\xcc" +
  2860. "y\x8afH\xb0rF\xff\x12M\x9f\xb0'\xf9\xc3#" +
  2861. "\xb4\x17\xabZ\xaehr\x08[b\xa9HtD\xba\xb4" +
  2862. "7Uj_C\xe9\x97\xa6\xe4\xc9\xa2\x85\"\x08(\x9e" +
  2863. "\xdccmZ\x1d\xa3\xd34\x0d4\xcb\xc8\xe7\xfc\x90|" +
  2864. "\x06\xdc\x938\xf4\xc5\x0c\x95\x15\x04E\x9b\x07\x85\xd2\x17" +
  2865. "\xd2\xe5\x86\x8cZ\xb4\xf88\x1f\x80q3x`[\x03" +
  2866. "F1\x97\xed\xe5 \xda\xe6HY\x08\xa6$\xa1i\x9e" +
  2867. "\xf4+N\xc2\xad8\xfe\xe8\x16\xfd\x09\xad\xd4\xbc\x0b\x04" +
  2868. "\xa9\x89*\x8e?\x8dD\x7f\x10/\xfd\xdf\x03 H\xa7" +
  2869. "\x87\x05\x00\xfd\x180C\x1f{\xe5\xbd\x0fn\x8e\xb6a" +
  2870. "\x0f\xe2\x7f\xe2\xd9\xe9\xb5\x9f\x93\xb8\xe9c\xa6WT\xc6" +
  2871. "\xc5\xe9\xf4\xcd\xe0\xcf\x9e\xb2\x9b^\xf9Y_\xe0~#" +
  2872. "\xf9w\x00\x00\x00\xff\xffH\xa22\xa3"
  2873. func init() {
  2874. schemas.Register(schema_db8274f9144abc7e,
  2875. 0x82c325a07ad22a65,
  2876. 0x83ced0145b2f114b,
  2877. 0x84cb9536a2cf6d3c,
  2878. 0x85c8cea1ab1894f3,
  2879. 0x9496331ab9cd463f,
  2880. 0x97b3c5c260257622,
  2881. 0x9b87b390babc2ccf,
  2882. 0xa29a916d4ebdd894,
  2883. 0xa353a3556df74984,
  2884. 0xa766b24d4fe5da35,
  2885. 0xb046e578094b1ead,
  2886. 0xb4bf9861fe035d04,
  2887. 0xb5f39f082b9ac18a,
  2888. 0xb70431c0dc014915,
  2889. 0xc082ef6e0d42ed1d,
  2890. 0xc793e50592935b4a,
  2891. 0xcbd96442ae3bb01a,
  2892. 0xd4d18de97bb12de3,
  2893. 0xdbaa9d03d52b62dc,
  2894. 0xdc3ed6801961e502,
  2895. 0xe3e37d096a5b564e,
  2896. 0xe6646dec8feaa6ee,
  2897. 0xea50d822450d1f17,
  2898. 0xea58385c65416035,
  2899. 0xf2c122394f447e8e,
  2900. 0xf2c68e2547ec3866,
  2901. 0xf41a0f001ad49e46,
  2902. 0xf5f383d2785edb86,
  2903. 0xf71695ec7fe85497,
  2904. 0xf9cb7f4431a307d0,
  2905. 0xfc5edf80e39c0796,
  2906. 0xfeac5c8f4899ef7c)
  2907. }