service.pb.go 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: service.proto
  3. package pb
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. proto "github.com/golang/protobuf/proto"
  8. grpc "google.golang.org/grpc"
  9. math "math"
  10. )
  11. // Reference imports to suppress errors if they are not otherwise used.
  12. var _ = proto.Marshal
  13. var _ = fmt.Errorf
  14. var _ = math.Inf
  15. // This is a compile-time assertion to ensure that this generated file
  16. // is compatible with the proto package it is being compiled against.
  17. // A compilation error at this line likely means your copy of the
  18. // proto package needs to be updated.
  19. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  20. type Request struct {
  21. BucketID string `protobuf:"bytes,1,opt,name=bucketID,proto3" json:"bucketID,omitempty"`
  22. ObjectName string `protobuf:"bytes,2,opt,name=objectName,proto3" json:"objectName,omitempty"`
  23. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  24. XXX_unrecognized []byte `json:"-"`
  25. XXX_sizecache int32 `json:"-"`
  26. }
  27. func (m *Request) Reset() { *m = Request{} }
  28. func (m *Request) String() string { return proto.CompactTextString(m) }
  29. func (*Request) ProtoMessage() {}
  30. func (*Request) Descriptor() ([]byte, []int) {
  31. return fileDescriptor_a0b84a42fa06f626, []int{0}
  32. }
  33. func (m *Request) XXX_Unmarshal(b []byte) error {
  34. return xxx_messageInfo_Request.Unmarshal(m, b)
  35. }
  36. func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  37. return xxx_messageInfo_Request.Marshal(b, m, deterministic)
  38. }
  39. func (m *Request) XXX_Merge(src proto.Message) {
  40. xxx_messageInfo_Request.Merge(m, src)
  41. }
  42. func (m *Request) XXX_Size() int {
  43. return xxx_messageInfo_Request.Size(m)
  44. }
  45. func (m *Request) XXX_DiscardUnknown() {
  46. xxx_messageInfo_Request.DiscardUnknown(m)
  47. }
  48. var xxx_messageInfo_Request proto.InternalMessageInfo
  49. func (m *Request) GetBucketID() string {
  50. if m != nil {
  51. return m.BucketID
  52. }
  53. return ""
  54. }
  55. func (m *Request) GetObjectName() string {
  56. if m != nil {
  57. return m.ObjectName
  58. }
  59. return ""
  60. }
  61. type Response struct {
  62. Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
  63. ErrorCode int64 `protobuf:"varint,2,opt,name=errorCode,proto3" json:"errorCode,omitempty"`
  64. ErrorMsg string `protobuf:"bytes,3,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"`
  65. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  66. XXX_unrecognized []byte `json:"-"`
  67. XXX_sizecache int32 `json:"-"`
  68. }
  69. func (m *Response) Reset() { *m = Response{} }
  70. func (m *Response) String() string { return proto.CompactTextString(m) }
  71. func (*Response) ProtoMessage() {}
  72. func (*Response) Descriptor() ([]byte, []int) {
  73. return fileDescriptor_a0b84a42fa06f626, []int{1}
  74. }
  75. func (m *Response) XXX_Unmarshal(b []byte) error {
  76. return xxx_messageInfo_Response.Unmarshal(m, b)
  77. }
  78. func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  79. return xxx_messageInfo_Response.Marshal(b, m, deterministic)
  80. }
  81. func (m *Response) XXX_Merge(src proto.Message) {
  82. xxx_messageInfo_Response.Merge(m, src)
  83. }
  84. func (m *Response) XXX_Size() int {
  85. return xxx_messageInfo_Response.Size(m)
  86. }
  87. func (m *Response) XXX_DiscardUnknown() {
  88. xxx_messageInfo_Response.DiscardUnknown(m)
  89. }
  90. var xxx_messageInfo_Response proto.InternalMessageInfo
  91. func (m *Response) GetData() []byte {
  92. if m != nil {
  93. return m.Data
  94. }
  95. return nil
  96. }
  97. func (m *Response) GetErrorCode() int64 {
  98. if m != nil {
  99. return m.ErrorCode
  100. }
  101. return 0
  102. }
  103. func (m *Response) GetErrorMsg() string {
  104. if m != nil {
  105. return m.ErrorMsg
  106. }
  107. return ""
  108. }
  109. func init() {
  110. proto.RegisterType((*Request)(nil), "protobuf.Request")
  111. proto.RegisterType((*Response)(nil), "protobuf.Response")
  112. }
  113. func init() { proto.RegisterFile("service.proto", fileDescriptor_a0b84a42fa06f626) }
  114. var fileDescriptor_a0b84a42fa06f626 = []byte{
  115. // 204 bytes of a gzipped FileDescriptorProto
  116. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2d, 0x4e, 0x2d, 0x2a,
  117. 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x00, 0x53, 0x49, 0xa5, 0x69,
  118. 0x4a, 0xae, 0x5c, 0xec, 0x41, 0xa9, 0x85, 0xa5, 0xa9, 0xc5, 0x25, 0x42, 0x52, 0x5c, 0x1c, 0x49,
  119. 0xa5, 0xc9, 0xd9, 0xa9, 0x25, 0x9e, 0x2e, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x70, 0xbe,
  120. 0x90, 0x1c, 0x17, 0x57, 0x7e, 0x52, 0x56, 0x6a, 0x72, 0x89, 0x5f, 0x62, 0x6e, 0xaa, 0x04, 0x13,
  121. 0x58, 0x16, 0x49, 0x44, 0x29, 0x82, 0x8b, 0x23, 0x28, 0xb5, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55,
  122. 0x48, 0x88, 0x8b, 0x25, 0x25, 0xb1, 0x24, 0x11, 0x6c, 0x06, 0x4f, 0x10, 0x98, 0x2d, 0x24, 0xc3,
  123. 0xc5, 0x99, 0x5a, 0x54, 0x94, 0x5f, 0xe4, 0x9c, 0x9f, 0x02, 0xd1, 0xce, 0x1c, 0x84, 0x10, 0x00,
  124. 0xd9, 0x0c, 0xe6, 0xf8, 0x16, 0xa7, 0x4b, 0x30, 0x43, 0x6c, 0x86, 0xf1, 0x8d, 0xec, 0xb8, 0xd8,
  125. 0x83, 0x21, 0x6e, 0x17, 0x32, 0xe6, 0xe2, 0x70, 0xc9, 0x2f, 0xcf, 0xcb, 0xc9, 0x4f, 0x4c, 0x11,
  126. 0x12, 0xd4, 0x83, 0x79, 0x41, 0x0f, 0xea, 0x7e, 0x29, 0x21, 0x64, 0x21, 0x88, 0x5b, 0x0c, 0x18,
  127. 0x9d, 0xd8, 0xa3, 0x58, 0xf5, 0xf4, 0xf4, 0x0b, 0x92, 0x92, 0xd8, 0xc0, 0xb2, 0xc6, 0x80, 0x00,
  128. 0x00, 0x00, 0xff, 0xff, 0xbe, 0xb8, 0x80, 0x00, 0x0b, 0x01, 0x00, 0x00,
  129. }
  130. // Reference imports to suppress errors if they are not otherwise used.
  131. var _ context.Context
  132. var _ grpc.ClientConn
  133. // This is a compile-time assertion to ensure that this generated file
  134. // is compatible with the grpc package it is being compiled against.
  135. const _ = grpc.SupportPackageIsVersion4
  136. // ServiceClient is the client API for Service service.
  137. //
  138. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  139. type ServiceClient interface {
  140. Download(ctx context.Context, in *Request, opts ...grpc.CallOption) (Service_DownloadClient, error)
  141. }
  142. type serviceClient struct {
  143. cc *grpc.ClientConn
  144. }
  145. func NewServiceClient(cc *grpc.ClientConn) ServiceClient {
  146. return &serviceClient{cc}
  147. }
  148. func (c *serviceClient) Download(ctx context.Context, in *Request, opts ...grpc.CallOption) (Service_DownloadClient, error) {
  149. stream, err := c.cc.NewStream(ctx, &_Service_serviceDesc.Streams[0], "/protobuf.Service/Download", opts...)
  150. if err != nil {
  151. return nil, err
  152. }
  153. x := &serviceDownloadClient{stream}
  154. if err := x.ClientStream.SendMsg(in); err != nil {
  155. return nil, err
  156. }
  157. if err := x.ClientStream.CloseSend(); err != nil {
  158. return nil, err
  159. }
  160. return x, nil
  161. }
  162. type Service_DownloadClient interface {
  163. Recv() (*Response, error)
  164. grpc.ClientStream
  165. }
  166. type serviceDownloadClient struct {
  167. grpc.ClientStream
  168. }
  169. func (x *serviceDownloadClient) Recv() (*Response, error) {
  170. m := new(Response)
  171. if err := x.ClientStream.RecvMsg(m); err != nil {
  172. return nil, err
  173. }
  174. return m, nil
  175. }
  176. // ServiceServer is the server API for Service service.
  177. type ServiceServer interface {
  178. Download(*Request, Service_DownloadServer) error
  179. }
  180. func RegisterServiceServer(s *grpc.Server, srv ServiceServer) {
  181. s.RegisterService(&_Service_serviceDesc, srv)
  182. }
  183. func _Service_Download_Handler(srv interface{}, stream grpc.ServerStream) error {
  184. m := new(Request)
  185. if err := stream.RecvMsg(m); err != nil {
  186. return err
  187. }
  188. return srv.(ServiceServer).Download(m, &serviceDownloadServer{stream})
  189. }
  190. type Service_DownloadServer interface {
  191. Send(*Response) error
  192. grpc.ServerStream
  193. }
  194. type serviceDownloadServer struct {
  195. grpc.ServerStream
  196. }
  197. func (x *serviceDownloadServer) Send(m *Response) error {
  198. return x.ServerStream.SendMsg(m)
  199. }
  200. var _Service_serviceDesc = grpc.ServiceDesc{
  201. ServiceName: "protobuf.Service",
  202. HandlerType: (*ServiceServer)(nil),
  203. Methods: []grpc.MethodDesc{},
  204. Streams: []grpc.StreamDesc{
  205. {
  206. StreamName: "Download",
  207. Handler: _Service_Download_Handler,
  208. ServerStreams: true,
  209. },
  210. },
  211. Metadata: "service.proto",
  212. }