api.pb.go 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: app/service/bbq/recsys/api/grpc/v1/api.proto
  3. // use {app_id}.{version} as package name
  4. package v1
  5. import (
  6. context "context"
  7. encoding_binary "encoding/binary"
  8. fmt "fmt"
  9. _ "github.com/gogo/protobuf/gogoproto"
  10. proto "github.com/gogo/protobuf/proto"
  11. github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
  12. grpc "google.golang.org/grpc"
  13. io "io"
  14. math "math"
  15. reflect "reflect"
  16. strings "strings"
  17. )
  18. // Reference imports to suppress errors if they are not otherwise used.
  19. var _ = proto.Marshal
  20. var _ = fmt.Errorf
  21. var _ = math.Inf
  22. // This is a compile-time assertion to ensure that this generated file
  23. // is compatible with the proto package it is being compiled against.
  24. // A compilation error at this line likely means your copy of the
  25. // proto package needs to be updated.
  26. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  27. type RecsysRequest struct {
  28. MID int64 `protobuf:"varint,1,opt,name=mid,proto3" json:"mid" form:"mid"`
  29. BUVID string `protobuf:"bytes,2,opt,name=buvid,proto3" json:"buvid" form:"buvid"`
  30. Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit" form:"limit"`
  31. Offset int32 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset" form:"offset"`
  32. SVID int64 `protobuf:"varint,5,opt,name=svid,proto3" json:"svid" form:"svid"`
  33. Abtest string `protobuf:"bytes,6,opt,name=abtest,proto3" json:"abtest" form:"abtest"`
  34. TraceID string `protobuf:"bytes,7,opt,name=traceID,proto3" json:"traceID" form:"traceID"`
  35. DebugFlag bool `protobuf:"varint,8,opt,name=debug_flag,json=debugFlag,proto3" json:"debugFlag" form:"debugFlag"`
  36. DebugType string `protobuf:"bytes,9,opt,name=debug_type,json=debugType,proto3" json:"debugType" form:"debugType"`
  37. QueryID string `protobuf:"bytes,10,opt,name=queryID,proto3" json:"queryID" form:"queryID"`
  38. App string `protobuf:"bytes,11,opt,name=app,proto3" json:"app" form:"app"`
  39. AppVersion string `protobuf:"bytes,12,opt,name=appVersion,proto3" json:"appVersion" form:"appVersion"`
  40. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  41. XXX_unrecognized []byte `json:"-"`
  42. XXX_sizecache int32 `json:"-"`
  43. }
  44. func (m *RecsysRequest) Reset() { *m = RecsysRequest{} }
  45. func (*RecsysRequest) ProtoMessage() {}
  46. func (*RecsysRequest) Descriptor() ([]byte, []int) {
  47. return fileDescriptor_3b9e00c05e1192e6, []int{0}
  48. }
  49. func (m *RecsysRequest) XXX_Unmarshal(b []byte) error {
  50. return m.Unmarshal(b)
  51. }
  52. func (m *RecsysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  53. if deterministic {
  54. return xxx_messageInfo_RecsysRequest.Marshal(b, m, deterministic)
  55. } else {
  56. b = b[:cap(b)]
  57. n, err := m.MarshalTo(b)
  58. if err != nil {
  59. return nil, err
  60. }
  61. return b[:n], nil
  62. }
  63. }
  64. func (m *RecsysRequest) XXX_Merge(src proto.Message) {
  65. xxx_messageInfo_RecsysRequest.Merge(m, src)
  66. }
  67. func (m *RecsysRequest) XXX_Size() int {
  68. return m.Size()
  69. }
  70. func (m *RecsysRequest) XXX_DiscardUnknown() {
  71. xxx_messageInfo_RecsysRequest.DiscardUnknown(m)
  72. }
  73. var xxx_messageInfo_RecsysRequest proto.InternalMessageInfo
  74. type RecsysResponse struct {
  75. Message map[string]string `protobuf:"bytes,1,rep,name=message,proto3" json:"message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  76. List []*RecsysRecord `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"`
  77. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  78. XXX_unrecognized []byte `json:"-"`
  79. XXX_sizecache int32 `json:"-"`
  80. }
  81. func (m *RecsysResponse) Reset() { *m = RecsysResponse{} }
  82. func (*RecsysResponse) ProtoMessage() {}
  83. func (*RecsysResponse) Descriptor() ([]byte, []int) {
  84. return fileDescriptor_3b9e00c05e1192e6, []int{1}
  85. }
  86. func (m *RecsysResponse) XXX_Unmarshal(b []byte) error {
  87. return m.Unmarshal(b)
  88. }
  89. func (m *RecsysResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  90. if deterministic {
  91. return xxx_messageInfo_RecsysResponse.Marshal(b, m, deterministic)
  92. } else {
  93. b = b[:cap(b)]
  94. n, err := m.MarshalTo(b)
  95. if err != nil {
  96. return nil, err
  97. }
  98. return b[:n], nil
  99. }
  100. }
  101. func (m *RecsysResponse) XXX_Merge(src proto.Message) {
  102. xxx_messageInfo_RecsysResponse.Merge(m, src)
  103. }
  104. func (m *RecsysResponse) XXX_Size() int {
  105. return m.Size()
  106. }
  107. func (m *RecsysResponse) XXX_DiscardUnknown() {
  108. xxx_messageInfo_RecsysResponse.DiscardUnknown(m)
  109. }
  110. var xxx_messageInfo_RecsysResponse proto.InternalMessageInfo
  111. type RecsysRecord struct {
  112. Svid int64 `protobuf:"varint,1,opt,name=svid,proto3" json:"svid,omitempty"`
  113. Score float64 `protobuf:"fixed64,2,opt,name=score,proto3" json:"score,omitempty"`
  114. Map map[string]string `protobuf:"bytes,3,rep,name=map,proto3" json:"map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  115. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  116. XXX_unrecognized []byte `json:"-"`
  117. XXX_sizecache int32 `json:"-"`
  118. }
  119. func (m *RecsysRecord) Reset() { *m = RecsysRecord{} }
  120. func (*RecsysRecord) ProtoMessage() {}
  121. func (*RecsysRecord) Descriptor() ([]byte, []int) {
  122. return fileDescriptor_3b9e00c05e1192e6, []int{2}
  123. }
  124. func (m *RecsysRecord) XXX_Unmarshal(b []byte) error {
  125. return m.Unmarshal(b)
  126. }
  127. func (m *RecsysRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  128. if deterministic {
  129. return xxx_messageInfo_RecsysRecord.Marshal(b, m, deterministic)
  130. } else {
  131. b = b[:cap(b)]
  132. n, err := m.MarshalTo(b)
  133. if err != nil {
  134. return nil, err
  135. }
  136. return b[:n], nil
  137. }
  138. }
  139. func (m *RecsysRecord) XXX_Merge(src proto.Message) {
  140. xxx_messageInfo_RecsysRecord.Merge(m, src)
  141. }
  142. func (m *RecsysRecord) XXX_Size() int {
  143. return m.Size()
  144. }
  145. func (m *RecsysRecord) XXX_DiscardUnknown() {
  146. xxx_messageInfo_RecsysRecord.DiscardUnknown(m)
  147. }
  148. var xxx_messageInfo_RecsysRecord proto.InternalMessageInfo
  149. func init() {
  150. proto.RegisterType((*RecsysRequest)(nil), "bbq.service.recsys.v1.RecsysRequest")
  151. proto.RegisterType((*RecsysResponse)(nil), "bbq.service.recsys.v1.RecsysResponse")
  152. proto.RegisterMapType((map[string]string)(nil), "bbq.service.recsys.v1.RecsysResponse.MessageEntry")
  153. proto.RegisterType((*RecsysRecord)(nil), "bbq.service.recsys.v1.RecsysRecord")
  154. proto.RegisterMapType((map[string]string)(nil), "bbq.service.recsys.v1.RecsysRecord.MapEntry")
  155. }
  156. func init() {
  157. proto.RegisterFile("app/service/bbq/recsys/api/grpc/v1/api.proto", fileDescriptor_3b9e00c05e1192e6)
  158. }
  159. var fileDescriptor_3b9e00c05e1192e6 = []byte{
  160. // 716 bytes of a gzipped FileDescriptorProto
  161. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0x41, 0x6f, 0xd3, 0x3e,
  162. 0x18, 0xc6, 0x9b, 0xa6, 0xe9, 0xd6, 0x77, 0xdd, 0xb4, 0x59, 0x9b, 0x94, 0x7f, 0xff, 0x50, 0x17,
  163. 0x0f, 0x44, 0x0f, 0x23, 0xd1, 0x36, 0x89, 0x4d, 0x3b, 0x20, 0x54, 0x06, 0xd2, 0x24, 0x76, 0xf1,
  164. 0xd8, 0x0e, 0x20, 0x81, 0x92, 0xd4, 0x0d, 0x11, 0xed, 0xe2, 0xc6, 0x69, 0xa5, 0xde, 0xf8, 0x3a,
  165. 0x1c, 0x90, 0xf8, 0x18, 0x3b, 0x4e, 0xe2, 0xc2, 0x29, 0x62, 0x3d, 0xf6, 0xd8, 0x4f, 0x80, 0x62,
  166. 0xa7, 0x4b, 0x41, 0x48, 0x1b, 0x87, 0xdd, 0xfc, 0xfe, 0x5e, 0x3f, 0xcf, 0xfb, 0x58, 0xb1, 0x03,
  167. 0x5b, 0x0e, 0xe7, 0xb6, 0x60, 0xd1, 0x30, 0xf0, 0x98, 0xed, 0xba, 0x7d, 0x3b, 0x62, 0x9e, 0x18,
  168. 0x09, 0xdb, 0xe1, 0x81, 0xed, 0x47, 0xdc, 0xb3, 0x87, 0xdb, 0xe9, 0xda, 0xe2, 0x51, 0x18, 0x87,
  169. 0x68, 0xc3, 0x75, 0xfb, 0x56, 0xb6, 0xdb, 0x52, 0x3b, 0xad, 0xe1, 0x76, 0xed, 0x89, 0x1f, 0xc4,
  170. 0x1f, 0x07, 0xae, 0xe5, 0x85, 0x3d, 0xdb, 0x0f, 0xfd, 0xd0, 0x96, 0xbb, 0xdd, 0x41, 0x47, 0x56,
  171. 0xb2, 0x90, 0x2b, 0xe5, 0x42, 0xbe, 0x1a, 0xb0, 0x4c, 0xa5, 0x98, 0xb2, 0xfe, 0x80, 0x89, 0x18,
  172. 0x59, 0xa0, 0xf7, 0x82, 0xb6, 0xa9, 0x35, 0xb4, 0xa6, 0xde, 0xba, 0x37, 0x4e, 0xb0, 0x7e, 0x7c,
  173. 0x74, 0x38, 0x49, 0x70, 0x4a, 0xa7, 0x09, 0x86, 0x4e, 0x18, 0xf5, 0x0e, 0x48, 0x2f, 0x68, 0x13,
  174. 0x9a, 0x22, 0xb4, 0x0f, 0x86, 0x3b, 0x18, 0x06, 0x6d, 0xb3, 0xd8, 0xd0, 0x9a, 0x95, 0x16, 0x19,
  175. 0x27, 0xd8, 0x68, 0x9d, 0x9e, 0x49, 0x8d, 0xea, 0x4c, 0x13, 0x5c, 0x55, 0x2a, 0x59, 0x12, 0xaa,
  176. 0x30, 0xb2, 0xc1, 0xe8, 0x06, 0xbd, 0x20, 0x36, 0xf5, 0x86, 0xd6, 0x34, 0x5a, 0xff, 0xa5, 0x02,
  177. 0x09, 0x72, 0x81, 0x2c, 0x09, 0x55, 0x18, 0xed, 0x42, 0x39, 0xec, 0x74, 0x04, 0x8b, 0xcd, 0x92,
  178. 0x54, 0xfc, 0x3f, 0x49, 0x70, 0x46, 0xa6, 0x09, 0x5e, 0x56, 0x12, 0x55, 0x13, 0x9a, 0x35, 0xd0,
  179. 0x2e, 0x94, 0x44, 0x1a, 0xcf, 0x90, 0x07, 0xc2, 0xe3, 0x04, 0x97, 0x4e, 0x54, 0x3a, 0xc9, 0xa7,
  180. 0x09, 0x5e, 0x52, 0x42, 0x21, 0xb3, 0x49, 0x98, 0x4e, 0x72, 0xdc, 0x98, 0x89, 0xd8, 0x2c, 0xcb,
  181. 0x53, 0xc9, 0x49, 0x8a, 0xe4, 0x93, 0x54, 0x4d, 0x68, 0xd6, 0x40, 0x7b, 0xb0, 0x10, 0x47, 0x8e,
  182. 0xc7, 0x8e, 0x0e, 0xcd, 0x05, 0xa9, 0xba, 0x3f, 0x49, 0xf0, 0x0c, 0x4d, 0x13, 0xbc, 0xa2, 0x64,
  183. 0x19, 0x20, 0x74, 0xd6, 0x42, 0xcf, 0x01, 0xda, 0xcc, 0x1d, 0xf8, 0x1f, 0x3a, 0x5d, 0xc7, 0x37,
  184. 0x17, 0x1b, 0x5a, 0x73, 0xb1, 0xf5, 0x60, 0x92, 0xe0, 0x8a, 0xa4, 0xaf, 0xba, 0x8e, 0x3f, 0x4d,
  185. 0xf0, 0xaa, 0x52, 0x5f, 0x23, 0x42, 0xf3, 0x76, 0xee, 0x10, 0x8f, 0x38, 0x33, 0x2b, 0x72, 0x7a,
  186. 0xee, 0xf0, 0x66, 0xc4, 0xd9, 0x1f, 0x0e, 0x29, 0x9a, 0x39, 0xa4, 0xeb, 0x34, 0x7c, 0x7f, 0xc0,
  187. 0xa2, 0xd1, 0xd1, 0xa1, 0x09, 0x79, 0xf8, 0x0c, 0xe5, 0xe1, 0x33, 0x40, 0xe8, 0xac, 0x85, 0x1e,
  188. 0x83, 0xee, 0x70, 0x6e, 0x2e, 0x49, 0xd1, 0x46, 0x7a, 0x51, 0x1c, 0xce, 0xf3, 0x8b, 0xe2, 0x70,
  189. 0x4e, 0x68, 0x8a, 0xd0, 0x0b, 0x00, 0x87, 0xf3, 0x33, 0x16, 0x89, 0x20, 0x3c, 0x37, 0xab, 0x72,
  190. 0xff, 0xe6, 0x24, 0xc1, 0x73, 0x74, 0x9a, 0xe0, 0xb5, 0x6b, 0x59, 0xc6, 0x08, 0x9d, 0xdb, 0x40,
  191. 0xbe, 0x6b, 0xb0, 0x32, 0xbb, 0xaf, 0x82, 0x87, 0xe7, 0x82, 0xa1, 0xd7, 0xb0, 0xd0, 0x63, 0x42,
  192. 0x38, 0x3e, 0x33, 0xb5, 0x86, 0xde, 0x5c, 0xda, 0xd9, 0xb1, 0xfe, 0xfa, 0x34, 0xac, 0xdf, 0x75,
  193. 0xd6, 0xb1, 0x12, 0xbd, 0x3c, 0x8f, 0xa3, 0x11, 0x9d, 0x59, 0xa0, 0x3d, 0x28, 0x75, 0x03, 0x11,
  194. 0x9b, 0x45, 0x69, 0xb5, 0x79, 0x83, 0x95, 0x17, 0x46, 0x6d, 0x2a, 0x05, 0xb5, 0x03, 0xa8, 0xce,
  195. 0x3b, 0xa2, 0x55, 0xd0, 0x3f, 0xb1, 0x91, 0x7c, 0x47, 0x15, 0x9a, 0x2e, 0xd1, 0x3a, 0x18, 0x43,
  196. 0xa7, 0x3b, 0x60, 0xea, 0xa5, 0x50, 0x55, 0x1c, 0x14, 0xf7, 0x35, 0xf2, 0x4d, 0x83, 0xea, 0xbc,
  197. 0x25, 0x42, 0xd9, 0xa5, 0x95, 0xaf, 0x30, 0xbb, 0x93, 0xeb, 0x60, 0x08, 0x2f, 0x8c, 0x94, 0x5c,
  198. 0xa3, 0xaa, 0x40, 0xcf, 0x40, 0xef, 0x39, 0xdc, 0xd4, 0x65, 0xdc, 0xad, 0x5b, 0xc4, 0xb5, 0x8e,
  199. 0x1d, 0xae, 0xce, 0x9c, 0x0a, 0x6b, 0x4f, 0x61, 0x71, 0x06, 0xfe, 0x25, 0xf2, 0xce, 0x97, 0x22,
  200. 0x94, 0x95, 0x2d, 0x7a, 0x07, 0x40, 0x99, 0x77, 0xa2, 0xa6, 0xa2, 0x87, 0x37, 0x64, 0x90, 0x7f,
  201. 0x99, 0xda, 0xa3, 0x5b, 0x7d, 0x23, 0x52, 0x40, 0x2e, 0xac, 0x51, 0xd6, 0x75, 0x62, 0xd6, 0xbe,
  202. 0xbb, 0x19, 0xef, 0x61, 0xf9, 0x94, 0x8b, 0x3b, 0xf3, 0x6f, 0x35, 0x2e, 0xae, 0xea, 0x85, 0xcb,
  203. 0xab, 0x7a, 0xe1, 0xc7, 0x55, 0xbd, 0xf0, 0x79, 0x5c, 0xd7, 0x2e, 0xc6, 0x75, 0xed, 0x72, 0x5c,
  204. 0xd7, 0x7e, 0x8e, 0xeb, 0xda, 0xdb, 0xe2, 0x70, 0xdb, 0x2d, 0xcb, 0xbf, 0xf1, 0xee, 0xaf, 0x00,
  205. 0x00, 0x00, 0xff, 0xff, 0xc5, 0x8b, 0xff, 0x09, 0x03, 0x06, 0x00, 0x00,
  206. }
  207. // Reference imports to suppress errors if they are not otherwise used.
  208. var _ context.Context
  209. var _ grpc.ClientConn
  210. // This is a compile-time assertion to ensure that this generated file
  211. // is compatible with the grpc package it is being compiled against.
  212. const _ = grpc.SupportPackageIsVersion4
  213. // RecsysClient is the client API for Recsys service.
  214. //
  215. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  216. type RecsysClient interface {
  217. RecService(ctx context.Context, in *RecsysRequest, opts ...grpc.CallOption) (*RecsysResponse, error)
  218. RelatedRecService(ctx context.Context, in *RecsysRequest, opts ...grpc.CallOption) (*RecsysResponse, error)
  219. UpsRecService(ctx context.Context, in *RecsysRequest, opts ...grpc.CallOption) (*RecsysResponse, error)
  220. }
  221. type recsysClient struct {
  222. cc *grpc.ClientConn
  223. }
  224. func NewRecsysClient(cc *grpc.ClientConn) RecsysClient {
  225. return &recsysClient{cc}
  226. }
  227. func (c *recsysClient) RecService(ctx context.Context, in *RecsysRequest, opts ...grpc.CallOption) (*RecsysResponse, error) {
  228. out := new(RecsysResponse)
  229. err := c.cc.Invoke(ctx, "/bbq.service.recsys.v1.Recsys/RecService", in, out, opts...)
  230. if err != nil {
  231. return nil, err
  232. }
  233. return out, nil
  234. }
  235. func (c *recsysClient) RelatedRecService(ctx context.Context, in *RecsysRequest, opts ...grpc.CallOption) (*RecsysResponse, error) {
  236. out := new(RecsysResponse)
  237. err := c.cc.Invoke(ctx, "/bbq.service.recsys.v1.Recsys/RelatedRecService", in, out, opts...)
  238. if err != nil {
  239. return nil, err
  240. }
  241. return out, nil
  242. }
  243. func (c *recsysClient) UpsRecService(ctx context.Context, in *RecsysRequest, opts ...grpc.CallOption) (*RecsysResponse, error) {
  244. out := new(RecsysResponse)
  245. err := c.cc.Invoke(ctx, "/bbq.service.recsys.v1.Recsys/UpsRecService", in, out, opts...)
  246. if err != nil {
  247. return nil, err
  248. }
  249. return out, nil
  250. }
  251. // RecsysServer is the server API for Recsys service.
  252. type RecsysServer interface {
  253. RecService(context.Context, *RecsysRequest) (*RecsysResponse, error)
  254. RelatedRecService(context.Context, *RecsysRequest) (*RecsysResponse, error)
  255. UpsRecService(context.Context, *RecsysRequest) (*RecsysResponse, error)
  256. }
  257. func RegisterRecsysServer(s *grpc.Server, srv RecsysServer) {
  258. s.RegisterService(&_Recsys_serviceDesc, srv)
  259. }
  260. func _Recsys_RecService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  261. in := new(RecsysRequest)
  262. if err := dec(in); err != nil {
  263. return nil, err
  264. }
  265. if interceptor == nil {
  266. return srv.(RecsysServer).RecService(ctx, in)
  267. }
  268. info := &grpc.UnaryServerInfo{
  269. Server: srv,
  270. FullMethod: "/bbq.service.recsys.v1.Recsys/RecService",
  271. }
  272. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  273. return srv.(RecsysServer).RecService(ctx, req.(*RecsysRequest))
  274. }
  275. return interceptor(ctx, in, info, handler)
  276. }
  277. func _Recsys_RelatedRecService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  278. in := new(RecsysRequest)
  279. if err := dec(in); err != nil {
  280. return nil, err
  281. }
  282. if interceptor == nil {
  283. return srv.(RecsysServer).RelatedRecService(ctx, in)
  284. }
  285. info := &grpc.UnaryServerInfo{
  286. Server: srv,
  287. FullMethod: "/bbq.service.recsys.v1.Recsys/RelatedRecService",
  288. }
  289. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  290. return srv.(RecsysServer).RelatedRecService(ctx, req.(*RecsysRequest))
  291. }
  292. return interceptor(ctx, in, info, handler)
  293. }
  294. func _Recsys_UpsRecService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  295. in := new(RecsysRequest)
  296. if err := dec(in); err != nil {
  297. return nil, err
  298. }
  299. if interceptor == nil {
  300. return srv.(RecsysServer).UpsRecService(ctx, in)
  301. }
  302. info := &grpc.UnaryServerInfo{
  303. Server: srv,
  304. FullMethod: "/bbq.service.recsys.v1.Recsys/UpsRecService",
  305. }
  306. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  307. return srv.(RecsysServer).UpsRecService(ctx, req.(*RecsysRequest))
  308. }
  309. return interceptor(ctx, in, info, handler)
  310. }
  311. var _Recsys_serviceDesc = grpc.ServiceDesc{
  312. ServiceName: "bbq.service.recsys.v1.Recsys",
  313. HandlerType: (*RecsysServer)(nil),
  314. Methods: []grpc.MethodDesc{
  315. {
  316. MethodName: "RecService",
  317. Handler: _Recsys_RecService_Handler,
  318. },
  319. {
  320. MethodName: "RelatedRecService",
  321. Handler: _Recsys_RelatedRecService_Handler,
  322. },
  323. {
  324. MethodName: "UpsRecService",
  325. Handler: _Recsys_UpsRecService_Handler,
  326. },
  327. },
  328. Streams: []grpc.StreamDesc{},
  329. Metadata: "app/service/bbq/recsys/api/grpc/v1/api.proto",
  330. }
  331. func (m *RecsysRequest) Marshal() (dAtA []byte, err error) {
  332. size := m.Size()
  333. dAtA = make([]byte, size)
  334. n, err := m.MarshalTo(dAtA)
  335. if err != nil {
  336. return nil, err
  337. }
  338. return dAtA[:n], nil
  339. }
  340. func (m *RecsysRequest) MarshalTo(dAtA []byte) (int, error) {
  341. var i int
  342. _ = i
  343. var l int
  344. _ = l
  345. if m.MID != 0 {
  346. dAtA[i] = 0x8
  347. i++
  348. i = encodeVarintApi(dAtA, i, uint64(m.MID))
  349. }
  350. if len(m.BUVID) > 0 {
  351. dAtA[i] = 0x12
  352. i++
  353. i = encodeVarintApi(dAtA, i, uint64(len(m.BUVID)))
  354. i += copy(dAtA[i:], m.BUVID)
  355. }
  356. if m.Limit != 0 {
  357. dAtA[i] = 0x18
  358. i++
  359. i = encodeVarintApi(dAtA, i, uint64(m.Limit))
  360. }
  361. if m.Offset != 0 {
  362. dAtA[i] = 0x20
  363. i++
  364. i = encodeVarintApi(dAtA, i, uint64(m.Offset))
  365. }
  366. if m.SVID != 0 {
  367. dAtA[i] = 0x28
  368. i++
  369. i = encodeVarintApi(dAtA, i, uint64(m.SVID))
  370. }
  371. if len(m.Abtest) > 0 {
  372. dAtA[i] = 0x32
  373. i++
  374. i = encodeVarintApi(dAtA, i, uint64(len(m.Abtest)))
  375. i += copy(dAtA[i:], m.Abtest)
  376. }
  377. if len(m.TraceID) > 0 {
  378. dAtA[i] = 0x3a
  379. i++
  380. i = encodeVarintApi(dAtA, i, uint64(len(m.TraceID)))
  381. i += copy(dAtA[i:], m.TraceID)
  382. }
  383. if m.DebugFlag {
  384. dAtA[i] = 0x40
  385. i++
  386. if m.DebugFlag {
  387. dAtA[i] = 1
  388. } else {
  389. dAtA[i] = 0
  390. }
  391. i++
  392. }
  393. if len(m.DebugType) > 0 {
  394. dAtA[i] = 0x4a
  395. i++
  396. i = encodeVarintApi(dAtA, i, uint64(len(m.DebugType)))
  397. i += copy(dAtA[i:], m.DebugType)
  398. }
  399. if len(m.QueryID) > 0 {
  400. dAtA[i] = 0x52
  401. i++
  402. i = encodeVarintApi(dAtA, i, uint64(len(m.QueryID)))
  403. i += copy(dAtA[i:], m.QueryID)
  404. }
  405. if len(m.App) > 0 {
  406. dAtA[i] = 0x5a
  407. i++
  408. i = encodeVarintApi(dAtA, i, uint64(len(m.App)))
  409. i += copy(dAtA[i:], m.App)
  410. }
  411. if len(m.AppVersion) > 0 {
  412. dAtA[i] = 0x62
  413. i++
  414. i = encodeVarintApi(dAtA, i, uint64(len(m.AppVersion)))
  415. i += copy(dAtA[i:], m.AppVersion)
  416. }
  417. if m.XXX_unrecognized != nil {
  418. i += copy(dAtA[i:], m.XXX_unrecognized)
  419. }
  420. return i, nil
  421. }
  422. func (m *RecsysResponse) Marshal() (dAtA []byte, err error) {
  423. size := m.Size()
  424. dAtA = make([]byte, size)
  425. n, err := m.MarshalTo(dAtA)
  426. if err != nil {
  427. return nil, err
  428. }
  429. return dAtA[:n], nil
  430. }
  431. func (m *RecsysResponse) MarshalTo(dAtA []byte) (int, error) {
  432. var i int
  433. _ = i
  434. var l int
  435. _ = l
  436. if len(m.Message) > 0 {
  437. for k, _ := range m.Message {
  438. dAtA[i] = 0xa
  439. i++
  440. v := m.Message[k]
  441. mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
  442. i = encodeVarintApi(dAtA, i, uint64(mapSize))
  443. dAtA[i] = 0xa
  444. i++
  445. i = encodeVarintApi(dAtA, i, uint64(len(k)))
  446. i += copy(dAtA[i:], k)
  447. dAtA[i] = 0x12
  448. i++
  449. i = encodeVarintApi(dAtA, i, uint64(len(v)))
  450. i += copy(dAtA[i:], v)
  451. }
  452. }
  453. if len(m.List) > 0 {
  454. for _, msg := range m.List {
  455. dAtA[i] = 0x12
  456. i++
  457. i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
  458. n, err := msg.MarshalTo(dAtA[i:])
  459. if err != nil {
  460. return 0, err
  461. }
  462. i += n
  463. }
  464. }
  465. if m.XXX_unrecognized != nil {
  466. i += copy(dAtA[i:], m.XXX_unrecognized)
  467. }
  468. return i, nil
  469. }
  470. func (m *RecsysRecord) Marshal() (dAtA []byte, err error) {
  471. size := m.Size()
  472. dAtA = make([]byte, size)
  473. n, err := m.MarshalTo(dAtA)
  474. if err != nil {
  475. return nil, err
  476. }
  477. return dAtA[:n], nil
  478. }
  479. func (m *RecsysRecord) MarshalTo(dAtA []byte) (int, error) {
  480. var i int
  481. _ = i
  482. var l int
  483. _ = l
  484. if m.Svid != 0 {
  485. dAtA[i] = 0x8
  486. i++
  487. i = encodeVarintApi(dAtA, i, uint64(m.Svid))
  488. }
  489. if m.Score != 0 {
  490. dAtA[i] = 0x11
  491. i++
  492. encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Score))))
  493. i += 8
  494. }
  495. if len(m.Map) > 0 {
  496. for k, _ := range m.Map {
  497. dAtA[i] = 0x1a
  498. i++
  499. v := m.Map[k]
  500. mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
  501. i = encodeVarintApi(dAtA, i, uint64(mapSize))
  502. dAtA[i] = 0xa
  503. i++
  504. i = encodeVarintApi(dAtA, i, uint64(len(k)))
  505. i += copy(dAtA[i:], k)
  506. dAtA[i] = 0x12
  507. i++
  508. i = encodeVarintApi(dAtA, i, uint64(len(v)))
  509. i += copy(dAtA[i:], v)
  510. }
  511. }
  512. if m.XXX_unrecognized != nil {
  513. i += copy(dAtA[i:], m.XXX_unrecognized)
  514. }
  515. return i, nil
  516. }
  517. func encodeVarintApi(dAtA []byte, offset int, v uint64) int {
  518. for v >= 1<<7 {
  519. dAtA[offset] = uint8(v&0x7f | 0x80)
  520. v >>= 7
  521. offset++
  522. }
  523. dAtA[offset] = uint8(v)
  524. return offset + 1
  525. }
  526. func (m *RecsysRequest) Size() (n int) {
  527. if m == nil {
  528. return 0
  529. }
  530. var l int
  531. _ = l
  532. if m.MID != 0 {
  533. n += 1 + sovApi(uint64(m.MID))
  534. }
  535. l = len(m.BUVID)
  536. if l > 0 {
  537. n += 1 + l + sovApi(uint64(l))
  538. }
  539. if m.Limit != 0 {
  540. n += 1 + sovApi(uint64(m.Limit))
  541. }
  542. if m.Offset != 0 {
  543. n += 1 + sovApi(uint64(m.Offset))
  544. }
  545. if m.SVID != 0 {
  546. n += 1 + sovApi(uint64(m.SVID))
  547. }
  548. l = len(m.Abtest)
  549. if l > 0 {
  550. n += 1 + l + sovApi(uint64(l))
  551. }
  552. l = len(m.TraceID)
  553. if l > 0 {
  554. n += 1 + l + sovApi(uint64(l))
  555. }
  556. if m.DebugFlag {
  557. n += 2
  558. }
  559. l = len(m.DebugType)
  560. if l > 0 {
  561. n += 1 + l + sovApi(uint64(l))
  562. }
  563. l = len(m.QueryID)
  564. if l > 0 {
  565. n += 1 + l + sovApi(uint64(l))
  566. }
  567. l = len(m.App)
  568. if l > 0 {
  569. n += 1 + l + sovApi(uint64(l))
  570. }
  571. l = len(m.AppVersion)
  572. if l > 0 {
  573. n += 1 + l + sovApi(uint64(l))
  574. }
  575. if m.XXX_unrecognized != nil {
  576. n += len(m.XXX_unrecognized)
  577. }
  578. return n
  579. }
  580. func (m *RecsysResponse) Size() (n int) {
  581. if m == nil {
  582. return 0
  583. }
  584. var l int
  585. _ = l
  586. if len(m.Message) > 0 {
  587. for k, v := range m.Message {
  588. _ = k
  589. _ = v
  590. mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
  591. n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
  592. }
  593. }
  594. if len(m.List) > 0 {
  595. for _, e := range m.List {
  596. l = e.Size()
  597. n += 1 + l + sovApi(uint64(l))
  598. }
  599. }
  600. if m.XXX_unrecognized != nil {
  601. n += len(m.XXX_unrecognized)
  602. }
  603. return n
  604. }
  605. func (m *RecsysRecord) Size() (n int) {
  606. if m == nil {
  607. return 0
  608. }
  609. var l int
  610. _ = l
  611. if m.Svid != 0 {
  612. n += 1 + sovApi(uint64(m.Svid))
  613. }
  614. if m.Score != 0 {
  615. n += 9
  616. }
  617. if len(m.Map) > 0 {
  618. for k, v := range m.Map {
  619. _ = k
  620. _ = v
  621. mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
  622. n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
  623. }
  624. }
  625. if m.XXX_unrecognized != nil {
  626. n += len(m.XXX_unrecognized)
  627. }
  628. return n
  629. }
  630. func sovApi(x uint64) (n int) {
  631. for {
  632. n++
  633. x >>= 7
  634. if x == 0 {
  635. break
  636. }
  637. }
  638. return n
  639. }
  640. func sozApi(x uint64) (n int) {
  641. return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  642. }
  643. func (this *RecsysRequest) String() string {
  644. if this == nil {
  645. return "nil"
  646. }
  647. s := strings.Join([]string{`&RecsysRequest{`,
  648. `MID:` + fmt.Sprintf("%v", this.MID) + `,`,
  649. `BUVID:` + fmt.Sprintf("%v", this.BUVID) + `,`,
  650. `Limit:` + fmt.Sprintf("%v", this.Limit) + `,`,
  651. `Offset:` + fmt.Sprintf("%v", this.Offset) + `,`,
  652. `SVID:` + fmt.Sprintf("%v", this.SVID) + `,`,
  653. `Abtest:` + fmt.Sprintf("%v", this.Abtest) + `,`,
  654. `TraceID:` + fmt.Sprintf("%v", this.TraceID) + `,`,
  655. `DebugFlag:` + fmt.Sprintf("%v", this.DebugFlag) + `,`,
  656. `DebugType:` + fmt.Sprintf("%v", this.DebugType) + `,`,
  657. `QueryID:` + fmt.Sprintf("%v", this.QueryID) + `,`,
  658. `App:` + fmt.Sprintf("%v", this.App) + `,`,
  659. `AppVersion:` + fmt.Sprintf("%v", this.AppVersion) + `,`,
  660. `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
  661. `}`,
  662. }, "")
  663. return s
  664. }
  665. func (this *RecsysResponse) String() string {
  666. if this == nil {
  667. return "nil"
  668. }
  669. keysForMessage := make([]string, 0, len(this.Message))
  670. for k, _ := range this.Message {
  671. keysForMessage = append(keysForMessage, k)
  672. }
  673. github_com_gogo_protobuf_sortkeys.Strings(keysForMessage)
  674. mapStringForMessage := "map[string]string{"
  675. for _, k := range keysForMessage {
  676. mapStringForMessage += fmt.Sprintf("%v: %v,", k, this.Message[k])
  677. }
  678. mapStringForMessage += "}"
  679. s := strings.Join([]string{`&RecsysResponse{`,
  680. `Message:` + mapStringForMessage + `,`,
  681. `List:` + strings.Replace(fmt.Sprintf("%v", this.List), "RecsysRecord", "RecsysRecord", 1) + `,`,
  682. `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
  683. `}`,
  684. }, "")
  685. return s
  686. }
  687. func (this *RecsysRecord) String() string {
  688. if this == nil {
  689. return "nil"
  690. }
  691. keysForMap := make([]string, 0, len(this.Map))
  692. for k, _ := range this.Map {
  693. keysForMap = append(keysForMap, k)
  694. }
  695. github_com_gogo_protobuf_sortkeys.Strings(keysForMap)
  696. mapStringForMap := "map[string]string{"
  697. for _, k := range keysForMap {
  698. mapStringForMap += fmt.Sprintf("%v: %v,", k, this.Map[k])
  699. }
  700. mapStringForMap += "}"
  701. s := strings.Join([]string{`&RecsysRecord{`,
  702. `Svid:` + fmt.Sprintf("%v", this.Svid) + `,`,
  703. `Score:` + fmt.Sprintf("%v", this.Score) + `,`,
  704. `Map:` + mapStringForMap + `,`,
  705. `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
  706. `}`,
  707. }, "")
  708. return s
  709. }
  710. func valueToStringApi(v interface{}) string {
  711. rv := reflect.ValueOf(v)
  712. if rv.IsNil() {
  713. return "nil"
  714. }
  715. pv := reflect.Indirect(rv).Interface()
  716. return fmt.Sprintf("*%v", pv)
  717. }
  718. func (m *RecsysRequest) Unmarshal(dAtA []byte) error {
  719. l := len(dAtA)
  720. iNdEx := 0
  721. for iNdEx < l {
  722. preIndex := iNdEx
  723. var wire uint64
  724. for shift := uint(0); ; shift += 7 {
  725. if shift >= 64 {
  726. return ErrIntOverflowApi
  727. }
  728. if iNdEx >= l {
  729. return io.ErrUnexpectedEOF
  730. }
  731. b := dAtA[iNdEx]
  732. iNdEx++
  733. wire |= (uint64(b) & 0x7F) << shift
  734. if b < 0x80 {
  735. break
  736. }
  737. }
  738. fieldNum := int32(wire >> 3)
  739. wireType := int(wire & 0x7)
  740. if wireType == 4 {
  741. return fmt.Errorf("proto: RecsysRequest: wiretype end group for non-group")
  742. }
  743. if fieldNum <= 0 {
  744. return fmt.Errorf("proto: RecsysRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  745. }
  746. switch fieldNum {
  747. case 1:
  748. if wireType != 0 {
  749. return fmt.Errorf("proto: wrong wireType = %d for field MID", wireType)
  750. }
  751. m.MID = 0
  752. for shift := uint(0); ; shift += 7 {
  753. if shift >= 64 {
  754. return ErrIntOverflowApi
  755. }
  756. if iNdEx >= l {
  757. return io.ErrUnexpectedEOF
  758. }
  759. b := dAtA[iNdEx]
  760. iNdEx++
  761. m.MID |= (int64(b) & 0x7F) << shift
  762. if b < 0x80 {
  763. break
  764. }
  765. }
  766. case 2:
  767. if wireType != 2 {
  768. return fmt.Errorf("proto: wrong wireType = %d for field BUVID", wireType)
  769. }
  770. var stringLen uint64
  771. for shift := uint(0); ; shift += 7 {
  772. if shift >= 64 {
  773. return ErrIntOverflowApi
  774. }
  775. if iNdEx >= l {
  776. return io.ErrUnexpectedEOF
  777. }
  778. b := dAtA[iNdEx]
  779. iNdEx++
  780. stringLen |= (uint64(b) & 0x7F) << shift
  781. if b < 0x80 {
  782. break
  783. }
  784. }
  785. intStringLen := int(stringLen)
  786. if intStringLen < 0 {
  787. return ErrInvalidLengthApi
  788. }
  789. postIndex := iNdEx + intStringLen
  790. if postIndex > l {
  791. return io.ErrUnexpectedEOF
  792. }
  793. m.BUVID = string(dAtA[iNdEx:postIndex])
  794. iNdEx = postIndex
  795. case 3:
  796. if wireType != 0 {
  797. return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType)
  798. }
  799. m.Limit = 0
  800. for shift := uint(0); ; shift += 7 {
  801. if shift >= 64 {
  802. return ErrIntOverflowApi
  803. }
  804. if iNdEx >= l {
  805. return io.ErrUnexpectedEOF
  806. }
  807. b := dAtA[iNdEx]
  808. iNdEx++
  809. m.Limit |= (int32(b) & 0x7F) << shift
  810. if b < 0x80 {
  811. break
  812. }
  813. }
  814. case 4:
  815. if wireType != 0 {
  816. return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
  817. }
  818. m.Offset = 0
  819. for shift := uint(0); ; shift += 7 {
  820. if shift >= 64 {
  821. return ErrIntOverflowApi
  822. }
  823. if iNdEx >= l {
  824. return io.ErrUnexpectedEOF
  825. }
  826. b := dAtA[iNdEx]
  827. iNdEx++
  828. m.Offset |= (int32(b) & 0x7F) << shift
  829. if b < 0x80 {
  830. break
  831. }
  832. }
  833. case 5:
  834. if wireType != 0 {
  835. return fmt.Errorf("proto: wrong wireType = %d for field SVID", wireType)
  836. }
  837. m.SVID = 0
  838. for shift := uint(0); ; shift += 7 {
  839. if shift >= 64 {
  840. return ErrIntOverflowApi
  841. }
  842. if iNdEx >= l {
  843. return io.ErrUnexpectedEOF
  844. }
  845. b := dAtA[iNdEx]
  846. iNdEx++
  847. m.SVID |= (int64(b) & 0x7F) << shift
  848. if b < 0x80 {
  849. break
  850. }
  851. }
  852. case 6:
  853. if wireType != 2 {
  854. return fmt.Errorf("proto: wrong wireType = %d for field Abtest", wireType)
  855. }
  856. var stringLen uint64
  857. for shift := uint(0); ; shift += 7 {
  858. if shift >= 64 {
  859. return ErrIntOverflowApi
  860. }
  861. if iNdEx >= l {
  862. return io.ErrUnexpectedEOF
  863. }
  864. b := dAtA[iNdEx]
  865. iNdEx++
  866. stringLen |= (uint64(b) & 0x7F) << shift
  867. if b < 0x80 {
  868. break
  869. }
  870. }
  871. intStringLen := int(stringLen)
  872. if intStringLen < 0 {
  873. return ErrInvalidLengthApi
  874. }
  875. postIndex := iNdEx + intStringLen
  876. if postIndex > l {
  877. return io.ErrUnexpectedEOF
  878. }
  879. m.Abtest = string(dAtA[iNdEx:postIndex])
  880. iNdEx = postIndex
  881. case 7:
  882. if wireType != 2 {
  883. return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType)
  884. }
  885. var stringLen uint64
  886. for shift := uint(0); ; shift += 7 {
  887. if shift >= 64 {
  888. return ErrIntOverflowApi
  889. }
  890. if iNdEx >= l {
  891. return io.ErrUnexpectedEOF
  892. }
  893. b := dAtA[iNdEx]
  894. iNdEx++
  895. stringLen |= (uint64(b) & 0x7F) << shift
  896. if b < 0x80 {
  897. break
  898. }
  899. }
  900. intStringLen := int(stringLen)
  901. if intStringLen < 0 {
  902. return ErrInvalidLengthApi
  903. }
  904. postIndex := iNdEx + intStringLen
  905. if postIndex > l {
  906. return io.ErrUnexpectedEOF
  907. }
  908. m.TraceID = string(dAtA[iNdEx:postIndex])
  909. iNdEx = postIndex
  910. case 8:
  911. if wireType != 0 {
  912. return fmt.Errorf("proto: wrong wireType = %d for field DebugFlag", wireType)
  913. }
  914. var v int
  915. for shift := uint(0); ; shift += 7 {
  916. if shift >= 64 {
  917. return ErrIntOverflowApi
  918. }
  919. if iNdEx >= l {
  920. return io.ErrUnexpectedEOF
  921. }
  922. b := dAtA[iNdEx]
  923. iNdEx++
  924. v |= (int(b) & 0x7F) << shift
  925. if b < 0x80 {
  926. break
  927. }
  928. }
  929. m.DebugFlag = bool(v != 0)
  930. case 9:
  931. if wireType != 2 {
  932. return fmt.Errorf("proto: wrong wireType = %d for field DebugType", wireType)
  933. }
  934. var stringLen uint64
  935. for shift := uint(0); ; shift += 7 {
  936. if shift >= 64 {
  937. return ErrIntOverflowApi
  938. }
  939. if iNdEx >= l {
  940. return io.ErrUnexpectedEOF
  941. }
  942. b := dAtA[iNdEx]
  943. iNdEx++
  944. stringLen |= (uint64(b) & 0x7F) << shift
  945. if b < 0x80 {
  946. break
  947. }
  948. }
  949. intStringLen := int(stringLen)
  950. if intStringLen < 0 {
  951. return ErrInvalidLengthApi
  952. }
  953. postIndex := iNdEx + intStringLen
  954. if postIndex > l {
  955. return io.ErrUnexpectedEOF
  956. }
  957. m.DebugType = string(dAtA[iNdEx:postIndex])
  958. iNdEx = postIndex
  959. case 10:
  960. if wireType != 2 {
  961. return fmt.Errorf("proto: wrong wireType = %d for field QueryID", wireType)
  962. }
  963. var stringLen uint64
  964. for shift := uint(0); ; shift += 7 {
  965. if shift >= 64 {
  966. return ErrIntOverflowApi
  967. }
  968. if iNdEx >= l {
  969. return io.ErrUnexpectedEOF
  970. }
  971. b := dAtA[iNdEx]
  972. iNdEx++
  973. stringLen |= (uint64(b) & 0x7F) << shift
  974. if b < 0x80 {
  975. break
  976. }
  977. }
  978. intStringLen := int(stringLen)
  979. if intStringLen < 0 {
  980. return ErrInvalidLengthApi
  981. }
  982. postIndex := iNdEx + intStringLen
  983. if postIndex > l {
  984. return io.ErrUnexpectedEOF
  985. }
  986. m.QueryID = string(dAtA[iNdEx:postIndex])
  987. iNdEx = postIndex
  988. case 11:
  989. if wireType != 2 {
  990. return fmt.Errorf("proto: wrong wireType = %d for field App", wireType)
  991. }
  992. var stringLen uint64
  993. for shift := uint(0); ; shift += 7 {
  994. if shift >= 64 {
  995. return ErrIntOverflowApi
  996. }
  997. if iNdEx >= l {
  998. return io.ErrUnexpectedEOF
  999. }
  1000. b := dAtA[iNdEx]
  1001. iNdEx++
  1002. stringLen |= (uint64(b) & 0x7F) << shift
  1003. if b < 0x80 {
  1004. break
  1005. }
  1006. }
  1007. intStringLen := int(stringLen)
  1008. if intStringLen < 0 {
  1009. return ErrInvalidLengthApi
  1010. }
  1011. postIndex := iNdEx + intStringLen
  1012. if postIndex > l {
  1013. return io.ErrUnexpectedEOF
  1014. }
  1015. m.App = string(dAtA[iNdEx:postIndex])
  1016. iNdEx = postIndex
  1017. case 12:
  1018. if wireType != 2 {
  1019. return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType)
  1020. }
  1021. var stringLen uint64
  1022. for shift := uint(0); ; shift += 7 {
  1023. if shift >= 64 {
  1024. return ErrIntOverflowApi
  1025. }
  1026. if iNdEx >= l {
  1027. return io.ErrUnexpectedEOF
  1028. }
  1029. b := dAtA[iNdEx]
  1030. iNdEx++
  1031. stringLen |= (uint64(b) & 0x7F) << shift
  1032. if b < 0x80 {
  1033. break
  1034. }
  1035. }
  1036. intStringLen := int(stringLen)
  1037. if intStringLen < 0 {
  1038. return ErrInvalidLengthApi
  1039. }
  1040. postIndex := iNdEx + intStringLen
  1041. if postIndex > l {
  1042. return io.ErrUnexpectedEOF
  1043. }
  1044. m.AppVersion = string(dAtA[iNdEx:postIndex])
  1045. iNdEx = postIndex
  1046. default:
  1047. iNdEx = preIndex
  1048. skippy, err := skipApi(dAtA[iNdEx:])
  1049. if err != nil {
  1050. return err
  1051. }
  1052. if skippy < 0 {
  1053. return ErrInvalidLengthApi
  1054. }
  1055. if (iNdEx + skippy) > l {
  1056. return io.ErrUnexpectedEOF
  1057. }
  1058. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1059. iNdEx += skippy
  1060. }
  1061. }
  1062. if iNdEx > l {
  1063. return io.ErrUnexpectedEOF
  1064. }
  1065. return nil
  1066. }
  1067. func (m *RecsysResponse) Unmarshal(dAtA []byte) error {
  1068. l := len(dAtA)
  1069. iNdEx := 0
  1070. for iNdEx < l {
  1071. preIndex := iNdEx
  1072. var wire uint64
  1073. for shift := uint(0); ; shift += 7 {
  1074. if shift >= 64 {
  1075. return ErrIntOverflowApi
  1076. }
  1077. if iNdEx >= l {
  1078. return io.ErrUnexpectedEOF
  1079. }
  1080. b := dAtA[iNdEx]
  1081. iNdEx++
  1082. wire |= (uint64(b) & 0x7F) << shift
  1083. if b < 0x80 {
  1084. break
  1085. }
  1086. }
  1087. fieldNum := int32(wire >> 3)
  1088. wireType := int(wire & 0x7)
  1089. if wireType == 4 {
  1090. return fmt.Errorf("proto: RecsysResponse: wiretype end group for non-group")
  1091. }
  1092. if fieldNum <= 0 {
  1093. return fmt.Errorf("proto: RecsysResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1094. }
  1095. switch fieldNum {
  1096. case 1:
  1097. if wireType != 2 {
  1098. return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
  1099. }
  1100. var msglen int
  1101. for shift := uint(0); ; shift += 7 {
  1102. if shift >= 64 {
  1103. return ErrIntOverflowApi
  1104. }
  1105. if iNdEx >= l {
  1106. return io.ErrUnexpectedEOF
  1107. }
  1108. b := dAtA[iNdEx]
  1109. iNdEx++
  1110. msglen |= (int(b) & 0x7F) << shift
  1111. if b < 0x80 {
  1112. break
  1113. }
  1114. }
  1115. if msglen < 0 {
  1116. return ErrInvalidLengthApi
  1117. }
  1118. postIndex := iNdEx + msglen
  1119. if postIndex > l {
  1120. return io.ErrUnexpectedEOF
  1121. }
  1122. if m.Message == nil {
  1123. m.Message = make(map[string]string)
  1124. }
  1125. var mapkey string
  1126. var mapvalue string
  1127. for iNdEx < postIndex {
  1128. entryPreIndex := iNdEx
  1129. var wire uint64
  1130. for shift := uint(0); ; shift += 7 {
  1131. if shift >= 64 {
  1132. return ErrIntOverflowApi
  1133. }
  1134. if iNdEx >= l {
  1135. return io.ErrUnexpectedEOF
  1136. }
  1137. b := dAtA[iNdEx]
  1138. iNdEx++
  1139. wire |= (uint64(b) & 0x7F) << shift
  1140. if b < 0x80 {
  1141. break
  1142. }
  1143. }
  1144. fieldNum := int32(wire >> 3)
  1145. if fieldNum == 1 {
  1146. var stringLenmapkey uint64
  1147. for shift := uint(0); ; shift += 7 {
  1148. if shift >= 64 {
  1149. return ErrIntOverflowApi
  1150. }
  1151. if iNdEx >= l {
  1152. return io.ErrUnexpectedEOF
  1153. }
  1154. b := dAtA[iNdEx]
  1155. iNdEx++
  1156. stringLenmapkey |= (uint64(b) & 0x7F) << shift
  1157. if b < 0x80 {
  1158. break
  1159. }
  1160. }
  1161. intStringLenmapkey := int(stringLenmapkey)
  1162. if intStringLenmapkey < 0 {
  1163. return ErrInvalidLengthApi
  1164. }
  1165. postStringIndexmapkey := iNdEx + intStringLenmapkey
  1166. if postStringIndexmapkey > l {
  1167. return io.ErrUnexpectedEOF
  1168. }
  1169. mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
  1170. iNdEx = postStringIndexmapkey
  1171. } else if fieldNum == 2 {
  1172. var stringLenmapvalue uint64
  1173. for shift := uint(0); ; shift += 7 {
  1174. if shift >= 64 {
  1175. return ErrIntOverflowApi
  1176. }
  1177. if iNdEx >= l {
  1178. return io.ErrUnexpectedEOF
  1179. }
  1180. b := dAtA[iNdEx]
  1181. iNdEx++
  1182. stringLenmapvalue |= (uint64(b) & 0x7F) << shift
  1183. if b < 0x80 {
  1184. break
  1185. }
  1186. }
  1187. intStringLenmapvalue := int(stringLenmapvalue)
  1188. if intStringLenmapvalue < 0 {
  1189. return ErrInvalidLengthApi
  1190. }
  1191. postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  1192. if postStringIndexmapvalue > l {
  1193. return io.ErrUnexpectedEOF
  1194. }
  1195. mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
  1196. iNdEx = postStringIndexmapvalue
  1197. } else {
  1198. iNdEx = entryPreIndex
  1199. skippy, err := skipApi(dAtA[iNdEx:])
  1200. if err != nil {
  1201. return err
  1202. }
  1203. if skippy < 0 {
  1204. return ErrInvalidLengthApi
  1205. }
  1206. if (iNdEx + skippy) > postIndex {
  1207. return io.ErrUnexpectedEOF
  1208. }
  1209. iNdEx += skippy
  1210. }
  1211. }
  1212. m.Message[mapkey] = mapvalue
  1213. iNdEx = postIndex
  1214. case 2:
  1215. if wireType != 2 {
  1216. return fmt.Errorf("proto: wrong wireType = %d for field List", wireType)
  1217. }
  1218. var msglen int
  1219. for shift := uint(0); ; shift += 7 {
  1220. if shift >= 64 {
  1221. return ErrIntOverflowApi
  1222. }
  1223. if iNdEx >= l {
  1224. return io.ErrUnexpectedEOF
  1225. }
  1226. b := dAtA[iNdEx]
  1227. iNdEx++
  1228. msglen |= (int(b) & 0x7F) << shift
  1229. if b < 0x80 {
  1230. break
  1231. }
  1232. }
  1233. if msglen < 0 {
  1234. return ErrInvalidLengthApi
  1235. }
  1236. postIndex := iNdEx + msglen
  1237. if postIndex > l {
  1238. return io.ErrUnexpectedEOF
  1239. }
  1240. m.List = append(m.List, &RecsysRecord{})
  1241. if err := m.List[len(m.List)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1242. return err
  1243. }
  1244. iNdEx = postIndex
  1245. default:
  1246. iNdEx = preIndex
  1247. skippy, err := skipApi(dAtA[iNdEx:])
  1248. if err != nil {
  1249. return err
  1250. }
  1251. if skippy < 0 {
  1252. return ErrInvalidLengthApi
  1253. }
  1254. if (iNdEx + skippy) > l {
  1255. return io.ErrUnexpectedEOF
  1256. }
  1257. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1258. iNdEx += skippy
  1259. }
  1260. }
  1261. if iNdEx > l {
  1262. return io.ErrUnexpectedEOF
  1263. }
  1264. return nil
  1265. }
  1266. func (m *RecsysRecord) Unmarshal(dAtA []byte) error {
  1267. l := len(dAtA)
  1268. iNdEx := 0
  1269. for iNdEx < l {
  1270. preIndex := iNdEx
  1271. var wire uint64
  1272. for shift := uint(0); ; shift += 7 {
  1273. if shift >= 64 {
  1274. return ErrIntOverflowApi
  1275. }
  1276. if iNdEx >= l {
  1277. return io.ErrUnexpectedEOF
  1278. }
  1279. b := dAtA[iNdEx]
  1280. iNdEx++
  1281. wire |= (uint64(b) & 0x7F) << shift
  1282. if b < 0x80 {
  1283. break
  1284. }
  1285. }
  1286. fieldNum := int32(wire >> 3)
  1287. wireType := int(wire & 0x7)
  1288. if wireType == 4 {
  1289. return fmt.Errorf("proto: RecsysRecord: wiretype end group for non-group")
  1290. }
  1291. if fieldNum <= 0 {
  1292. return fmt.Errorf("proto: RecsysRecord: illegal tag %d (wire type %d)", fieldNum, wire)
  1293. }
  1294. switch fieldNum {
  1295. case 1:
  1296. if wireType != 0 {
  1297. return fmt.Errorf("proto: wrong wireType = %d for field Svid", wireType)
  1298. }
  1299. m.Svid = 0
  1300. for shift := uint(0); ; shift += 7 {
  1301. if shift >= 64 {
  1302. return ErrIntOverflowApi
  1303. }
  1304. if iNdEx >= l {
  1305. return io.ErrUnexpectedEOF
  1306. }
  1307. b := dAtA[iNdEx]
  1308. iNdEx++
  1309. m.Svid |= (int64(b) & 0x7F) << shift
  1310. if b < 0x80 {
  1311. break
  1312. }
  1313. }
  1314. case 2:
  1315. if wireType != 1 {
  1316. return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType)
  1317. }
  1318. var v uint64
  1319. if (iNdEx + 8) > l {
  1320. return io.ErrUnexpectedEOF
  1321. }
  1322. v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1323. iNdEx += 8
  1324. m.Score = float64(math.Float64frombits(v))
  1325. case 3:
  1326. if wireType != 2 {
  1327. return fmt.Errorf("proto: wrong wireType = %d for field Map", wireType)
  1328. }
  1329. var msglen int
  1330. for shift := uint(0); ; shift += 7 {
  1331. if shift >= 64 {
  1332. return ErrIntOverflowApi
  1333. }
  1334. if iNdEx >= l {
  1335. return io.ErrUnexpectedEOF
  1336. }
  1337. b := dAtA[iNdEx]
  1338. iNdEx++
  1339. msglen |= (int(b) & 0x7F) << shift
  1340. if b < 0x80 {
  1341. break
  1342. }
  1343. }
  1344. if msglen < 0 {
  1345. return ErrInvalidLengthApi
  1346. }
  1347. postIndex := iNdEx + msglen
  1348. if postIndex > l {
  1349. return io.ErrUnexpectedEOF
  1350. }
  1351. if m.Map == nil {
  1352. m.Map = make(map[string]string)
  1353. }
  1354. var mapkey string
  1355. var mapvalue string
  1356. for iNdEx < postIndex {
  1357. entryPreIndex := iNdEx
  1358. var wire uint64
  1359. for shift := uint(0); ; shift += 7 {
  1360. if shift >= 64 {
  1361. return ErrIntOverflowApi
  1362. }
  1363. if iNdEx >= l {
  1364. return io.ErrUnexpectedEOF
  1365. }
  1366. b := dAtA[iNdEx]
  1367. iNdEx++
  1368. wire |= (uint64(b) & 0x7F) << shift
  1369. if b < 0x80 {
  1370. break
  1371. }
  1372. }
  1373. fieldNum := int32(wire >> 3)
  1374. if fieldNum == 1 {
  1375. var stringLenmapkey uint64
  1376. for shift := uint(0); ; shift += 7 {
  1377. if shift >= 64 {
  1378. return ErrIntOverflowApi
  1379. }
  1380. if iNdEx >= l {
  1381. return io.ErrUnexpectedEOF
  1382. }
  1383. b := dAtA[iNdEx]
  1384. iNdEx++
  1385. stringLenmapkey |= (uint64(b) & 0x7F) << shift
  1386. if b < 0x80 {
  1387. break
  1388. }
  1389. }
  1390. intStringLenmapkey := int(stringLenmapkey)
  1391. if intStringLenmapkey < 0 {
  1392. return ErrInvalidLengthApi
  1393. }
  1394. postStringIndexmapkey := iNdEx + intStringLenmapkey
  1395. if postStringIndexmapkey > l {
  1396. return io.ErrUnexpectedEOF
  1397. }
  1398. mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
  1399. iNdEx = postStringIndexmapkey
  1400. } else if fieldNum == 2 {
  1401. var stringLenmapvalue uint64
  1402. for shift := uint(0); ; shift += 7 {
  1403. if shift >= 64 {
  1404. return ErrIntOverflowApi
  1405. }
  1406. if iNdEx >= l {
  1407. return io.ErrUnexpectedEOF
  1408. }
  1409. b := dAtA[iNdEx]
  1410. iNdEx++
  1411. stringLenmapvalue |= (uint64(b) & 0x7F) << shift
  1412. if b < 0x80 {
  1413. break
  1414. }
  1415. }
  1416. intStringLenmapvalue := int(stringLenmapvalue)
  1417. if intStringLenmapvalue < 0 {
  1418. return ErrInvalidLengthApi
  1419. }
  1420. postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  1421. if postStringIndexmapvalue > l {
  1422. return io.ErrUnexpectedEOF
  1423. }
  1424. mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
  1425. iNdEx = postStringIndexmapvalue
  1426. } else {
  1427. iNdEx = entryPreIndex
  1428. skippy, err := skipApi(dAtA[iNdEx:])
  1429. if err != nil {
  1430. return err
  1431. }
  1432. if skippy < 0 {
  1433. return ErrInvalidLengthApi
  1434. }
  1435. if (iNdEx + skippy) > postIndex {
  1436. return io.ErrUnexpectedEOF
  1437. }
  1438. iNdEx += skippy
  1439. }
  1440. }
  1441. m.Map[mapkey] = mapvalue
  1442. iNdEx = postIndex
  1443. default:
  1444. iNdEx = preIndex
  1445. skippy, err := skipApi(dAtA[iNdEx:])
  1446. if err != nil {
  1447. return err
  1448. }
  1449. if skippy < 0 {
  1450. return ErrInvalidLengthApi
  1451. }
  1452. if (iNdEx + skippy) > l {
  1453. return io.ErrUnexpectedEOF
  1454. }
  1455. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1456. iNdEx += skippy
  1457. }
  1458. }
  1459. if iNdEx > l {
  1460. return io.ErrUnexpectedEOF
  1461. }
  1462. return nil
  1463. }
  1464. func skipApi(dAtA []byte) (n int, err error) {
  1465. l := len(dAtA)
  1466. iNdEx := 0
  1467. for iNdEx < l {
  1468. var wire uint64
  1469. for shift := uint(0); ; shift += 7 {
  1470. if shift >= 64 {
  1471. return 0, ErrIntOverflowApi
  1472. }
  1473. if iNdEx >= l {
  1474. return 0, io.ErrUnexpectedEOF
  1475. }
  1476. b := dAtA[iNdEx]
  1477. iNdEx++
  1478. wire |= (uint64(b) & 0x7F) << shift
  1479. if b < 0x80 {
  1480. break
  1481. }
  1482. }
  1483. wireType := int(wire & 0x7)
  1484. switch wireType {
  1485. case 0:
  1486. for shift := uint(0); ; shift += 7 {
  1487. if shift >= 64 {
  1488. return 0, ErrIntOverflowApi
  1489. }
  1490. if iNdEx >= l {
  1491. return 0, io.ErrUnexpectedEOF
  1492. }
  1493. iNdEx++
  1494. if dAtA[iNdEx-1] < 0x80 {
  1495. break
  1496. }
  1497. }
  1498. return iNdEx, nil
  1499. case 1:
  1500. iNdEx += 8
  1501. return iNdEx, nil
  1502. case 2:
  1503. var length int
  1504. for shift := uint(0); ; shift += 7 {
  1505. if shift >= 64 {
  1506. return 0, ErrIntOverflowApi
  1507. }
  1508. if iNdEx >= l {
  1509. return 0, io.ErrUnexpectedEOF
  1510. }
  1511. b := dAtA[iNdEx]
  1512. iNdEx++
  1513. length |= (int(b) & 0x7F) << shift
  1514. if b < 0x80 {
  1515. break
  1516. }
  1517. }
  1518. iNdEx += length
  1519. if length < 0 {
  1520. return 0, ErrInvalidLengthApi
  1521. }
  1522. return iNdEx, nil
  1523. case 3:
  1524. for {
  1525. var innerWire uint64
  1526. var start int = iNdEx
  1527. for shift := uint(0); ; shift += 7 {
  1528. if shift >= 64 {
  1529. return 0, ErrIntOverflowApi
  1530. }
  1531. if iNdEx >= l {
  1532. return 0, io.ErrUnexpectedEOF
  1533. }
  1534. b := dAtA[iNdEx]
  1535. iNdEx++
  1536. innerWire |= (uint64(b) & 0x7F) << shift
  1537. if b < 0x80 {
  1538. break
  1539. }
  1540. }
  1541. innerWireType := int(innerWire & 0x7)
  1542. if innerWireType == 4 {
  1543. break
  1544. }
  1545. next, err := skipApi(dAtA[start:])
  1546. if err != nil {
  1547. return 0, err
  1548. }
  1549. iNdEx = start + next
  1550. }
  1551. return iNdEx, nil
  1552. case 4:
  1553. return iNdEx, nil
  1554. case 5:
  1555. iNdEx += 4
  1556. return iNdEx, nil
  1557. default:
  1558. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1559. }
  1560. }
  1561. panic("unreachable")
  1562. }
  1563. var (
  1564. ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
  1565. ErrIntOverflowApi = fmt.Errorf("proto: integer overflow")
  1566. )