model.pb.go 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: model.proto
  3. /*
  4. Package model is a generated protocol buffer package.
  5. It is generated from these files:
  6. model.proto
  7. It has these top-level messages:
  8. IdentifyInfo
  9. */
  10. package model
  11. import proto "github.com/golang/protobuf/proto"
  12. import fmt "fmt"
  13. import math "math"
  14. import _ "github.com/gogo/protobuf/gogoproto"
  15. import io "io"
  16. // Reference imports to suppress errors if they are not otherwise used.
  17. var _ = proto.Marshal
  18. var _ = fmt.Errorf
  19. var _ = math.Inf
  20. // This is a compile-time assertion to ensure that this generated file
  21. // is compatible with the proto package it is being compiled against.
  22. // A compilation error at this line likely means your copy of the
  23. // proto package needs to be updated.
  24. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  25. // result of http identify info.
  26. type IdentifyInfo struct {
  27. Mid int64 `protobuf:"varint,1,opt,name=mid,proto3" json:"mid"`
  28. Csrf string `protobuf:"bytes,2,opt,name=csrf,proto3" json:"csrfToken"`
  29. Expires int32 `protobuf:"varint,3,opt,name=expires,proto3" json:"expires"`
  30. }
  31. func (m *IdentifyInfo) Reset() { *m = IdentifyInfo{} }
  32. func (m *IdentifyInfo) String() string { return proto.CompactTextString(m) }
  33. func (*IdentifyInfo) ProtoMessage() {}
  34. func (*IdentifyInfo) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{0} }
  35. func (m *IdentifyInfo) GetMid() int64 {
  36. if m != nil {
  37. return m.Mid
  38. }
  39. return 0
  40. }
  41. func (m *IdentifyInfo) GetCsrf() string {
  42. if m != nil {
  43. return m.Csrf
  44. }
  45. return ""
  46. }
  47. func (m *IdentifyInfo) GetExpires() int32 {
  48. if m != nil {
  49. return m.Expires
  50. }
  51. return 0
  52. }
  53. func init() {
  54. proto.RegisterType((*IdentifyInfo)(nil), "passport.service.identify.IdentifyInfo")
  55. }
  56. func (m *IdentifyInfo) Marshal() (dAtA []byte, err error) {
  57. size := m.Size()
  58. dAtA = make([]byte, size)
  59. n, err := m.MarshalTo(dAtA)
  60. if err != nil {
  61. return nil, err
  62. }
  63. return dAtA[:n], nil
  64. }
  65. func (m *IdentifyInfo) MarshalTo(dAtA []byte) (int, error) {
  66. var i int
  67. _ = i
  68. var l int
  69. _ = l
  70. if m.Mid != 0 {
  71. dAtA[i] = 0x8
  72. i++
  73. i = encodeVarintModel(dAtA, i, uint64(m.Mid))
  74. }
  75. if len(m.Csrf) > 0 {
  76. dAtA[i] = 0x12
  77. i++
  78. i = encodeVarintModel(dAtA, i, uint64(len(m.Csrf)))
  79. i += copy(dAtA[i:], m.Csrf)
  80. }
  81. if m.Expires != 0 {
  82. dAtA[i] = 0x18
  83. i++
  84. i = encodeVarintModel(dAtA, i, uint64(m.Expires))
  85. }
  86. return i, nil
  87. }
  88. func encodeVarintModel(dAtA []byte, offset int, v uint64) int {
  89. for v >= 1<<7 {
  90. dAtA[offset] = uint8(v&0x7f | 0x80)
  91. v >>= 7
  92. offset++
  93. }
  94. dAtA[offset] = uint8(v)
  95. return offset + 1
  96. }
  97. func (m *IdentifyInfo) Size() (n int) {
  98. var l int
  99. _ = l
  100. if m.Mid != 0 {
  101. n += 1 + sovModel(uint64(m.Mid))
  102. }
  103. l = len(m.Csrf)
  104. if l > 0 {
  105. n += 1 + l + sovModel(uint64(l))
  106. }
  107. if m.Expires != 0 {
  108. n += 1 + sovModel(uint64(m.Expires))
  109. }
  110. return n
  111. }
  112. func sovModel(x uint64) (n int) {
  113. for {
  114. n++
  115. x >>= 7
  116. if x == 0 {
  117. break
  118. }
  119. }
  120. return n
  121. }
  122. func sozModel(x uint64) (n int) {
  123. return sovModel(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  124. }
  125. func (m *IdentifyInfo) Unmarshal(dAtA []byte) error {
  126. l := len(dAtA)
  127. iNdEx := 0
  128. for iNdEx < l {
  129. preIndex := iNdEx
  130. var wire uint64
  131. for shift := uint(0); ; shift += 7 {
  132. if shift >= 64 {
  133. return ErrIntOverflowModel
  134. }
  135. if iNdEx >= l {
  136. return io.ErrUnexpectedEOF
  137. }
  138. b := dAtA[iNdEx]
  139. iNdEx++
  140. wire |= (uint64(b) & 0x7F) << shift
  141. if b < 0x80 {
  142. break
  143. }
  144. }
  145. fieldNum := int32(wire >> 3)
  146. wireType := int(wire & 0x7)
  147. if wireType == 4 {
  148. return fmt.Errorf("proto: IdentifyInfo: wiretype end group for non-group")
  149. }
  150. if fieldNum <= 0 {
  151. return fmt.Errorf("proto: IdentifyInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  152. }
  153. switch fieldNum {
  154. case 1:
  155. if wireType != 0 {
  156. return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
  157. }
  158. m.Mid = 0
  159. for shift := uint(0); ; shift += 7 {
  160. if shift >= 64 {
  161. return ErrIntOverflowModel
  162. }
  163. if iNdEx >= l {
  164. return io.ErrUnexpectedEOF
  165. }
  166. b := dAtA[iNdEx]
  167. iNdEx++
  168. m.Mid |= (int64(b) & 0x7F) << shift
  169. if b < 0x80 {
  170. break
  171. }
  172. }
  173. case 2:
  174. if wireType != 2 {
  175. return fmt.Errorf("proto: wrong wireType = %d for field Csrf", wireType)
  176. }
  177. var stringLen uint64
  178. for shift := uint(0); ; shift += 7 {
  179. if shift >= 64 {
  180. return ErrIntOverflowModel
  181. }
  182. if iNdEx >= l {
  183. return io.ErrUnexpectedEOF
  184. }
  185. b := dAtA[iNdEx]
  186. iNdEx++
  187. stringLen |= (uint64(b) & 0x7F) << shift
  188. if b < 0x80 {
  189. break
  190. }
  191. }
  192. intStringLen := int(stringLen)
  193. if intStringLen < 0 {
  194. return ErrInvalidLengthModel
  195. }
  196. postIndex := iNdEx + intStringLen
  197. if postIndex > l {
  198. return io.ErrUnexpectedEOF
  199. }
  200. m.Csrf = string(dAtA[iNdEx:postIndex])
  201. iNdEx = postIndex
  202. case 3:
  203. if wireType != 0 {
  204. return fmt.Errorf("proto: wrong wireType = %d for field Expires", wireType)
  205. }
  206. m.Expires = 0
  207. for shift := uint(0); ; shift += 7 {
  208. if shift >= 64 {
  209. return ErrIntOverflowModel
  210. }
  211. if iNdEx >= l {
  212. return io.ErrUnexpectedEOF
  213. }
  214. b := dAtA[iNdEx]
  215. iNdEx++
  216. m.Expires |= (int32(b) & 0x7F) << shift
  217. if b < 0x80 {
  218. break
  219. }
  220. }
  221. default:
  222. iNdEx = preIndex
  223. skippy, err := skipModel(dAtA[iNdEx:])
  224. if err != nil {
  225. return err
  226. }
  227. if skippy < 0 {
  228. return ErrInvalidLengthModel
  229. }
  230. if (iNdEx + skippy) > l {
  231. return io.ErrUnexpectedEOF
  232. }
  233. iNdEx += skippy
  234. }
  235. }
  236. if iNdEx > l {
  237. return io.ErrUnexpectedEOF
  238. }
  239. return nil
  240. }
  241. func skipModel(dAtA []byte) (n int, err error) {
  242. l := len(dAtA)
  243. iNdEx := 0
  244. for iNdEx < l {
  245. var wire uint64
  246. for shift := uint(0); ; shift += 7 {
  247. if shift >= 64 {
  248. return 0, ErrIntOverflowModel
  249. }
  250. if iNdEx >= l {
  251. return 0, io.ErrUnexpectedEOF
  252. }
  253. b := dAtA[iNdEx]
  254. iNdEx++
  255. wire |= (uint64(b) & 0x7F) << shift
  256. if b < 0x80 {
  257. break
  258. }
  259. }
  260. wireType := int(wire & 0x7)
  261. switch wireType {
  262. case 0:
  263. for shift := uint(0); ; shift += 7 {
  264. if shift >= 64 {
  265. return 0, ErrIntOverflowModel
  266. }
  267. if iNdEx >= l {
  268. return 0, io.ErrUnexpectedEOF
  269. }
  270. iNdEx++
  271. if dAtA[iNdEx-1] < 0x80 {
  272. break
  273. }
  274. }
  275. return iNdEx, nil
  276. case 1:
  277. iNdEx += 8
  278. return iNdEx, nil
  279. case 2:
  280. var length int
  281. for shift := uint(0); ; shift += 7 {
  282. if shift >= 64 {
  283. return 0, ErrIntOverflowModel
  284. }
  285. if iNdEx >= l {
  286. return 0, io.ErrUnexpectedEOF
  287. }
  288. b := dAtA[iNdEx]
  289. iNdEx++
  290. length |= (int(b) & 0x7F) << shift
  291. if b < 0x80 {
  292. break
  293. }
  294. }
  295. iNdEx += length
  296. if length < 0 {
  297. return 0, ErrInvalidLengthModel
  298. }
  299. return iNdEx, nil
  300. case 3:
  301. for {
  302. var innerWire uint64
  303. var start int = iNdEx
  304. for shift := uint(0); ; shift += 7 {
  305. if shift >= 64 {
  306. return 0, ErrIntOverflowModel
  307. }
  308. if iNdEx >= l {
  309. return 0, io.ErrUnexpectedEOF
  310. }
  311. b := dAtA[iNdEx]
  312. iNdEx++
  313. innerWire |= (uint64(b) & 0x7F) << shift
  314. if b < 0x80 {
  315. break
  316. }
  317. }
  318. innerWireType := int(innerWire & 0x7)
  319. if innerWireType == 4 {
  320. break
  321. }
  322. next, err := skipModel(dAtA[start:])
  323. if err != nil {
  324. return 0, err
  325. }
  326. iNdEx = start + next
  327. }
  328. return iNdEx, nil
  329. case 4:
  330. return iNdEx, nil
  331. case 5:
  332. iNdEx += 4
  333. return iNdEx, nil
  334. default:
  335. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  336. }
  337. }
  338. panic("unreachable")
  339. }
  340. var (
  341. ErrInvalidLengthModel = fmt.Errorf("proto: negative length found during unmarshaling")
  342. ErrIntOverflowModel = fmt.Errorf("proto: integer overflow")
  343. )
  344. func init() { proto.RegisterFile("model.proto", fileDescriptorModel) }
  345. var fileDescriptorModel = []byte{
  346. // 213 bytes of a gzipped FileDescriptorProto
  347. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0xcd, 0x4f, 0x49,
  348. 0xcd, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x2c, 0x48, 0x2c, 0x2e, 0x2e, 0xc8, 0x2f,
  349. 0x2a, 0xd1, 0x2b, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0xcb, 0x4c, 0x49, 0xcd, 0x2b, 0xc9,
  350. 0x4c, 0xab, 0x94, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f,
  351. 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0xeb, 0x48, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0x62,
  352. 0x92, 0x52, 0x31, 0x17, 0x8f, 0x27, 0x54, 0xab, 0x67, 0x5e, 0x5a, 0xbe, 0x90, 0x24, 0x17, 0x73,
  353. 0x6e, 0x66, 0x8a, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb3, 0x13, 0xfb, 0xab, 0x7b, 0xf2, 0x20, 0x6e,
  354. 0x10, 0x88, 0x10, 0x52, 0xe4, 0x62, 0x49, 0x2e, 0x2e, 0x4a, 0x93, 0x60, 0x52, 0x60, 0xd4, 0xe0,
  355. 0x74, 0xe2, 0x7d, 0x75, 0x4f, 0x9e, 0x13, 0xc4, 0x0f, 0xc9, 0xcf, 0x4e, 0xcd, 0x0b, 0x02, 0x4b,
  356. 0x09, 0xa9, 0x72, 0xb1, 0xa7, 0x56, 0x14, 0x64, 0x16, 0xa5, 0x16, 0x4b, 0x30, 0x2b, 0x30, 0x6a,
  357. 0xb0, 0x3a, 0x71, 0xbf, 0xba, 0x27, 0x0f, 0x13, 0x0a, 0x82, 0x31, 0x9c, 0xc4, 0x4f, 0x3c, 0x92,
  358. 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x19, 0x8f, 0xe5, 0x18, 0xa2, 0x58,
  359. 0xc1, 0xbe, 0x4b, 0x62, 0x03, 0x3b, 0xca, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x73, 0x88, 0x08,
  360. 0x23, 0xed, 0x00, 0x00, 0x00,
  361. }