upload.pb.go 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: upload.proto
  3. package v1
  4. import proto "github.com/gogo/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import _ "github.com/gogo/protobuf/gogoproto"
  8. import encoding_binary "encoding/binary"
  9. import io "io"
  10. // Reference imports to suppress errors if they are not otherwise used.
  11. var _ = proto.Marshal
  12. var _ = fmt.Errorf
  13. var _ = math.Inf
  14. // This is a compile-time assertion to ensure that this generated file
  15. // is compatible with the proto package it is being compiled against.
  16. // A compilation error at this line likely means your copy of the
  17. // proto package needs to be updated.
  18. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  19. type NewTokenReq struct {
  20. // 上传到 BFS 的 bucket
  21. Bucket string `protobuf:"bytes,1,opt,name=bucket,proto3" json:"bucket,omitempty" form:"bucket" validate:"required"`
  22. // 上传到指定的 BFS 目录(可以用来区分业务)
  23. Dir string `protobuf:"bytes,2,opt,name=dir,proto3" json:"dir,omitempty" form:"dir"`
  24. // 操作人(mlive通过dashboard授权获取到的操作人)
  25. Operator string `protobuf:"bytes,3,opt,name=operator,proto3" json:"operator,omitempty" form:"operator" validate:"required"`
  26. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  27. XXX_unrecognized []byte `json:"-"`
  28. XXX_sizecache int32 `json:"-"`
  29. }
  30. func (m *NewTokenReq) Reset() { *m = NewTokenReq{} }
  31. func (m *NewTokenReq) String() string { return proto.CompactTextString(m) }
  32. func (*NewTokenReq) ProtoMessage() {}
  33. func (*NewTokenReq) Descriptor() ([]byte, []int) {
  34. return fileDescriptor_upload_36f9b26ba548ca45, []int{0}
  35. }
  36. func (m *NewTokenReq) XXX_Unmarshal(b []byte) error {
  37. return m.Unmarshal(b)
  38. }
  39. func (m *NewTokenReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  40. if deterministic {
  41. return xxx_messageInfo_NewTokenReq.Marshal(b, m, deterministic)
  42. } else {
  43. b = b[:cap(b)]
  44. n, err := m.MarshalTo(b)
  45. if err != nil {
  46. return nil, err
  47. }
  48. return b[:n], nil
  49. }
  50. }
  51. func (dst *NewTokenReq) XXX_Merge(src proto.Message) {
  52. xxx_messageInfo_NewTokenReq.Merge(dst, src)
  53. }
  54. func (m *NewTokenReq) XXX_Size() int {
  55. return m.Size()
  56. }
  57. func (m *NewTokenReq) XXX_DiscardUnknown() {
  58. xxx_messageInfo_NewTokenReq.DiscardUnknown(m)
  59. }
  60. var xxx_messageInfo_NewTokenReq proto.InternalMessageInfo
  61. func (m *NewTokenReq) GetBucket() string {
  62. if m != nil {
  63. return m.Bucket
  64. }
  65. return ""
  66. }
  67. func (m *NewTokenReq) GetDir() string {
  68. if m != nil {
  69. return m.Dir
  70. }
  71. return ""
  72. }
  73. func (m *NewTokenReq) GetOperator() string {
  74. if m != nil {
  75. return m.Operator
  76. }
  77. return ""
  78. }
  79. type NewTokenResp struct {
  80. // 授予的 token
  81. Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token"`
  82. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  83. XXX_unrecognized []byte `json:"-"`
  84. XXX_sizecache int32 `json:"-"`
  85. }
  86. func (m *NewTokenResp) Reset() { *m = NewTokenResp{} }
  87. func (m *NewTokenResp) String() string { return proto.CompactTextString(m) }
  88. func (*NewTokenResp) ProtoMessage() {}
  89. func (*NewTokenResp) Descriptor() ([]byte, []int) {
  90. return fileDescriptor_upload_36f9b26ba548ca45, []int{1}
  91. }
  92. func (m *NewTokenResp) XXX_Unmarshal(b []byte) error {
  93. return m.Unmarshal(b)
  94. }
  95. func (m *NewTokenResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  96. if deterministic {
  97. return xxx_messageInfo_NewTokenResp.Marshal(b, m, deterministic)
  98. } else {
  99. b = b[:cap(b)]
  100. n, err := m.MarshalTo(b)
  101. if err != nil {
  102. return nil, err
  103. }
  104. return b[:n], nil
  105. }
  106. }
  107. func (dst *NewTokenResp) XXX_Merge(src proto.Message) {
  108. xxx_messageInfo_NewTokenResp.Merge(dst, src)
  109. }
  110. func (m *NewTokenResp) XXX_Size() int {
  111. return m.Size()
  112. }
  113. func (m *NewTokenResp) XXX_DiscardUnknown() {
  114. xxx_messageInfo_NewTokenResp.DiscardUnknown(m)
  115. }
  116. var xxx_messageInfo_NewTokenResp proto.InternalMessageInfo
  117. func (m *NewTokenResp) GetToken() string {
  118. if m != nil {
  119. return m.Token
  120. }
  121. return ""
  122. }
  123. // The file/data part must use Request.FormFile() to retrieve manually.
  124. type UploadFileReq struct {
  125. // 上传到 BFS 的 bucket
  126. Bucket string `protobuf:"bytes,1,opt,name=bucket,proto3" json:"bucket,omitempty" form:"bucket" validate:"required"`
  127. // 上传到指定的 BFS 目录(可以用来区分业务)
  128. Dir string `protobuf:"bytes,2,opt,name=dir,proto3" json:"dir,omitempty" form:"dir"`
  129. // 上传的到bfs的文件名(存储在bfs的文件名,不传bfs会根据文件的sha1值生成并返回)
  130. Filename string `protobuf:"bytes,3,opt,name=filename,proto3" json:"filename,omitempty" form:"file_name"`
  131. // 上传的文件的类型(不指定时会自动检测文件类型)
  132. ContentType string `protobuf:"bytes,4,opt,name=contentType,proto3" json:"contentType,omitempty" form:"content_type"`
  133. // 图片水印key,添加图片水印需要上传该参数, 新业务需要提前向bfs申请
  134. WmKey string `protobuf:"bytes,5,opt,name=wmKey,proto3" json:"wmKey,omitempty" form:"wm_key"`
  135. // 文字水印,限制不超过20个字符
  136. WmText string `protobuf:"bytes,6,opt,name=wmText,proto3" json:"wmText,omitempty" form:"wm_text"`
  137. // 水印位置右下角 到原图右下角 水平距离,默认10px
  138. WmPaddingX uint32 `protobuf:"varint,7,opt,name=wmPaddingX,proto3" json:"wmPaddingX,omitempty" form:"wm_padding_x"`
  139. // 水印位置右下角 到原图右下角 垂直距离,默认10px
  140. WmPaddingY uint32 `protobuf:"varint,8,opt,name=wmPaddingY,proto3" json:"wmPaddingY,omitempty" form:"wm_padding_y"`
  141. // 水印宽度占原图高度的比例(0,1) (只支持按照宽度压缩),默认值: 0.035
  142. WmScale float64 `protobuf:"fixed64,9,opt,name=wmScale,proto3" json:"wmScale,omitempty" form:"wm_scale"`
  143. // 上传 Token,通过 obtainToken 接口获取
  144. Token string `protobuf:"bytes,10,opt,name=token,proto3" json:"token,omitempty" form:"token" validate:"required"`
  145. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  146. XXX_unrecognized []byte `json:"-"`
  147. XXX_sizecache int32 `json:"-"`
  148. }
  149. func (m *UploadFileReq) Reset() { *m = UploadFileReq{} }
  150. func (m *UploadFileReq) String() string { return proto.CompactTextString(m) }
  151. func (*UploadFileReq) ProtoMessage() {}
  152. func (*UploadFileReq) Descriptor() ([]byte, []int) {
  153. return fileDescriptor_upload_36f9b26ba548ca45, []int{2}
  154. }
  155. func (m *UploadFileReq) XXX_Unmarshal(b []byte) error {
  156. return m.Unmarshal(b)
  157. }
  158. func (m *UploadFileReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  159. if deterministic {
  160. return xxx_messageInfo_UploadFileReq.Marshal(b, m, deterministic)
  161. } else {
  162. b = b[:cap(b)]
  163. n, err := m.MarshalTo(b)
  164. if err != nil {
  165. return nil, err
  166. }
  167. return b[:n], nil
  168. }
  169. }
  170. func (dst *UploadFileReq) XXX_Merge(src proto.Message) {
  171. xxx_messageInfo_UploadFileReq.Merge(dst, src)
  172. }
  173. func (m *UploadFileReq) XXX_Size() int {
  174. return m.Size()
  175. }
  176. func (m *UploadFileReq) XXX_DiscardUnknown() {
  177. xxx_messageInfo_UploadFileReq.DiscardUnknown(m)
  178. }
  179. var xxx_messageInfo_UploadFileReq proto.InternalMessageInfo
  180. func (m *UploadFileReq) GetBucket() string {
  181. if m != nil {
  182. return m.Bucket
  183. }
  184. return ""
  185. }
  186. func (m *UploadFileReq) GetDir() string {
  187. if m != nil {
  188. return m.Dir
  189. }
  190. return ""
  191. }
  192. func (m *UploadFileReq) GetFilename() string {
  193. if m != nil {
  194. return m.Filename
  195. }
  196. return ""
  197. }
  198. func (m *UploadFileReq) GetContentType() string {
  199. if m != nil {
  200. return m.ContentType
  201. }
  202. return ""
  203. }
  204. func (m *UploadFileReq) GetWmKey() string {
  205. if m != nil {
  206. return m.WmKey
  207. }
  208. return ""
  209. }
  210. func (m *UploadFileReq) GetWmText() string {
  211. if m != nil {
  212. return m.WmText
  213. }
  214. return ""
  215. }
  216. func (m *UploadFileReq) GetWmPaddingX() uint32 {
  217. if m != nil {
  218. return m.WmPaddingX
  219. }
  220. return 0
  221. }
  222. func (m *UploadFileReq) GetWmPaddingY() uint32 {
  223. if m != nil {
  224. return m.WmPaddingY
  225. }
  226. return 0
  227. }
  228. func (m *UploadFileReq) GetWmScale() float64 {
  229. if m != nil {
  230. return m.WmScale
  231. }
  232. return 0
  233. }
  234. func (m *UploadFileReq) GetToken() string {
  235. if m != nil {
  236. return m.Token
  237. }
  238. return ""
  239. }
  240. type UploadFileResp struct {
  241. Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url"`
  242. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  243. XXX_unrecognized []byte `json:"-"`
  244. XXX_sizecache int32 `json:"-"`
  245. }
  246. func (m *UploadFileResp) Reset() { *m = UploadFileResp{} }
  247. func (m *UploadFileResp) String() string { return proto.CompactTextString(m) }
  248. func (*UploadFileResp) ProtoMessage() {}
  249. func (*UploadFileResp) Descriptor() ([]byte, []int) {
  250. return fileDescriptor_upload_36f9b26ba548ca45, []int{3}
  251. }
  252. func (m *UploadFileResp) XXX_Unmarshal(b []byte) error {
  253. return m.Unmarshal(b)
  254. }
  255. func (m *UploadFileResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  256. if deterministic {
  257. return xxx_messageInfo_UploadFileResp.Marshal(b, m, deterministic)
  258. } else {
  259. b = b[:cap(b)]
  260. n, err := m.MarshalTo(b)
  261. if err != nil {
  262. return nil, err
  263. }
  264. return b[:n], nil
  265. }
  266. }
  267. func (dst *UploadFileResp) XXX_Merge(src proto.Message) {
  268. xxx_messageInfo_UploadFileResp.Merge(dst, src)
  269. }
  270. func (m *UploadFileResp) XXX_Size() int {
  271. return m.Size()
  272. }
  273. func (m *UploadFileResp) XXX_DiscardUnknown() {
  274. xxx_messageInfo_UploadFileResp.DiscardUnknown(m)
  275. }
  276. var xxx_messageInfo_UploadFileResp proto.InternalMessageInfo
  277. func (m *UploadFileResp) GetUrl() string {
  278. if m != nil {
  279. return m.Url
  280. }
  281. return ""
  282. }
  283. func init() {
  284. proto.RegisterType((*NewTokenReq)(nil), "live.liveadmin.v1.NewTokenReq")
  285. proto.RegisterType((*NewTokenResp)(nil), "live.liveadmin.v1.NewTokenResp")
  286. proto.RegisterType((*UploadFileReq)(nil), "live.liveadmin.v1.UploadFileReq")
  287. proto.RegisterType((*UploadFileResp)(nil), "live.liveadmin.v1.UploadFileResp")
  288. }
  289. func (m *NewTokenReq) Marshal() (dAtA []byte, err error) {
  290. size := m.Size()
  291. dAtA = make([]byte, size)
  292. n, err := m.MarshalTo(dAtA)
  293. if err != nil {
  294. return nil, err
  295. }
  296. return dAtA[:n], nil
  297. }
  298. func (m *NewTokenReq) MarshalTo(dAtA []byte) (int, error) {
  299. var i int
  300. _ = i
  301. var l int
  302. _ = l
  303. if len(m.Bucket) > 0 {
  304. dAtA[i] = 0xa
  305. i++
  306. i = encodeVarintUpload(dAtA, i, uint64(len(m.Bucket)))
  307. i += copy(dAtA[i:], m.Bucket)
  308. }
  309. if len(m.Dir) > 0 {
  310. dAtA[i] = 0x12
  311. i++
  312. i = encodeVarintUpload(dAtA, i, uint64(len(m.Dir)))
  313. i += copy(dAtA[i:], m.Dir)
  314. }
  315. if len(m.Operator) > 0 {
  316. dAtA[i] = 0x1a
  317. i++
  318. i = encodeVarintUpload(dAtA, i, uint64(len(m.Operator)))
  319. i += copy(dAtA[i:], m.Operator)
  320. }
  321. if m.XXX_unrecognized != nil {
  322. i += copy(dAtA[i:], m.XXX_unrecognized)
  323. }
  324. return i, nil
  325. }
  326. func (m *NewTokenResp) Marshal() (dAtA []byte, err error) {
  327. size := m.Size()
  328. dAtA = make([]byte, size)
  329. n, err := m.MarshalTo(dAtA)
  330. if err != nil {
  331. return nil, err
  332. }
  333. return dAtA[:n], nil
  334. }
  335. func (m *NewTokenResp) MarshalTo(dAtA []byte) (int, error) {
  336. var i int
  337. _ = i
  338. var l int
  339. _ = l
  340. if len(m.Token) > 0 {
  341. dAtA[i] = 0xa
  342. i++
  343. i = encodeVarintUpload(dAtA, i, uint64(len(m.Token)))
  344. i += copy(dAtA[i:], m.Token)
  345. }
  346. if m.XXX_unrecognized != nil {
  347. i += copy(dAtA[i:], m.XXX_unrecognized)
  348. }
  349. return i, nil
  350. }
  351. func (m *UploadFileReq) Marshal() (dAtA []byte, err error) {
  352. size := m.Size()
  353. dAtA = make([]byte, size)
  354. n, err := m.MarshalTo(dAtA)
  355. if err != nil {
  356. return nil, err
  357. }
  358. return dAtA[:n], nil
  359. }
  360. func (m *UploadFileReq) MarshalTo(dAtA []byte) (int, error) {
  361. var i int
  362. _ = i
  363. var l int
  364. _ = l
  365. if len(m.Bucket) > 0 {
  366. dAtA[i] = 0xa
  367. i++
  368. i = encodeVarintUpload(dAtA, i, uint64(len(m.Bucket)))
  369. i += copy(dAtA[i:], m.Bucket)
  370. }
  371. if len(m.Dir) > 0 {
  372. dAtA[i] = 0x12
  373. i++
  374. i = encodeVarintUpload(dAtA, i, uint64(len(m.Dir)))
  375. i += copy(dAtA[i:], m.Dir)
  376. }
  377. if len(m.Filename) > 0 {
  378. dAtA[i] = 0x1a
  379. i++
  380. i = encodeVarintUpload(dAtA, i, uint64(len(m.Filename)))
  381. i += copy(dAtA[i:], m.Filename)
  382. }
  383. if len(m.ContentType) > 0 {
  384. dAtA[i] = 0x22
  385. i++
  386. i = encodeVarintUpload(dAtA, i, uint64(len(m.ContentType)))
  387. i += copy(dAtA[i:], m.ContentType)
  388. }
  389. if len(m.WmKey) > 0 {
  390. dAtA[i] = 0x2a
  391. i++
  392. i = encodeVarintUpload(dAtA, i, uint64(len(m.WmKey)))
  393. i += copy(dAtA[i:], m.WmKey)
  394. }
  395. if len(m.WmText) > 0 {
  396. dAtA[i] = 0x32
  397. i++
  398. i = encodeVarintUpload(dAtA, i, uint64(len(m.WmText)))
  399. i += copy(dAtA[i:], m.WmText)
  400. }
  401. if m.WmPaddingX != 0 {
  402. dAtA[i] = 0x38
  403. i++
  404. i = encodeVarintUpload(dAtA, i, uint64(m.WmPaddingX))
  405. }
  406. if m.WmPaddingY != 0 {
  407. dAtA[i] = 0x40
  408. i++
  409. i = encodeVarintUpload(dAtA, i, uint64(m.WmPaddingY))
  410. }
  411. if m.WmScale != 0 {
  412. dAtA[i] = 0x49
  413. i++
  414. encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.WmScale))))
  415. i += 8
  416. }
  417. if len(m.Token) > 0 {
  418. dAtA[i] = 0x52
  419. i++
  420. i = encodeVarintUpload(dAtA, i, uint64(len(m.Token)))
  421. i += copy(dAtA[i:], m.Token)
  422. }
  423. if m.XXX_unrecognized != nil {
  424. i += copy(dAtA[i:], m.XXX_unrecognized)
  425. }
  426. return i, nil
  427. }
  428. func (m *UploadFileResp) Marshal() (dAtA []byte, err error) {
  429. size := m.Size()
  430. dAtA = make([]byte, size)
  431. n, err := m.MarshalTo(dAtA)
  432. if err != nil {
  433. return nil, err
  434. }
  435. return dAtA[:n], nil
  436. }
  437. func (m *UploadFileResp) MarshalTo(dAtA []byte) (int, error) {
  438. var i int
  439. _ = i
  440. var l int
  441. _ = l
  442. if len(m.Url) > 0 {
  443. dAtA[i] = 0xa
  444. i++
  445. i = encodeVarintUpload(dAtA, i, uint64(len(m.Url)))
  446. i += copy(dAtA[i:], m.Url)
  447. }
  448. if m.XXX_unrecognized != nil {
  449. i += copy(dAtA[i:], m.XXX_unrecognized)
  450. }
  451. return i, nil
  452. }
  453. func encodeVarintUpload(dAtA []byte, offset int, v uint64) int {
  454. for v >= 1<<7 {
  455. dAtA[offset] = uint8(v&0x7f | 0x80)
  456. v >>= 7
  457. offset++
  458. }
  459. dAtA[offset] = uint8(v)
  460. return offset + 1
  461. }
  462. func (m *NewTokenReq) Size() (n int) {
  463. if m == nil {
  464. return 0
  465. }
  466. var l int
  467. _ = l
  468. l = len(m.Bucket)
  469. if l > 0 {
  470. n += 1 + l + sovUpload(uint64(l))
  471. }
  472. l = len(m.Dir)
  473. if l > 0 {
  474. n += 1 + l + sovUpload(uint64(l))
  475. }
  476. l = len(m.Operator)
  477. if l > 0 {
  478. n += 1 + l + sovUpload(uint64(l))
  479. }
  480. if m.XXX_unrecognized != nil {
  481. n += len(m.XXX_unrecognized)
  482. }
  483. return n
  484. }
  485. func (m *NewTokenResp) Size() (n int) {
  486. if m == nil {
  487. return 0
  488. }
  489. var l int
  490. _ = l
  491. l = len(m.Token)
  492. if l > 0 {
  493. n += 1 + l + sovUpload(uint64(l))
  494. }
  495. if m.XXX_unrecognized != nil {
  496. n += len(m.XXX_unrecognized)
  497. }
  498. return n
  499. }
  500. func (m *UploadFileReq) Size() (n int) {
  501. if m == nil {
  502. return 0
  503. }
  504. var l int
  505. _ = l
  506. l = len(m.Bucket)
  507. if l > 0 {
  508. n += 1 + l + sovUpload(uint64(l))
  509. }
  510. l = len(m.Dir)
  511. if l > 0 {
  512. n += 1 + l + sovUpload(uint64(l))
  513. }
  514. l = len(m.Filename)
  515. if l > 0 {
  516. n += 1 + l + sovUpload(uint64(l))
  517. }
  518. l = len(m.ContentType)
  519. if l > 0 {
  520. n += 1 + l + sovUpload(uint64(l))
  521. }
  522. l = len(m.WmKey)
  523. if l > 0 {
  524. n += 1 + l + sovUpload(uint64(l))
  525. }
  526. l = len(m.WmText)
  527. if l > 0 {
  528. n += 1 + l + sovUpload(uint64(l))
  529. }
  530. if m.WmPaddingX != 0 {
  531. n += 1 + sovUpload(uint64(m.WmPaddingX))
  532. }
  533. if m.WmPaddingY != 0 {
  534. n += 1 + sovUpload(uint64(m.WmPaddingY))
  535. }
  536. if m.WmScale != 0 {
  537. n += 9
  538. }
  539. l = len(m.Token)
  540. if l > 0 {
  541. n += 1 + l + sovUpload(uint64(l))
  542. }
  543. if m.XXX_unrecognized != nil {
  544. n += len(m.XXX_unrecognized)
  545. }
  546. return n
  547. }
  548. func (m *UploadFileResp) Size() (n int) {
  549. if m == nil {
  550. return 0
  551. }
  552. var l int
  553. _ = l
  554. l = len(m.Url)
  555. if l > 0 {
  556. n += 1 + l + sovUpload(uint64(l))
  557. }
  558. if m.XXX_unrecognized != nil {
  559. n += len(m.XXX_unrecognized)
  560. }
  561. return n
  562. }
  563. func sovUpload(x uint64) (n int) {
  564. for {
  565. n++
  566. x >>= 7
  567. if x == 0 {
  568. break
  569. }
  570. }
  571. return n
  572. }
  573. func sozUpload(x uint64) (n int) {
  574. return sovUpload(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  575. }
  576. func (m *NewTokenReq) Unmarshal(dAtA []byte) error {
  577. l := len(dAtA)
  578. iNdEx := 0
  579. for iNdEx < l {
  580. preIndex := iNdEx
  581. var wire uint64
  582. for shift := uint(0); ; shift += 7 {
  583. if shift >= 64 {
  584. return ErrIntOverflowUpload
  585. }
  586. if iNdEx >= l {
  587. return io.ErrUnexpectedEOF
  588. }
  589. b := dAtA[iNdEx]
  590. iNdEx++
  591. wire |= (uint64(b) & 0x7F) << shift
  592. if b < 0x80 {
  593. break
  594. }
  595. }
  596. fieldNum := int32(wire >> 3)
  597. wireType := int(wire & 0x7)
  598. if wireType == 4 {
  599. return fmt.Errorf("proto: NewTokenReq: wiretype end group for non-group")
  600. }
  601. if fieldNum <= 0 {
  602. return fmt.Errorf("proto: NewTokenReq: illegal tag %d (wire type %d)", fieldNum, wire)
  603. }
  604. switch fieldNum {
  605. case 1:
  606. if wireType != 2 {
  607. return fmt.Errorf("proto: wrong wireType = %d for field Bucket", wireType)
  608. }
  609. var stringLen uint64
  610. for shift := uint(0); ; shift += 7 {
  611. if shift >= 64 {
  612. return ErrIntOverflowUpload
  613. }
  614. if iNdEx >= l {
  615. return io.ErrUnexpectedEOF
  616. }
  617. b := dAtA[iNdEx]
  618. iNdEx++
  619. stringLen |= (uint64(b) & 0x7F) << shift
  620. if b < 0x80 {
  621. break
  622. }
  623. }
  624. intStringLen := int(stringLen)
  625. if intStringLen < 0 {
  626. return ErrInvalidLengthUpload
  627. }
  628. postIndex := iNdEx + intStringLen
  629. if postIndex > l {
  630. return io.ErrUnexpectedEOF
  631. }
  632. m.Bucket = string(dAtA[iNdEx:postIndex])
  633. iNdEx = postIndex
  634. case 2:
  635. if wireType != 2 {
  636. return fmt.Errorf("proto: wrong wireType = %d for field Dir", wireType)
  637. }
  638. var stringLen uint64
  639. for shift := uint(0); ; shift += 7 {
  640. if shift >= 64 {
  641. return ErrIntOverflowUpload
  642. }
  643. if iNdEx >= l {
  644. return io.ErrUnexpectedEOF
  645. }
  646. b := dAtA[iNdEx]
  647. iNdEx++
  648. stringLen |= (uint64(b) & 0x7F) << shift
  649. if b < 0x80 {
  650. break
  651. }
  652. }
  653. intStringLen := int(stringLen)
  654. if intStringLen < 0 {
  655. return ErrInvalidLengthUpload
  656. }
  657. postIndex := iNdEx + intStringLen
  658. if postIndex > l {
  659. return io.ErrUnexpectedEOF
  660. }
  661. m.Dir = string(dAtA[iNdEx:postIndex])
  662. iNdEx = postIndex
  663. case 3:
  664. if wireType != 2 {
  665. return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType)
  666. }
  667. var stringLen uint64
  668. for shift := uint(0); ; shift += 7 {
  669. if shift >= 64 {
  670. return ErrIntOverflowUpload
  671. }
  672. if iNdEx >= l {
  673. return io.ErrUnexpectedEOF
  674. }
  675. b := dAtA[iNdEx]
  676. iNdEx++
  677. stringLen |= (uint64(b) & 0x7F) << shift
  678. if b < 0x80 {
  679. break
  680. }
  681. }
  682. intStringLen := int(stringLen)
  683. if intStringLen < 0 {
  684. return ErrInvalidLengthUpload
  685. }
  686. postIndex := iNdEx + intStringLen
  687. if postIndex > l {
  688. return io.ErrUnexpectedEOF
  689. }
  690. m.Operator = string(dAtA[iNdEx:postIndex])
  691. iNdEx = postIndex
  692. default:
  693. iNdEx = preIndex
  694. skippy, err := skipUpload(dAtA[iNdEx:])
  695. if err != nil {
  696. return err
  697. }
  698. if skippy < 0 {
  699. return ErrInvalidLengthUpload
  700. }
  701. if (iNdEx + skippy) > l {
  702. return io.ErrUnexpectedEOF
  703. }
  704. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  705. iNdEx += skippy
  706. }
  707. }
  708. if iNdEx > l {
  709. return io.ErrUnexpectedEOF
  710. }
  711. return nil
  712. }
  713. func (m *NewTokenResp) Unmarshal(dAtA []byte) error {
  714. l := len(dAtA)
  715. iNdEx := 0
  716. for iNdEx < l {
  717. preIndex := iNdEx
  718. var wire uint64
  719. for shift := uint(0); ; shift += 7 {
  720. if shift >= 64 {
  721. return ErrIntOverflowUpload
  722. }
  723. if iNdEx >= l {
  724. return io.ErrUnexpectedEOF
  725. }
  726. b := dAtA[iNdEx]
  727. iNdEx++
  728. wire |= (uint64(b) & 0x7F) << shift
  729. if b < 0x80 {
  730. break
  731. }
  732. }
  733. fieldNum := int32(wire >> 3)
  734. wireType := int(wire & 0x7)
  735. if wireType == 4 {
  736. return fmt.Errorf("proto: NewTokenResp: wiretype end group for non-group")
  737. }
  738. if fieldNum <= 0 {
  739. return fmt.Errorf("proto: NewTokenResp: illegal tag %d (wire type %d)", fieldNum, wire)
  740. }
  741. switch fieldNum {
  742. case 1:
  743. if wireType != 2 {
  744. return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
  745. }
  746. var stringLen uint64
  747. for shift := uint(0); ; shift += 7 {
  748. if shift >= 64 {
  749. return ErrIntOverflowUpload
  750. }
  751. if iNdEx >= l {
  752. return io.ErrUnexpectedEOF
  753. }
  754. b := dAtA[iNdEx]
  755. iNdEx++
  756. stringLen |= (uint64(b) & 0x7F) << shift
  757. if b < 0x80 {
  758. break
  759. }
  760. }
  761. intStringLen := int(stringLen)
  762. if intStringLen < 0 {
  763. return ErrInvalidLengthUpload
  764. }
  765. postIndex := iNdEx + intStringLen
  766. if postIndex > l {
  767. return io.ErrUnexpectedEOF
  768. }
  769. m.Token = string(dAtA[iNdEx:postIndex])
  770. iNdEx = postIndex
  771. default:
  772. iNdEx = preIndex
  773. skippy, err := skipUpload(dAtA[iNdEx:])
  774. if err != nil {
  775. return err
  776. }
  777. if skippy < 0 {
  778. return ErrInvalidLengthUpload
  779. }
  780. if (iNdEx + skippy) > l {
  781. return io.ErrUnexpectedEOF
  782. }
  783. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  784. iNdEx += skippy
  785. }
  786. }
  787. if iNdEx > l {
  788. return io.ErrUnexpectedEOF
  789. }
  790. return nil
  791. }
  792. func (m *UploadFileReq) Unmarshal(dAtA []byte) error {
  793. l := len(dAtA)
  794. iNdEx := 0
  795. for iNdEx < l {
  796. preIndex := iNdEx
  797. var wire uint64
  798. for shift := uint(0); ; shift += 7 {
  799. if shift >= 64 {
  800. return ErrIntOverflowUpload
  801. }
  802. if iNdEx >= l {
  803. return io.ErrUnexpectedEOF
  804. }
  805. b := dAtA[iNdEx]
  806. iNdEx++
  807. wire |= (uint64(b) & 0x7F) << shift
  808. if b < 0x80 {
  809. break
  810. }
  811. }
  812. fieldNum := int32(wire >> 3)
  813. wireType := int(wire & 0x7)
  814. if wireType == 4 {
  815. return fmt.Errorf("proto: UploadFileReq: wiretype end group for non-group")
  816. }
  817. if fieldNum <= 0 {
  818. return fmt.Errorf("proto: UploadFileReq: illegal tag %d (wire type %d)", fieldNum, wire)
  819. }
  820. switch fieldNum {
  821. case 1:
  822. if wireType != 2 {
  823. return fmt.Errorf("proto: wrong wireType = %d for field Bucket", wireType)
  824. }
  825. var stringLen uint64
  826. for shift := uint(0); ; shift += 7 {
  827. if shift >= 64 {
  828. return ErrIntOverflowUpload
  829. }
  830. if iNdEx >= l {
  831. return io.ErrUnexpectedEOF
  832. }
  833. b := dAtA[iNdEx]
  834. iNdEx++
  835. stringLen |= (uint64(b) & 0x7F) << shift
  836. if b < 0x80 {
  837. break
  838. }
  839. }
  840. intStringLen := int(stringLen)
  841. if intStringLen < 0 {
  842. return ErrInvalidLengthUpload
  843. }
  844. postIndex := iNdEx + intStringLen
  845. if postIndex > l {
  846. return io.ErrUnexpectedEOF
  847. }
  848. m.Bucket = string(dAtA[iNdEx:postIndex])
  849. iNdEx = postIndex
  850. case 2:
  851. if wireType != 2 {
  852. return fmt.Errorf("proto: wrong wireType = %d for field Dir", wireType)
  853. }
  854. var stringLen uint64
  855. for shift := uint(0); ; shift += 7 {
  856. if shift >= 64 {
  857. return ErrIntOverflowUpload
  858. }
  859. if iNdEx >= l {
  860. return io.ErrUnexpectedEOF
  861. }
  862. b := dAtA[iNdEx]
  863. iNdEx++
  864. stringLen |= (uint64(b) & 0x7F) << shift
  865. if b < 0x80 {
  866. break
  867. }
  868. }
  869. intStringLen := int(stringLen)
  870. if intStringLen < 0 {
  871. return ErrInvalidLengthUpload
  872. }
  873. postIndex := iNdEx + intStringLen
  874. if postIndex > l {
  875. return io.ErrUnexpectedEOF
  876. }
  877. m.Dir = string(dAtA[iNdEx:postIndex])
  878. iNdEx = postIndex
  879. case 3:
  880. if wireType != 2 {
  881. return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType)
  882. }
  883. var stringLen uint64
  884. for shift := uint(0); ; shift += 7 {
  885. if shift >= 64 {
  886. return ErrIntOverflowUpload
  887. }
  888. if iNdEx >= l {
  889. return io.ErrUnexpectedEOF
  890. }
  891. b := dAtA[iNdEx]
  892. iNdEx++
  893. stringLen |= (uint64(b) & 0x7F) << shift
  894. if b < 0x80 {
  895. break
  896. }
  897. }
  898. intStringLen := int(stringLen)
  899. if intStringLen < 0 {
  900. return ErrInvalidLengthUpload
  901. }
  902. postIndex := iNdEx + intStringLen
  903. if postIndex > l {
  904. return io.ErrUnexpectedEOF
  905. }
  906. m.Filename = string(dAtA[iNdEx:postIndex])
  907. iNdEx = postIndex
  908. case 4:
  909. if wireType != 2 {
  910. return fmt.Errorf("proto: wrong wireType = %d for field ContentType", wireType)
  911. }
  912. var stringLen uint64
  913. for shift := uint(0); ; shift += 7 {
  914. if shift >= 64 {
  915. return ErrIntOverflowUpload
  916. }
  917. if iNdEx >= l {
  918. return io.ErrUnexpectedEOF
  919. }
  920. b := dAtA[iNdEx]
  921. iNdEx++
  922. stringLen |= (uint64(b) & 0x7F) << shift
  923. if b < 0x80 {
  924. break
  925. }
  926. }
  927. intStringLen := int(stringLen)
  928. if intStringLen < 0 {
  929. return ErrInvalidLengthUpload
  930. }
  931. postIndex := iNdEx + intStringLen
  932. if postIndex > l {
  933. return io.ErrUnexpectedEOF
  934. }
  935. m.ContentType = string(dAtA[iNdEx:postIndex])
  936. iNdEx = postIndex
  937. case 5:
  938. if wireType != 2 {
  939. return fmt.Errorf("proto: wrong wireType = %d for field WmKey", wireType)
  940. }
  941. var stringLen uint64
  942. for shift := uint(0); ; shift += 7 {
  943. if shift >= 64 {
  944. return ErrIntOverflowUpload
  945. }
  946. if iNdEx >= l {
  947. return io.ErrUnexpectedEOF
  948. }
  949. b := dAtA[iNdEx]
  950. iNdEx++
  951. stringLen |= (uint64(b) & 0x7F) << shift
  952. if b < 0x80 {
  953. break
  954. }
  955. }
  956. intStringLen := int(stringLen)
  957. if intStringLen < 0 {
  958. return ErrInvalidLengthUpload
  959. }
  960. postIndex := iNdEx + intStringLen
  961. if postIndex > l {
  962. return io.ErrUnexpectedEOF
  963. }
  964. m.WmKey = string(dAtA[iNdEx:postIndex])
  965. iNdEx = postIndex
  966. case 6:
  967. if wireType != 2 {
  968. return fmt.Errorf("proto: wrong wireType = %d for field WmText", wireType)
  969. }
  970. var stringLen uint64
  971. for shift := uint(0); ; shift += 7 {
  972. if shift >= 64 {
  973. return ErrIntOverflowUpload
  974. }
  975. if iNdEx >= l {
  976. return io.ErrUnexpectedEOF
  977. }
  978. b := dAtA[iNdEx]
  979. iNdEx++
  980. stringLen |= (uint64(b) & 0x7F) << shift
  981. if b < 0x80 {
  982. break
  983. }
  984. }
  985. intStringLen := int(stringLen)
  986. if intStringLen < 0 {
  987. return ErrInvalidLengthUpload
  988. }
  989. postIndex := iNdEx + intStringLen
  990. if postIndex > l {
  991. return io.ErrUnexpectedEOF
  992. }
  993. m.WmText = string(dAtA[iNdEx:postIndex])
  994. iNdEx = postIndex
  995. case 7:
  996. if wireType != 0 {
  997. return fmt.Errorf("proto: wrong wireType = %d for field WmPaddingX", wireType)
  998. }
  999. m.WmPaddingX = 0
  1000. for shift := uint(0); ; shift += 7 {
  1001. if shift >= 64 {
  1002. return ErrIntOverflowUpload
  1003. }
  1004. if iNdEx >= l {
  1005. return io.ErrUnexpectedEOF
  1006. }
  1007. b := dAtA[iNdEx]
  1008. iNdEx++
  1009. m.WmPaddingX |= (uint32(b) & 0x7F) << shift
  1010. if b < 0x80 {
  1011. break
  1012. }
  1013. }
  1014. case 8:
  1015. if wireType != 0 {
  1016. return fmt.Errorf("proto: wrong wireType = %d for field WmPaddingY", wireType)
  1017. }
  1018. m.WmPaddingY = 0
  1019. for shift := uint(0); ; shift += 7 {
  1020. if shift >= 64 {
  1021. return ErrIntOverflowUpload
  1022. }
  1023. if iNdEx >= l {
  1024. return io.ErrUnexpectedEOF
  1025. }
  1026. b := dAtA[iNdEx]
  1027. iNdEx++
  1028. m.WmPaddingY |= (uint32(b) & 0x7F) << shift
  1029. if b < 0x80 {
  1030. break
  1031. }
  1032. }
  1033. case 9:
  1034. if wireType != 1 {
  1035. return fmt.Errorf("proto: wrong wireType = %d for field WmScale", wireType)
  1036. }
  1037. var v uint64
  1038. if (iNdEx + 8) > l {
  1039. return io.ErrUnexpectedEOF
  1040. }
  1041. v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1042. iNdEx += 8
  1043. m.WmScale = float64(math.Float64frombits(v))
  1044. case 10:
  1045. if wireType != 2 {
  1046. return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
  1047. }
  1048. var stringLen uint64
  1049. for shift := uint(0); ; shift += 7 {
  1050. if shift >= 64 {
  1051. return ErrIntOverflowUpload
  1052. }
  1053. if iNdEx >= l {
  1054. return io.ErrUnexpectedEOF
  1055. }
  1056. b := dAtA[iNdEx]
  1057. iNdEx++
  1058. stringLen |= (uint64(b) & 0x7F) << shift
  1059. if b < 0x80 {
  1060. break
  1061. }
  1062. }
  1063. intStringLen := int(stringLen)
  1064. if intStringLen < 0 {
  1065. return ErrInvalidLengthUpload
  1066. }
  1067. postIndex := iNdEx + intStringLen
  1068. if postIndex > l {
  1069. return io.ErrUnexpectedEOF
  1070. }
  1071. m.Token = string(dAtA[iNdEx:postIndex])
  1072. iNdEx = postIndex
  1073. default:
  1074. iNdEx = preIndex
  1075. skippy, err := skipUpload(dAtA[iNdEx:])
  1076. if err != nil {
  1077. return err
  1078. }
  1079. if skippy < 0 {
  1080. return ErrInvalidLengthUpload
  1081. }
  1082. if (iNdEx + skippy) > l {
  1083. return io.ErrUnexpectedEOF
  1084. }
  1085. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1086. iNdEx += skippy
  1087. }
  1088. }
  1089. if iNdEx > l {
  1090. return io.ErrUnexpectedEOF
  1091. }
  1092. return nil
  1093. }
  1094. func (m *UploadFileResp) Unmarshal(dAtA []byte) error {
  1095. l := len(dAtA)
  1096. iNdEx := 0
  1097. for iNdEx < l {
  1098. preIndex := iNdEx
  1099. var wire uint64
  1100. for shift := uint(0); ; shift += 7 {
  1101. if shift >= 64 {
  1102. return ErrIntOverflowUpload
  1103. }
  1104. if iNdEx >= l {
  1105. return io.ErrUnexpectedEOF
  1106. }
  1107. b := dAtA[iNdEx]
  1108. iNdEx++
  1109. wire |= (uint64(b) & 0x7F) << shift
  1110. if b < 0x80 {
  1111. break
  1112. }
  1113. }
  1114. fieldNum := int32(wire >> 3)
  1115. wireType := int(wire & 0x7)
  1116. if wireType == 4 {
  1117. return fmt.Errorf("proto: UploadFileResp: wiretype end group for non-group")
  1118. }
  1119. if fieldNum <= 0 {
  1120. return fmt.Errorf("proto: UploadFileResp: illegal tag %d (wire type %d)", fieldNum, wire)
  1121. }
  1122. switch fieldNum {
  1123. case 1:
  1124. if wireType != 2 {
  1125. return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType)
  1126. }
  1127. var stringLen uint64
  1128. for shift := uint(0); ; shift += 7 {
  1129. if shift >= 64 {
  1130. return ErrIntOverflowUpload
  1131. }
  1132. if iNdEx >= l {
  1133. return io.ErrUnexpectedEOF
  1134. }
  1135. b := dAtA[iNdEx]
  1136. iNdEx++
  1137. stringLen |= (uint64(b) & 0x7F) << shift
  1138. if b < 0x80 {
  1139. break
  1140. }
  1141. }
  1142. intStringLen := int(stringLen)
  1143. if intStringLen < 0 {
  1144. return ErrInvalidLengthUpload
  1145. }
  1146. postIndex := iNdEx + intStringLen
  1147. if postIndex > l {
  1148. return io.ErrUnexpectedEOF
  1149. }
  1150. m.Url = string(dAtA[iNdEx:postIndex])
  1151. iNdEx = postIndex
  1152. default:
  1153. iNdEx = preIndex
  1154. skippy, err := skipUpload(dAtA[iNdEx:])
  1155. if err != nil {
  1156. return err
  1157. }
  1158. if skippy < 0 {
  1159. return ErrInvalidLengthUpload
  1160. }
  1161. if (iNdEx + skippy) > l {
  1162. return io.ErrUnexpectedEOF
  1163. }
  1164. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1165. iNdEx += skippy
  1166. }
  1167. }
  1168. if iNdEx > l {
  1169. return io.ErrUnexpectedEOF
  1170. }
  1171. return nil
  1172. }
  1173. func skipUpload(dAtA []byte) (n int, err error) {
  1174. l := len(dAtA)
  1175. iNdEx := 0
  1176. for iNdEx < l {
  1177. var wire uint64
  1178. for shift := uint(0); ; shift += 7 {
  1179. if shift >= 64 {
  1180. return 0, ErrIntOverflowUpload
  1181. }
  1182. if iNdEx >= l {
  1183. return 0, io.ErrUnexpectedEOF
  1184. }
  1185. b := dAtA[iNdEx]
  1186. iNdEx++
  1187. wire |= (uint64(b) & 0x7F) << shift
  1188. if b < 0x80 {
  1189. break
  1190. }
  1191. }
  1192. wireType := int(wire & 0x7)
  1193. switch wireType {
  1194. case 0:
  1195. for shift := uint(0); ; shift += 7 {
  1196. if shift >= 64 {
  1197. return 0, ErrIntOverflowUpload
  1198. }
  1199. if iNdEx >= l {
  1200. return 0, io.ErrUnexpectedEOF
  1201. }
  1202. iNdEx++
  1203. if dAtA[iNdEx-1] < 0x80 {
  1204. break
  1205. }
  1206. }
  1207. return iNdEx, nil
  1208. case 1:
  1209. iNdEx += 8
  1210. return iNdEx, nil
  1211. case 2:
  1212. var length int
  1213. for shift := uint(0); ; shift += 7 {
  1214. if shift >= 64 {
  1215. return 0, ErrIntOverflowUpload
  1216. }
  1217. if iNdEx >= l {
  1218. return 0, io.ErrUnexpectedEOF
  1219. }
  1220. b := dAtA[iNdEx]
  1221. iNdEx++
  1222. length |= (int(b) & 0x7F) << shift
  1223. if b < 0x80 {
  1224. break
  1225. }
  1226. }
  1227. iNdEx += length
  1228. if length < 0 {
  1229. return 0, ErrInvalidLengthUpload
  1230. }
  1231. return iNdEx, nil
  1232. case 3:
  1233. for {
  1234. var innerWire uint64
  1235. var start int = iNdEx
  1236. for shift := uint(0); ; shift += 7 {
  1237. if shift >= 64 {
  1238. return 0, ErrIntOverflowUpload
  1239. }
  1240. if iNdEx >= l {
  1241. return 0, io.ErrUnexpectedEOF
  1242. }
  1243. b := dAtA[iNdEx]
  1244. iNdEx++
  1245. innerWire |= (uint64(b) & 0x7F) << shift
  1246. if b < 0x80 {
  1247. break
  1248. }
  1249. }
  1250. innerWireType := int(innerWire & 0x7)
  1251. if innerWireType == 4 {
  1252. break
  1253. }
  1254. next, err := skipUpload(dAtA[start:])
  1255. if err != nil {
  1256. return 0, err
  1257. }
  1258. iNdEx = start + next
  1259. }
  1260. return iNdEx, nil
  1261. case 4:
  1262. return iNdEx, nil
  1263. case 5:
  1264. iNdEx += 4
  1265. return iNdEx, nil
  1266. default:
  1267. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1268. }
  1269. }
  1270. panic("unreachable")
  1271. }
  1272. var (
  1273. ErrInvalidLengthUpload = fmt.Errorf("proto: negative length found during unmarshaling")
  1274. ErrIntOverflowUpload = fmt.Errorf("proto: integer overflow")
  1275. )
  1276. func init() { proto.RegisterFile("upload.proto", fileDescriptor_upload_36f9b26ba548ca45) }
  1277. var fileDescriptor_upload_36f9b26ba548ca45 = []byte{
  1278. // 547 bytes of a gzipped FileDescriptorProto
  1279. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x93, 0xc1, 0x6e, 0xd3, 0x30,
  1280. 0x18, 0xc7, 0x95, 0x75, 0xed, 0xd6, 0x6f, 0x6b, 0xd9, 0x3c, 0x24, 0x42, 0x0f, 0x75, 0x66, 0x40,
  1281. 0xab, 0x40, 0x4b, 0xd9, 0x38, 0x20, 0x2a, 0x71, 0x29, 0xd2, 0x2e, 0x93, 0x00, 0x85, 0x4e, 0x62,
  1282. 0x5c, 0xaa, 0xb4, 0x71, 0x4b, 0xd4, 0x24, 0xce, 0x52, 0xa7, 0x69, 0x9f, 0x82, 0x87, 0xe1, 0x25,
  1283. 0x38, 0xf2, 0x04, 0x16, 0xea, 0x71, 0xc7, 0x3c, 0x01, 0x8a, 0x9d, 0x96, 0x4c, 0x54, 0xe3, 0xc6,
  1284. 0xc5, 0xed, 0xe7, 0xff, 0xef, 0x57, 0xdb, 0xf5, 0x67, 0xd8, 0x8f, 0x43, 0x8f, 0xd9, 0x8e, 0x19,
  1285. 0x46, 0x8c, 0x33, 0x74, 0xe8, 0xb9, 0x33, 0x6a, 0x66, 0x83, 0xed, 0xf8, 0x6e, 0x60, 0xce, 0xce,
  1286. 0x1a, 0xa7, 0x63, 0x97, 0x7f, 0x8d, 0x07, 0xe6, 0x90, 0xf9, 0xed, 0x31, 0x1b, 0xb3, 0xb6, 0x24,
  1287. 0x07, 0xf1, 0x48, 0x56, 0xb2, 0x90, 0xdf, 0xd4, 0x2f, 0x90, 0xef, 0x1a, 0xec, 0xbd, 0xa7, 0x49,
  1288. 0x8f, 0x4d, 0x68, 0x60, 0xd1, 0x1b, 0xf4, 0x16, 0x2a, 0x83, 0x78, 0x38, 0xa1, 0x5c, 0xd7, 0x0c,
  1289. 0xad, 0x55, 0xed, 0x3e, 0x4b, 0x05, 0x3e, 0x1e, 0xb1, 0xc8, 0xef, 0x10, 0x35, 0x4f, 0x8c, 0x99,
  1290. 0xed, 0xb9, 0x8e, 0xcd, 0x69, 0x87, 0x44, 0xf4, 0x26, 0x76, 0x23, 0xea, 0x10, 0x2b, 0x97, 0x90,
  1291. 0x01, 0x25, 0xc7, 0x8d, 0xf4, 0x2d, 0xe9, 0xd6, 0x53, 0x81, 0x41, 0xb9, 0x8e, 0x1b, 0x11, 0x2b,
  1292. 0x8b, 0xd0, 0x3b, 0xd8, 0x65, 0x21, 0x8d, 0x6c, 0xce, 0x22, 0xbd, 0x24, 0xb1, 0x93, 0x54, 0xe0,
  1293. 0x27, 0x0a, 0x5b, 0x25, 0x9b, 0x17, 0x59, 0x8b, 0xa4, 0x0d, 0xfb, 0x7f, 0x36, 0x3d, 0x0d, 0x11,
  1294. 0x86, 0x32, 0xcf, 0x8a, 0x7c, 0xd3, 0xd5, 0x5b, 0x81, 0xd5, 0x84, 0xa5, 0x3e, 0xc8, 0xb7, 0x6d,
  1295. 0xa8, 0x5d, 0xc9, 0x7f, 0xee, 0xc2, 0xf5, 0xe8, 0x7f, 0x39, 0xe8, 0x4b, 0xd8, 0x1d, 0xb9, 0x1e,
  1296. 0x0d, 0x6c, 0x9f, 0xe6, 0x07, 0x7d, 0x98, 0x0a, 0x7c, 0xa0, 0xb0, 0x2c, 0xe9, 0x67, 0x11, 0xb1,
  1297. 0xd6, 0x14, 0x7a, 0x03, 0x7b, 0x43, 0x16, 0x70, 0x1a, 0xf0, 0xde, 0x22, 0xa4, 0xfa, 0xb6, 0x94,
  1298. 0x1e, 0xa5, 0x02, 0x1f, 0x29, 0x29, 0x0f, 0xfb, 0x7c, 0x11, 0x52, 0x62, 0x15, 0x59, 0x74, 0x02,
  1299. 0xe5, 0xc4, 0xbf, 0xa4, 0x0b, 0xbd, 0x2c, 0xa5, 0xc3, 0x54, 0xe0, 0x9a, 0x92, 0x12, 0xbf, 0x3f,
  1300. 0xa1, 0x0b, 0x62, 0xa9, 0x1c, 0x3d, 0x87, 0x4a, 0xe2, 0xf7, 0xe8, 0x9c, 0xeb, 0x15, 0x49, 0xa2,
  1301. 0x54, 0xe0, 0xfa, 0x9a, 0xe4, 0x74, 0xce, 0x89, 0x95, 0x13, 0xe8, 0x35, 0x40, 0xe2, 0x7f, 0xb4,
  1302. 0x1d, 0xc7, 0x0d, 0xc6, 0x9f, 0xf5, 0x1d, 0x43, 0x6b, 0xd5, 0x8a, 0xdb, 0x49, 0xfc, 0x7e, 0xa8,
  1303. 0xc2, 0xfe, 0x9c, 0x58, 0x05, 0xf4, 0x8e, 0x78, 0xad, 0xef, 0xde, 0x23, 0x2e, 0x8a, 0xe2, 0x35,
  1304. 0x3a, 0x85, 0x9d, 0xc4, 0xff, 0x34, 0xb4, 0x3d, 0xaa, 0x57, 0x0d, 0xad, 0xa5, 0x75, 0x8f, 0x52,
  1305. 0x81, 0x1f, 0xac, 0xad, 0x69, 0x96, 0x10, 0x6b, 0xc5, 0xa0, 0xce, 0xea, 0xda, 0x41, 0x9e, 0xe5,
  1306. 0x69, 0x2a, 0xb0, 0xa1, 0x60, 0x75, 0xeb, 0x1b, 0x6f, 0x30, 0xef, 0x88, 0x17, 0x50, 0x2f, 0x36,
  1307. 0xc4, 0x34, 0x44, 0x8f, 0xa1, 0x14, 0x47, 0x5e, 0xde, 0x0e, 0x3b, 0xb7, 0x02, 0x67, 0xa5, 0x95,
  1308. 0x0d, 0xe7, 0x1f, 0xa0, 0x2c, 0x9b, 0x0d, 0x5d, 0x40, 0x29, 0xa0, 0x09, 0x6a, 0x9a, 0x7f, 0x3d,
  1309. 0x3c, 0xb3, 0xf0, 0x8a, 0x1a, 0xf8, 0xde, 0x7c, 0x1a, 0x9e, 0x5f, 0x41, 0x45, 0xad, 0x8e, 0x2e,
  1310. 0x61, 0x3b, 0x6b, 0x00, 0x64, 0x6c, 0x50, 0xee, 0x74, 0x6c, 0xe3, 0xf8, 0x1f, 0xc4, 0x34, 0xec,
  1311. 0x1e, 0xfc, 0x58, 0x36, 0xb5, 0x9f, 0xcb, 0xa6, 0xf6, 0x6b, 0xd9, 0xd4, 0xbe, 0x6c, 0xcd, 0xce,
  1312. 0x06, 0x15, 0xf9, 0xcc, 0x5f, 0xfd, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x66, 0xef, 0xbe, 0x83, 0x38,
  1313. 0x04, 0x00, 0x00,
  1314. }