|
@@ -0,0 +1,230 @@
|
|
|
|
+// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
|
+// source: service.proto
|
|
|
|
+
|
|
|
|
+package pb
|
|
|
|
+
|
|
|
|
+import (
|
|
|
|
+ context "context"
|
|
|
|
+ fmt "fmt"
|
|
|
|
+ proto "github.com/golang/protobuf/proto"
|
|
|
|
+ grpc "google.golang.org/grpc"
|
|
|
|
+ math "math"
|
|
|
|
+)
|
|
|
|
+
|
|
|
|
+// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
+var _ = proto.Marshal
|
|
|
|
+var _ = fmt.Errorf
|
|
|
|
+var _ = math.Inf
|
|
|
|
+
|
|
|
|
+// This is a compile-time assertion to ensure that this generated file
|
|
|
|
+// is compatible with the proto package it is being compiled against.
|
|
|
|
+// A compilation error at this line likely means your copy of the
|
|
|
|
+// proto package needs to be updated.
|
|
|
|
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
+
|
|
|
|
+type Request struct {
|
|
|
|
+ BucketID string `protobuf:"bytes,1,opt,name=bucketID,proto3" json:"bucketID,omitempty"`
|
|
|
|
+ ObjectName string `protobuf:"bytes,2,opt,name=objectName,proto3" json:"objectName,omitempty"`
|
|
|
|
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
+ XXX_unrecognized []byte `json:"-"`
|
|
|
|
+ XXX_sizecache int32 `json:"-"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (m *Request) Reset() { *m = Request{} }
|
|
|
|
+func (m *Request) String() string { return proto.CompactTextString(m) }
|
|
|
|
+func (*Request) ProtoMessage() {}
|
|
|
|
+func (*Request) Descriptor() ([]byte, []int) {
|
|
|
|
+ return fileDescriptor_a0b84a42fa06f626, []int{0}
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (m *Request) XXX_Unmarshal(b []byte) error {
|
|
|
|
+ return xxx_messageInfo_Request.Unmarshal(m, b)
|
|
|
|
+}
|
|
|
|
+func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
+ return xxx_messageInfo_Request.Marshal(b, m, deterministic)
|
|
|
|
+}
|
|
|
|
+func (m *Request) XXX_Merge(src proto.Message) {
|
|
|
|
+ xxx_messageInfo_Request.Merge(m, src)
|
|
|
|
+}
|
|
|
|
+func (m *Request) XXX_Size() int {
|
|
|
|
+ return xxx_messageInfo_Request.Size(m)
|
|
|
|
+}
|
|
|
|
+func (m *Request) XXX_DiscardUnknown() {
|
|
|
|
+ xxx_messageInfo_Request.DiscardUnknown(m)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+var xxx_messageInfo_Request proto.InternalMessageInfo
|
|
|
|
+
|
|
|
|
+func (m *Request) GetBucketID() string {
|
|
|
|
+ if m != nil {
|
|
|
|
+ return m.BucketID
|
|
|
|
+ }
|
|
|
|
+ return ""
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (m *Request) GetObjectName() string {
|
|
|
|
+ if m != nil {
|
|
|
|
+ return m.ObjectName
|
|
|
|
+ }
|
|
|
|
+ return ""
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type Response struct {
|
|
|
|
+ Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
|
|
|
|
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
+ XXX_unrecognized []byte `json:"-"`
|
|
|
|
+ XXX_sizecache int32 `json:"-"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (m *Response) Reset() { *m = Response{} }
|
|
|
|
+func (m *Response) String() string { return proto.CompactTextString(m) }
|
|
|
|
+func (*Response) ProtoMessage() {}
|
|
|
|
+func (*Response) Descriptor() ([]byte, []int) {
|
|
|
|
+ return fileDescriptor_a0b84a42fa06f626, []int{1}
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (m *Response) XXX_Unmarshal(b []byte) error {
|
|
|
|
+ return xxx_messageInfo_Response.Unmarshal(m, b)
|
|
|
|
+}
|
|
|
|
+func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
+ return xxx_messageInfo_Response.Marshal(b, m, deterministic)
|
|
|
|
+}
|
|
|
|
+func (m *Response) XXX_Merge(src proto.Message) {
|
|
|
|
+ xxx_messageInfo_Response.Merge(m, src)
|
|
|
|
+}
|
|
|
|
+func (m *Response) XXX_Size() int {
|
|
|
|
+ return xxx_messageInfo_Response.Size(m)
|
|
|
|
+}
|
|
|
|
+func (m *Response) XXX_DiscardUnknown() {
|
|
|
|
+ xxx_messageInfo_Response.DiscardUnknown(m)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+var xxx_messageInfo_Response proto.InternalMessageInfo
|
|
|
|
+
|
|
|
|
+func (m *Response) GetContent() []byte {
|
|
|
|
+ if m != nil {
|
|
|
|
+ return m.Content
|
|
|
|
+ }
|
|
|
|
+ return nil
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func init() {
|
|
|
|
+ proto.RegisterType((*Request)(nil), "protobuf.Request")
|
|
|
|
+ proto.RegisterType((*Response)(nil), "protobuf.Response")
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func init() { proto.RegisterFile("service.proto", fileDescriptor_a0b84a42fa06f626) }
|
|
|
|
+
|
|
|
|
+var fileDescriptor_a0b84a42fa06f626 = []byte{
|
|
|
|
+ // 176 bytes of a gzipped FileDescriptorProto
|
|
|
|
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2d, 0x4e, 0x2d, 0x2a,
|
|
|
|
+ 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x00, 0x53, 0x49, 0xa5, 0x69,
|
|
|
|
+ 0x4a, 0xae, 0x5c, 0xec, 0x41, 0xa9, 0x85, 0xa5, 0xa9, 0xc5, 0x25, 0x42, 0x52, 0x5c, 0x1c, 0x49,
|
|
|
|
+ 0xa5, 0xc9, 0xd9, 0xa9, 0x25, 0x9e, 0x2e, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x70, 0xbe,
|
|
|
|
+ 0x90, 0x1c, 0x17, 0x57, 0x7e, 0x52, 0x56, 0x6a, 0x72, 0x89, 0x5f, 0x62, 0x6e, 0xaa, 0x04, 0x13,
|
|
|
|
+ 0x58, 0x16, 0x49, 0x44, 0x49, 0x85, 0x8b, 0x23, 0x28, 0xb5, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55,
|
|
|
|
+ 0x48, 0x82, 0x8b, 0x3d, 0x39, 0x3f, 0xaf, 0x24, 0x35, 0xaf, 0x04, 0x6c, 0x0c, 0x4f, 0x10, 0x8c,
|
|
|
|
+ 0x6b, 0x64, 0xc7, 0xc5, 0x1e, 0x0c, 0x71, 0x87, 0x90, 0x31, 0x17, 0x87, 0x4b, 0x7e, 0x79, 0x5e,
|
|
|
|
+ 0x4e, 0x7e, 0x62, 0x8a, 0x90, 0xa0, 0x1e, 0xcc, 0x39, 0x7a, 0x50, 0xb7, 0x48, 0x09, 0x21, 0x0b,
|
|
|
|
+ 0x41, 0xcc, 0x35, 0x60, 0x74, 0x62, 0x8f, 0x62, 0xd5, 0xd3, 0xd3, 0x2f, 0x48, 0x4a, 0x62, 0x03,
|
|
|
|
+ 0xcb, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4e, 0xfa, 0x54, 0xd7, 0xd7, 0x00, 0x00, 0x00,
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
+var _ context.Context
|
|
|
|
+var _ grpc.ClientConn
|
|
|
|
+
|
|
|
|
+// This is a compile-time assertion to ensure that this generated file
|
|
|
|
+// is compatible with the grpc package it is being compiled against.
|
|
|
|
+const _ = grpc.SupportPackageIsVersion4
|
|
|
|
+
|
|
|
|
+// ServiceClient is the client API for Service service.
|
|
|
|
+//
|
|
|
|
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
+type ServiceClient interface {
|
|
|
|
+ Download(ctx context.Context, in *Request, opts ...grpc.CallOption) (Service_DownloadClient, error)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type serviceClient struct {
|
|
|
|
+ cc *grpc.ClientConn
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func NewServiceClient(cc *grpc.ClientConn) ServiceClient {
|
|
|
|
+ return &serviceClient{cc}
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (c *serviceClient) Download(ctx context.Context, in *Request, opts ...grpc.CallOption) (Service_DownloadClient, error) {
|
|
|
|
+ stream, err := c.cc.NewStream(ctx, &_Service_serviceDesc.Streams[0], "/protobuf.Service/Download", opts...)
|
|
|
|
+ if err != nil {
|
|
|
|
+ return nil, err
|
|
|
|
+ }
|
|
|
|
+ x := &serviceDownloadClient{stream}
|
|
|
|
+ if err := x.ClientStream.SendMsg(in); err != nil {
|
|
|
|
+ return nil, err
|
|
|
|
+ }
|
|
|
|
+ if err := x.ClientStream.CloseSend(); err != nil {
|
|
|
|
+ return nil, err
|
|
|
|
+ }
|
|
|
|
+ return x, nil
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type Service_DownloadClient interface {
|
|
|
|
+ Recv() (*Response, error)
|
|
|
|
+ grpc.ClientStream
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type serviceDownloadClient struct {
|
|
|
|
+ grpc.ClientStream
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *serviceDownloadClient) Recv() (*Response, error) {
|
|
|
|
+ m := new(Response)
|
|
|
|
+ if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
|
|
+ return nil, err
|
|
|
|
+ }
|
|
|
|
+ return m, nil
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// ServiceServer is the server API for Service service.
|
|
|
|
+type ServiceServer interface {
|
|
|
|
+ Download(*Request, Service_DownloadServer) error
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func RegisterServiceServer(s *grpc.Server, srv ServiceServer) {
|
|
|
|
+ s.RegisterService(&_Service_serviceDesc, srv)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func _Service_Download_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
|
|
+ m := new(Request)
|
|
|
|
+ if err := stream.RecvMsg(m); err != nil {
|
|
|
|
+ return err
|
|
|
|
+ }
|
|
|
|
+ return srv.(ServiceServer).Download(m, &serviceDownloadServer{stream})
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type Service_DownloadServer interface {
|
|
|
|
+ Send(*Response) error
|
|
|
|
+ grpc.ServerStream
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type serviceDownloadServer struct {
|
|
|
|
+ grpc.ServerStream
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *serviceDownloadServer) Send(m *Response) error {
|
|
|
|
+ return x.ServerStream.SendMsg(m)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+var _Service_serviceDesc = grpc.ServiceDesc{
|
|
|
|
+ ServiceName: "protobuf.Service",
|
|
|
|
+ HandlerType: (*ServiceServer)(nil),
|
|
|
|
+ Methods: []grpc.MethodDesc{},
|
|
|
|
+ Streams: []grpc.StreamDesc{
|
|
|
|
+ {
|
|
|
|
+ StreamName: "Download",
|
|
|
|
+ Handler: _Service_Download_Handler,
|
|
|
|
+ ServerStreams: true,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ Metadata: "service.proto",
|
|
|
|
+}
|