github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/mobile/bind/testdata/interfaces.go.golden (about) 1 // Package go_interfaces is an autogenerated binder stub for package interfaces. 2 // gobind -lang=go interfaces 3 // 4 // File is generated by gobind. Do not edit. 5 package go_interfaces 6 7 import ( 8 "golang.org/x/mobile/bind/seq" 9 "interfaces" 10 ) 11 12 func proxy_Add3(out, in *seq.Buffer) { 13 var param_r interfaces.I 14 param_r_ref := in.ReadRef() 15 if param_r_ref.Num < 0 { // go object 16 param_r = param_r_ref.Get().(interfaces.I) 17 } else { // foreign object 18 param_r = (*proxyI)(param_r_ref) 19 } 20 res := interfaces.Add3(param_r) 21 out.WriteInt32(res) 22 } 23 24 func proxy_CallErr(out, in *seq.Buffer) { 25 var param_e interfaces.Error 26 param_e_ref := in.ReadRef() 27 if param_e_ref.Num < 0 { // go object 28 param_e = param_e_ref.Get().(interfaces.Error) 29 } else { // foreign object 30 param_e = (*proxyError)(param_e_ref) 31 } 32 err := interfaces.CallErr(param_e) 33 if err == nil { 34 out.WriteString("") 35 } else { 36 out.WriteString(err.Error()) 37 } 38 } 39 40 const ( 41 proxyError_Descriptor = "go.interfaces.Error" 42 proxyError_Err_Code = 0x10a 43 ) 44 45 func proxyError_Err(out, in *seq.Buffer) { 46 ref := in.ReadRef() 47 v := ref.Get().(interfaces.Error) 48 err := v.Err() 49 if err == nil { 50 out.WriteString("") 51 } else { 52 out.WriteString(err.Error()) 53 } 54 } 55 56 func init() { 57 seq.Register(proxyError_Descriptor, proxyError_Err_Code, proxyError_Err) 58 } 59 60 type proxyError seq.Ref 61 62 func (p *proxyError) Err() error { 63 in := new(seq.Buffer) 64 out := seq.Transact((*seq.Ref)(p), "go.interfaces.Error", proxyError_Err_Code, in) 65 res_0 := out.ReadError() 66 return res_0 67 } 68 69 const ( 70 proxyI_Descriptor = "go.interfaces.I" 71 proxyI_Rand_Code = 0x10a 72 ) 73 74 func proxyI_Rand(out, in *seq.Buffer) { 75 ref := in.ReadRef() 76 v := ref.Get().(interfaces.I) 77 res := v.Rand() 78 out.WriteInt32(res) 79 } 80 81 func init() { 82 seq.Register(proxyI_Descriptor, proxyI_Rand_Code, proxyI_Rand) 83 } 84 85 type proxyI seq.Ref 86 87 func (p *proxyI) Rand() int32 { 88 in := new(seq.Buffer) 89 out := seq.Transact((*seq.Ref)(p), "go.interfaces.I", proxyI_Rand_Code, in) 90 res_0 := out.ReadInt32() 91 return res_0 92 } 93 94 const ( 95 proxyI1_Descriptor = "go.interfaces.I1" 96 proxyI1_J_Code = 0x10a 97 ) 98 99 func proxyI1_J(out, in *seq.Buffer) { 100 ref := in.ReadRef() 101 v := ref.Get().(interfaces.I1) 102 v.J() 103 } 104 105 func init() { 106 seq.Register(proxyI1_Descriptor, proxyI1_J_Code, proxyI1_J) 107 } 108 109 const ( 110 proxyI2_Descriptor = "go.interfaces.I2" 111 proxyI2_G_Code = 0x10a 112 ) 113 114 func proxyI2_G(out, in *seq.Buffer) { 115 ref := in.ReadRef() 116 v := ref.Get().(interfaces.I2) 117 v.G() 118 } 119 120 func init() { 121 seq.Register(proxyI2_Descriptor, proxyI2_G_Code, proxyI2_G) 122 } 123 124 const ( 125 proxyI3_Descriptor = "go.interfaces.I3" 126 proxyI3_F_Code = 0x10a 127 ) 128 129 func proxyI3_F(out, in *seq.Buffer) { 130 ref := in.ReadRef() 131 v := ref.Get().(interfaces.I3) 132 res := v.F() 133 out.WriteGoRef(res) 134 } 135 136 func init() { 137 seq.Register(proxyI3_Descriptor, proxyI3_F_Code, proxyI3_F) 138 } 139 140 type proxyI3 seq.Ref 141 142 func (p *proxyI3) F() interfaces.I1 { 143 in := new(seq.Buffer) 144 out := seq.Transact((*seq.Ref)(p), "go.interfaces.I3", proxyI3_F_Code, in) 145 var res_0 interfaces.I1 146 res_0_ref := out.ReadRef() 147 if res_0_ref.Num < 0 { // go object 148 res_0 = res_0_ref.Get().(interfaces.I1) 149 } 150 return res_0 151 } 152 153 func proxy_Seven(out, in *seq.Buffer) { 154 res := interfaces.Seven() 155 out.WriteGoRef(res) 156 } 157 158 const ( 159 proxyWithParam_Descriptor = "go.interfaces.WithParam" 160 proxyWithParam_HasParam_Code = 0x10a 161 ) 162 163 func proxyWithParam_HasParam(out, in *seq.Buffer) { 164 ref := in.ReadRef() 165 v := ref.Get().(interfaces.WithParam) 166 param_p0 := in.ReadBool() 167 v.HasParam(param_p0) 168 } 169 170 func init() { 171 seq.Register(proxyWithParam_Descriptor, proxyWithParam_HasParam_Code, proxyWithParam_HasParam) 172 } 173 174 type proxyWithParam seq.Ref 175 176 func (p *proxyWithParam) HasParam(p0 bool) { 177 in := new(seq.Buffer) 178 in.WriteBool(p0) 179 seq.Transact((*seq.Ref)(p), "go.interfaces.WithParam", proxyWithParam_HasParam_Code, in) 180 } 181 182 func init() { 183 seq.Register("interfaces", 1, proxy_Add3) 184 seq.Register("interfaces", 2, proxy_CallErr) 185 seq.Register("interfaces", 3, proxy_Seven) 186 }