test.pb.go 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: library/net/http/blademaster/tests/test.proto
  3. /*
  4. Package tests is a generated protocol buffer package.
  5. It is generated from these files:
  6. library/net/http/blademaster/tests/test.proto
  7. It has these top-level messages:
  8. Time
  9. BvcResponseMsg
  10. */
  11. package tests
  12. import proto "github.com/gogo/protobuf/proto"
  13. import fmt "fmt"
  14. import math "math"
  15. import _ "github.com/gogo/protobuf/gogoproto"
  16. import io "io"
  17. // Reference imports to suppress errors if they are not otherwise used.
  18. var _ = proto.Marshal
  19. var _ = fmt.Errorf
  20. var _ = math.Inf
  21. // This is a compile-time assertion to ensure that this generated file
  22. // is compatible with the proto package it is being compiled against.
  23. // A compilation error at this line likely means your copy of the
  24. // proto package needs to be updated.
  25. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  26. type Time struct {
  27. Now int64 `protobuf:"varint,1,opt,name=Now,proto3" json:"Now,omitempty"`
  28. }
  29. func (m *Time) Reset() { *m = Time{} }
  30. func (m *Time) String() string { return proto.CompactTextString(m) }
  31. func (*Time) ProtoMessage() {}
  32. func (*Time) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{0} }
  33. func (m *Time) GetNow() int64 {
  34. if m != nil {
  35. return m.Now
  36. }
  37. return 0
  38. }
  39. type BvcResponseMsg struct {
  40. Code int64 `protobuf:"varint,1,opt,name=code,proto3,casttype=int64" json:"code"`
  41. }
  42. func (m *BvcResponseMsg) Reset() { *m = BvcResponseMsg{} }
  43. func (m *BvcResponseMsg) String() string { return proto.CompactTextString(m) }
  44. func (*BvcResponseMsg) ProtoMessage() {}
  45. func (*BvcResponseMsg) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{1} }
  46. func (m *BvcResponseMsg) GetCode() int64 {
  47. if m != nil {
  48. return m.Code
  49. }
  50. return 0
  51. }
  52. func init() {
  53. proto.RegisterType((*Time)(nil), "tests.Time")
  54. proto.RegisterType((*BvcResponseMsg)(nil), "tests.BvcResponseMsg")
  55. }
  56. func (m *Time) 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 *Time) MarshalTo(dAtA []byte) (int, error) {
  66. var i int
  67. _ = i
  68. var l int
  69. _ = l
  70. if m.Now != 0 {
  71. dAtA[i] = 0x8
  72. i++
  73. i = encodeVarintTest(dAtA, i, uint64(m.Now))
  74. }
  75. return i, nil
  76. }
  77. func (m *BvcResponseMsg) Marshal() (dAtA []byte, err error) {
  78. size := m.Size()
  79. dAtA = make([]byte, size)
  80. n, err := m.MarshalTo(dAtA)
  81. if err != nil {
  82. return nil, err
  83. }
  84. return dAtA[:n], nil
  85. }
  86. func (m *BvcResponseMsg) MarshalTo(dAtA []byte) (int, error) {
  87. var i int
  88. _ = i
  89. var l int
  90. _ = l
  91. if m.Code != 0 {
  92. dAtA[i] = 0x8
  93. i++
  94. i = encodeVarintTest(dAtA, i, uint64(m.Code))
  95. }
  96. return i, nil
  97. }
  98. func encodeVarintTest(dAtA []byte, offset int, v uint64) int {
  99. for v >= 1<<7 {
  100. dAtA[offset] = uint8(v&0x7f | 0x80)
  101. v >>= 7
  102. offset++
  103. }
  104. dAtA[offset] = uint8(v)
  105. return offset + 1
  106. }
  107. func (m *Time) Size() (n int) {
  108. var l int
  109. _ = l
  110. if m.Now != 0 {
  111. n += 1 + sovTest(uint64(m.Now))
  112. }
  113. return n
  114. }
  115. func (m *BvcResponseMsg) Size() (n int) {
  116. var l int
  117. _ = l
  118. if m.Code != 0 {
  119. n += 1 + sovTest(uint64(m.Code))
  120. }
  121. return n
  122. }
  123. func sovTest(x uint64) (n int) {
  124. for {
  125. n++
  126. x >>= 7
  127. if x == 0 {
  128. break
  129. }
  130. }
  131. return n
  132. }
  133. func sozTest(x uint64) (n int) {
  134. return sovTest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  135. }
  136. func (m *Time) Unmarshal(dAtA []byte) error {
  137. l := len(dAtA)
  138. iNdEx := 0
  139. for iNdEx < l {
  140. preIndex := iNdEx
  141. var wire uint64
  142. for shift := uint(0); ; shift += 7 {
  143. if shift >= 64 {
  144. return ErrIntOverflowTest
  145. }
  146. if iNdEx >= l {
  147. return io.ErrUnexpectedEOF
  148. }
  149. b := dAtA[iNdEx]
  150. iNdEx++
  151. wire |= (uint64(b) & 0x7F) << shift
  152. if b < 0x80 {
  153. break
  154. }
  155. }
  156. fieldNum := int32(wire >> 3)
  157. wireType := int(wire & 0x7)
  158. if wireType == 4 {
  159. return fmt.Errorf("proto: Time: wiretype end group for non-group")
  160. }
  161. if fieldNum <= 0 {
  162. return fmt.Errorf("proto: Time: illegal tag %d (wire type %d)", fieldNum, wire)
  163. }
  164. switch fieldNum {
  165. case 1:
  166. if wireType != 0 {
  167. return fmt.Errorf("proto: wrong wireType = %d for field Now", wireType)
  168. }
  169. m.Now = 0
  170. for shift := uint(0); ; shift += 7 {
  171. if shift >= 64 {
  172. return ErrIntOverflowTest
  173. }
  174. if iNdEx >= l {
  175. return io.ErrUnexpectedEOF
  176. }
  177. b := dAtA[iNdEx]
  178. iNdEx++
  179. m.Now |= (int64(b) & 0x7F) << shift
  180. if b < 0x80 {
  181. break
  182. }
  183. }
  184. default:
  185. iNdEx = preIndex
  186. skippy, err := skipTest(dAtA[iNdEx:])
  187. if err != nil {
  188. return err
  189. }
  190. if skippy < 0 {
  191. return ErrInvalidLengthTest
  192. }
  193. if (iNdEx + skippy) > l {
  194. return io.ErrUnexpectedEOF
  195. }
  196. iNdEx += skippy
  197. }
  198. }
  199. if iNdEx > l {
  200. return io.ErrUnexpectedEOF
  201. }
  202. return nil
  203. }
  204. func (m *BvcResponseMsg) Unmarshal(dAtA []byte) error {
  205. l := len(dAtA)
  206. iNdEx := 0
  207. for iNdEx < l {
  208. preIndex := iNdEx
  209. var wire uint64
  210. for shift := uint(0); ; shift += 7 {
  211. if shift >= 64 {
  212. return ErrIntOverflowTest
  213. }
  214. if iNdEx >= l {
  215. return io.ErrUnexpectedEOF
  216. }
  217. b := dAtA[iNdEx]
  218. iNdEx++
  219. wire |= (uint64(b) & 0x7F) << shift
  220. if b < 0x80 {
  221. break
  222. }
  223. }
  224. fieldNum := int32(wire >> 3)
  225. wireType := int(wire & 0x7)
  226. if wireType == 4 {
  227. return fmt.Errorf("proto: BvcResponseMsg: wiretype end group for non-group")
  228. }
  229. if fieldNum <= 0 {
  230. return fmt.Errorf("proto: BvcResponseMsg: illegal tag %d (wire type %d)", fieldNum, wire)
  231. }
  232. switch fieldNum {
  233. case 1:
  234. if wireType != 0 {
  235. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  236. }
  237. m.Code = 0
  238. for shift := uint(0); ; shift += 7 {
  239. if shift >= 64 {
  240. return ErrIntOverflowTest
  241. }
  242. if iNdEx >= l {
  243. return io.ErrUnexpectedEOF
  244. }
  245. b := dAtA[iNdEx]
  246. iNdEx++
  247. m.Code |= (int64(b) & 0x7F) << shift
  248. if b < 0x80 {
  249. break
  250. }
  251. }
  252. default:
  253. iNdEx = preIndex
  254. skippy, err := skipTest(dAtA[iNdEx:])
  255. if err != nil {
  256. return err
  257. }
  258. if skippy < 0 {
  259. return ErrInvalidLengthTest
  260. }
  261. if (iNdEx + skippy) > l {
  262. return io.ErrUnexpectedEOF
  263. }
  264. iNdEx += skippy
  265. }
  266. }
  267. if iNdEx > l {
  268. return io.ErrUnexpectedEOF
  269. }
  270. return nil
  271. }
  272. func skipTest(dAtA []byte) (n int, err error) {
  273. l := len(dAtA)
  274. iNdEx := 0
  275. for iNdEx < l {
  276. var wire uint64
  277. for shift := uint(0); ; shift += 7 {
  278. if shift >= 64 {
  279. return 0, ErrIntOverflowTest
  280. }
  281. if iNdEx >= l {
  282. return 0, io.ErrUnexpectedEOF
  283. }
  284. b := dAtA[iNdEx]
  285. iNdEx++
  286. wire |= (uint64(b) & 0x7F) << shift
  287. if b < 0x80 {
  288. break
  289. }
  290. }
  291. wireType := int(wire & 0x7)
  292. switch wireType {
  293. case 0:
  294. for shift := uint(0); ; shift += 7 {
  295. if shift >= 64 {
  296. return 0, ErrIntOverflowTest
  297. }
  298. if iNdEx >= l {
  299. return 0, io.ErrUnexpectedEOF
  300. }
  301. iNdEx++
  302. if dAtA[iNdEx-1] < 0x80 {
  303. break
  304. }
  305. }
  306. return iNdEx, nil
  307. case 1:
  308. iNdEx += 8
  309. return iNdEx, nil
  310. case 2:
  311. var length int
  312. for shift := uint(0); ; shift += 7 {
  313. if shift >= 64 {
  314. return 0, ErrIntOverflowTest
  315. }
  316. if iNdEx >= l {
  317. return 0, io.ErrUnexpectedEOF
  318. }
  319. b := dAtA[iNdEx]
  320. iNdEx++
  321. length |= (int(b) & 0x7F) << shift
  322. if b < 0x80 {
  323. break
  324. }
  325. }
  326. iNdEx += length
  327. if length < 0 {
  328. return 0, ErrInvalidLengthTest
  329. }
  330. return iNdEx, nil
  331. case 3:
  332. for {
  333. var innerWire uint64
  334. var start int = iNdEx
  335. for shift := uint(0); ; shift += 7 {
  336. if shift >= 64 {
  337. return 0, ErrIntOverflowTest
  338. }
  339. if iNdEx >= l {
  340. return 0, io.ErrUnexpectedEOF
  341. }
  342. b := dAtA[iNdEx]
  343. iNdEx++
  344. innerWire |= (uint64(b) & 0x7F) << shift
  345. if b < 0x80 {
  346. break
  347. }
  348. }
  349. innerWireType := int(innerWire & 0x7)
  350. if innerWireType == 4 {
  351. break
  352. }
  353. next, err := skipTest(dAtA[start:])
  354. if err != nil {
  355. return 0, err
  356. }
  357. iNdEx = start + next
  358. }
  359. return iNdEx, nil
  360. case 4:
  361. return iNdEx, nil
  362. case 5:
  363. iNdEx += 4
  364. return iNdEx, nil
  365. default:
  366. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  367. }
  368. }
  369. panic("unreachable")
  370. }
  371. var (
  372. ErrInvalidLengthTest = fmt.Errorf("proto: negative length found during unmarshaling")
  373. ErrIntOverflowTest = fmt.Errorf("proto: integer overflow")
  374. )
  375. func init() { proto.RegisterFile("library/net/http/blademaster/tests/test.proto", fileDescriptorTest) }
  376. var fileDescriptorTest = []byte{
  377. // 193 bytes of a gzipped FileDescriptorProto
  378. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xcd, 0xc9, 0x4c, 0x2a,
  379. 0x4a, 0x2c, 0xaa, 0xd4, 0xcf, 0x4b, 0x2d, 0xd1, 0xcf, 0x28, 0x29, 0x29, 0xd0, 0x4f, 0xca, 0x49,
  380. 0x4c, 0x49, 0xcd, 0x4d, 0x2c, 0x2e, 0x49, 0x2d, 0xd2, 0x2f, 0x49, 0x2d, 0x2e, 0x29, 0x06, 0x93,
  381. 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xac, 0x60, 0x11, 0x29, 0xdd, 0xf4, 0xcc, 0x92, 0x8c,
  382. 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xf4, 0xfc, 0xf4, 0x7c, 0x7d, 0xb0, 0x6c, 0x52, 0x69,
  383. 0x1a, 0x98, 0x07, 0xe6, 0x80, 0x59, 0x10, 0x5d, 0x4a, 0x12, 0x5c, 0x2c, 0x21, 0x99, 0xb9, 0xa9,
  384. 0x42, 0x02, 0x5c, 0xcc, 0x7e, 0xf9, 0xe5, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x20, 0xa6,
  385. 0x92, 0x39, 0x17, 0x9f, 0x53, 0x59, 0x72, 0x50, 0x6a, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0xaa, 0x6f,
  386. 0x71, 0xba, 0x90, 0x2a, 0x17, 0x4b, 0x72, 0x7e, 0x4a, 0x2a, 0x58, 0x11, 0xaf, 0x93, 0xe0, 0xab,
  387. 0x7b, 0xf2, 0x60, 0xfe, 0xaf, 0x7b, 0xf2, 0xac, 0x99, 0x79, 0x25, 0x66, 0x26, 0x41, 0x60, 0xae,
  388. 0x13, 0xcf, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x98, 0xc4,
  389. 0x06, 0xb6, 0xc7, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x87, 0x45, 0x3e, 0x82, 0xce, 0x00, 0x00,
  390. 0x00,
  391. }