sns.pb.go 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: sns.proto
  3. /*
  4. Package model is a generated protocol buffer package.
  5. It is generated from these files:
  6. sns.proto
  7. It has these top-level messages:
  8. SnsProto
  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. type SnsProto struct {
  26. Mid int64 `protobuf:"varint,1,opt,name=Mid,proto3" json:"mid"`
  27. UnionID string `protobuf:"bytes,2,opt,name=UnionID,proto3" json:"unionid"`
  28. Platform int32 `protobuf:"varint,3,opt,name=Platform,proto3" json:"platform"`
  29. Expires int64 `protobuf:"varint,4,opt,name=Expires,proto3" json:"expires"`
  30. }
  31. func (m *SnsProto) Reset() { *m = SnsProto{} }
  32. func (m *SnsProto) String() string { return proto.CompactTextString(m) }
  33. func (*SnsProto) ProtoMessage() {}
  34. func (*SnsProto) Descriptor() ([]byte, []int) { return fileDescriptorSns, []int{0} }
  35. func (m *SnsProto) GetMid() int64 {
  36. if m != nil {
  37. return m.Mid
  38. }
  39. return 0
  40. }
  41. func (m *SnsProto) GetUnionID() string {
  42. if m != nil {
  43. return m.UnionID
  44. }
  45. return ""
  46. }
  47. func (m *SnsProto) GetPlatform() int32 {
  48. if m != nil {
  49. return m.Platform
  50. }
  51. return 0
  52. }
  53. func (m *SnsProto) GetExpires() int64 {
  54. if m != nil {
  55. return m.Expires
  56. }
  57. return 0
  58. }
  59. func init() {
  60. proto.RegisterType((*SnsProto)(nil), "passport.service.sns.SnsProto")
  61. }
  62. func (m *SnsProto) Marshal() (dAtA []byte, err error) {
  63. size := m.Size()
  64. dAtA = make([]byte, size)
  65. n, err := m.MarshalTo(dAtA)
  66. if err != nil {
  67. return nil, err
  68. }
  69. return dAtA[:n], nil
  70. }
  71. func (m *SnsProto) MarshalTo(dAtA []byte) (int, error) {
  72. var i int
  73. _ = i
  74. var l int
  75. _ = l
  76. if m.Mid != 0 {
  77. dAtA[i] = 0x8
  78. i++
  79. i = encodeVarintSns(dAtA, i, uint64(m.Mid))
  80. }
  81. if len(m.UnionID) > 0 {
  82. dAtA[i] = 0x12
  83. i++
  84. i = encodeVarintSns(dAtA, i, uint64(len(m.UnionID)))
  85. i += copy(dAtA[i:], m.UnionID)
  86. }
  87. if m.Platform != 0 {
  88. dAtA[i] = 0x18
  89. i++
  90. i = encodeVarintSns(dAtA, i, uint64(m.Platform))
  91. }
  92. if m.Expires != 0 {
  93. dAtA[i] = 0x20
  94. i++
  95. i = encodeVarintSns(dAtA, i, uint64(m.Expires))
  96. }
  97. return i, nil
  98. }
  99. func encodeVarintSns(dAtA []byte, offset int, v uint64) int {
  100. for v >= 1<<7 {
  101. dAtA[offset] = uint8(v&0x7f | 0x80)
  102. v >>= 7
  103. offset++
  104. }
  105. dAtA[offset] = uint8(v)
  106. return offset + 1
  107. }
  108. func (m *SnsProto) Size() (n int) {
  109. var l int
  110. _ = l
  111. if m.Mid != 0 {
  112. n += 1 + sovSns(uint64(m.Mid))
  113. }
  114. l = len(m.UnionID)
  115. if l > 0 {
  116. n += 1 + l + sovSns(uint64(l))
  117. }
  118. if m.Platform != 0 {
  119. n += 1 + sovSns(uint64(m.Platform))
  120. }
  121. if m.Expires != 0 {
  122. n += 1 + sovSns(uint64(m.Expires))
  123. }
  124. return n
  125. }
  126. func sovSns(x uint64) (n int) {
  127. for {
  128. n++
  129. x >>= 7
  130. if x == 0 {
  131. break
  132. }
  133. }
  134. return n
  135. }
  136. func sozSns(x uint64) (n int) {
  137. return sovSns(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  138. }
  139. func (m *SnsProto) Unmarshal(dAtA []byte) error {
  140. l := len(dAtA)
  141. iNdEx := 0
  142. for iNdEx < l {
  143. preIndex := iNdEx
  144. var wire uint64
  145. for shift := uint(0); ; shift += 7 {
  146. if shift >= 64 {
  147. return ErrIntOverflowSns
  148. }
  149. if iNdEx >= l {
  150. return io.ErrUnexpectedEOF
  151. }
  152. b := dAtA[iNdEx]
  153. iNdEx++
  154. wire |= (uint64(b) & 0x7F) << shift
  155. if b < 0x80 {
  156. break
  157. }
  158. }
  159. fieldNum := int32(wire >> 3)
  160. wireType := int(wire & 0x7)
  161. if wireType == 4 {
  162. return fmt.Errorf("proto: SnsProto: wiretype end group for non-group")
  163. }
  164. if fieldNum <= 0 {
  165. return fmt.Errorf("proto: SnsProto: illegal tag %d (wire type %d)", fieldNum, wire)
  166. }
  167. switch fieldNum {
  168. case 1:
  169. if wireType != 0 {
  170. return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
  171. }
  172. m.Mid = 0
  173. for shift := uint(0); ; shift += 7 {
  174. if shift >= 64 {
  175. return ErrIntOverflowSns
  176. }
  177. if iNdEx >= l {
  178. return io.ErrUnexpectedEOF
  179. }
  180. b := dAtA[iNdEx]
  181. iNdEx++
  182. m.Mid |= (int64(b) & 0x7F) << shift
  183. if b < 0x80 {
  184. break
  185. }
  186. }
  187. case 2:
  188. if wireType != 2 {
  189. return fmt.Errorf("proto: wrong wireType = %d for field UnionID", wireType)
  190. }
  191. var stringLen uint64
  192. for shift := uint(0); ; shift += 7 {
  193. if shift >= 64 {
  194. return ErrIntOverflowSns
  195. }
  196. if iNdEx >= l {
  197. return io.ErrUnexpectedEOF
  198. }
  199. b := dAtA[iNdEx]
  200. iNdEx++
  201. stringLen |= (uint64(b) & 0x7F) << shift
  202. if b < 0x80 {
  203. break
  204. }
  205. }
  206. intStringLen := int(stringLen)
  207. if intStringLen < 0 {
  208. return ErrInvalidLengthSns
  209. }
  210. postIndex := iNdEx + intStringLen
  211. if postIndex > l {
  212. return io.ErrUnexpectedEOF
  213. }
  214. m.UnionID = string(dAtA[iNdEx:postIndex])
  215. iNdEx = postIndex
  216. case 3:
  217. if wireType != 0 {
  218. return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType)
  219. }
  220. m.Platform = 0
  221. for shift := uint(0); ; shift += 7 {
  222. if shift >= 64 {
  223. return ErrIntOverflowSns
  224. }
  225. if iNdEx >= l {
  226. return io.ErrUnexpectedEOF
  227. }
  228. b := dAtA[iNdEx]
  229. iNdEx++
  230. m.Platform |= (int32(b) & 0x7F) << shift
  231. if b < 0x80 {
  232. break
  233. }
  234. }
  235. case 4:
  236. if wireType != 0 {
  237. return fmt.Errorf("proto: wrong wireType = %d for field Expires", wireType)
  238. }
  239. m.Expires = 0
  240. for shift := uint(0); ; shift += 7 {
  241. if shift >= 64 {
  242. return ErrIntOverflowSns
  243. }
  244. if iNdEx >= l {
  245. return io.ErrUnexpectedEOF
  246. }
  247. b := dAtA[iNdEx]
  248. iNdEx++
  249. m.Expires |= (int64(b) & 0x7F) << shift
  250. if b < 0x80 {
  251. break
  252. }
  253. }
  254. default:
  255. iNdEx = preIndex
  256. skippy, err := skipSns(dAtA[iNdEx:])
  257. if err != nil {
  258. return err
  259. }
  260. if skippy < 0 {
  261. return ErrInvalidLengthSns
  262. }
  263. if (iNdEx + skippy) > l {
  264. return io.ErrUnexpectedEOF
  265. }
  266. iNdEx += skippy
  267. }
  268. }
  269. if iNdEx > l {
  270. return io.ErrUnexpectedEOF
  271. }
  272. return nil
  273. }
  274. func skipSns(dAtA []byte) (n int, err error) {
  275. l := len(dAtA)
  276. iNdEx := 0
  277. for iNdEx < l {
  278. var wire uint64
  279. for shift := uint(0); ; shift += 7 {
  280. if shift >= 64 {
  281. return 0, ErrIntOverflowSns
  282. }
  283. if iNdEx >= l {
  284. return 0, io.ErrUnexpectedEOF
  285. }
  286. b := dAtA[iNdEx]
  287. iNdEx++
  288. wire |= (uint64(b) & 0x7F) << shift
  289. if b < 0x80 {
  290. break
  291. }
  292. }
  293. wireType := int(wire & 0x7)
  294. switch wireType {
  295. case 0:
  296. for shift := uint(0); ; shift += 7 {
  297. if shift >= 64 {
  298. return 0, ErrIntOverflowSns
  299. }
  300. if iNdEx >= l {
  301. return 0, io.ErrUnexpectedEOF
  302. }
  303. iNdEx++
  304. if dAtA[iNdEx-1] < 0x80 {
  305. break
  306. }
  307. }
  308. return iNdEx, nil
  309. case 1:
  310. iNdEx += 8
  311. return iNdEx, nil
  312. case 2:
  313. var length int
  314. for shift := uint(0); ; shift += 7 {
  315. if shift >= 64 {
  316. return 0, ErrIntOverflowSns
  317. }
  318. if iNdEx >= l {
  319. return 0, io.ErrUnexpectedEOF
  320. }
  321. b := dAtA[iNdEx]
  322. iNdEx++
  323. length |= (int(b) & 0x7F) << shift
  324. if b < 0x80 {
  325. break
  326. }
  327. }
  328. iNdEx += length
  329. if length < 0 {
  330. return 0, ErrInvalidLengthSns
  331. }
  332. return iNdEx, nil
  333. case 3:
  334. for {
  335. var innerWire uint64
  336. var start int = iNdEx
  337. for shift := uint(0); ; shift += 7 {
  338. if shift >= 64 {
  339. return 0, ErrIntOverflowSns
  340. }
  341. if iNdEx >= l {
  342. return 0, io.ErrUnexpectedEOF
  343. }
  344. b := dAtA[iNdEx]
  345. iNdEx++
  346. innerWire |= (uint64(b) & 0x7F) << shift
  347. if b < 0x80 {
  348. break
  349. }
  350. }
  351. innerWireType := int(innerWire & 0x7)
  352. if innerWireType == 4 {
  353. break
  354. }
  355. next, err := skipSns(dAtA[start:])
  356. if err != nil {
  357. return 0, err
  358. }
  359. iNdEx = start + next
  360. }
  361. return iNdEx, nil
  362. case 4:
  363. return iNdEx, nil
  364. case 5:
  365. iNdEx += 4
  366. return iNdEx, nil
  367. default:
  368. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  369. }
  370. }
  371. panic("unreachable")
  372. }
  373. var (
  374. ErrInvalidLengthSns = fmt.Errorf("proto: negative length found during unmarshaling")
  375. ErrIntOverflowSns = fmt.Errorf("proto: integer overflow")
  376. )
  377. func init() { proto.RegisterFile("sns.proto", fileDescriptorSns) }
  378. var fileDescriptorSns = []byte{
  379. // 236 bytes of a gzipped FileDescriptorProto
  380. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2c, 0xce, 0x2b, 0xd6,
  381. 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x29, 0x48, 0x2c, 0x2e, 0x2e, 0xc8, 0x2f, 0x2a, 0xd1,
  382. 0x2b, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0xce, 0x2b, 0x96, 0xd2, 0x4d, 0xcf, 0x2c,
  383. 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x4e,
  384. 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0x88, 0xd2, 0x5c, 0x46, 0x2e, 0x8e, 0xe0,
  385. 0xbc, 0xe2, 0x00, 0xb0, 0x89, 0x92, 0x5c, 0xcc, 0xbe, 0x99, 0x29, 0x12, 0x8c, 0x0a, 0x8c, 0x1a,
  386. 0xcc, 0x4e, 0xec, 0xaf, 0xee, 0xc9, 0x33, 0xe7, 0x66, 0xa6, 0x04, 0x81, 0xc4, 0x84, 0x54, 0xb9,
  387. 0xd8, 0x43, 0xf3, 0x32, 0xf3, 0xf3, 0x3c, 0x5d, 0x24, 0x98, 0x14, 0x18, 0x35, 0x38, 0x9d, 0xb8,
  388. 0x5f, 0xdd, 0x93, 0x67, 0x2f, 0x05, 0x09, 0x65, 0xa6, 0x04, 0xc1, 0xe4, 0x84, 0x34, 0xb8, 0x38,
  389. 0x02, 0x72, 0x12, 0x4b, 0xd2, 0xf2, 0x8b, 0x72, 0x25, 0x98, 0x15, 0x18, 0x35, 0x58, 0x9d, 0x78,
  390. 0x5e, 0xdd, 0x93, 0xe7, 0x28, 0x80, 0x8a, 0x05, 0xc1, 0x65, 0x41, 0x06, 0xba, 0x56, 0x14, 0x64,
  391. 0x16, 0xa5, 0x16, 0x4b, 0xb0, 0x80, 0xed, 0x03, 0x1b, 0x98, 0x0a, 0x11, 0x0a, 0x82, 0xc9, 0x39,
  392. 0x89, 0x9f, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x33, 0x1e,
  393. 0xcb, 0x31, 0x44, 0xb1, 0xe6, 0xe6, 0xa7, 0xa4, 0xe6, 0x24, 0xb1, 0x81, 0xdd, 0x6f, 0x0c, 0x08,
  394. 0x00, 0x00, 0xff, 0xff, 0xdb, 0x0a, 0x19, 0x68, 0x11, 0x01, 0x00, 0x00,
  395. }