lbry.go/blobex/blobex.pb.go
Alex Grintsvayg df5177dff0
update blobex
2018-10-25 14:25:30 -04:00

757 lines
25 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: blobex.proto
package blobex
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// 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.ProtoPackageIsVersion2 // please upgrade the proto package
type Error struct {
// should we enum the error codes?
Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Error) Reset() { *m = Error{} }
func (m *Error) String() string { return proto.CompactTextString(m) }
func (*Error) ProtoMessage() {}
func (*Error) Descriptor() ([]byte, []int) {
return fileDescriptor_183aee39e18f30c9, []int{0}
}
func (m *Error) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Error.Unmarshal(m, b)
}
func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Error.Marshal(b, m, deterministic)
}
func (m *Error) XXX_Merge(src proto.Message) {
xxx_messageInfo_Error.Merge(m, src)
}
func (m *Error) XXX_Size() int {
return xxx_messageInfo_Error.Size(m)
}
func (m *Error) XXX_DiscardUnknown() {
xxx_messageInfo_Error.DiscardUnknown(m)
}
var xxx_messageInfo_Error proto.InternalMessageInfo
func (m *Error) GetCode() uint32 {
if m != nil {
return m.Code
}
return 0
}
func (m *Error) GetMessage() string {
if m != nil {
return m.Message
}
return ""
}
// how much does the host charge per kb at the moment
type PriceCheckRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PriceCheckRequest) Reset() { *m = PriceCheckRequest{} }
func (m *PriceCheckRequest) String() string { return proto.CompactTextString(m) }
func (*PriceCheckRequest) ProtoMessage() {}
func (*PriceCheckRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_183aee39e18f30c9, []int{1}
}
func (m *PriceCheckRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PriceCheckRequest.Unmarshal(m, b)
}
func (m *PriceCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PriceCheckRequest.Marshal(b, m, deterministic)
}
func (m *PriceCheckRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_PriceCheckRequest.Merge(m, src)
}
func (m *PriceCheckRequest) XXX_Size() int {
return xxx_messageInfo_PriceCheckRequest.Size(m)
}
func (m *PriceCheckRequest) XXX_DiscardUnknown() {
xxx_messageInfo_PriceCheckRequest.DiscardUnknown(m)
}
var xxx_messageInfo_PriceCheckRequest proto.InternalMessageInfo
type PriceCheckResponse struct {
Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
DeweysPerKB uint64 `protobuf:"varint,2,opt,name=deweysPerKB,proto3" json:"deweysPerKB,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PriceCheckResponse) Reset() { *m = PriceCheckResponse{} }
func (m *PriceCheckResponse) String() string { return proto.CompactTextString(m) }
func (*PriceCheckResponse) ProtoMessage() {}
func (*PriceCheckResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_183aee39e18f30c9, []int{2}
}
func (m *PriceCheckResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PriceCheckResponse.Unmarshal(m, b)
}
func (m *PriceCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PriceCheckResponse.Marshal(b, m, deterministic)
}
func (m *PriceCheckResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_PriceCheckResponse.Merge(m, src)
}
func (m *PriceCheckResponse) XXX_Size() int {
return xxx_messageInfo_PriceCheckResponse.Size(m)
}
func (m *PriceCheckResponse) XXX_DiscardUnknown() {
xxx_messageInfo_PriceCheckResponse.DiscardUnknown(m)
}
var xxx_messageInfo_PriceCheckResponse proto.InternalMessageInfo
func (m *PriceCheckResponse) GetError() *Error {
if m != nil {
return m.Error
}
return nil
}
func (m *PriceCheckResponse) GetDeweysPerKB() uint64 {
if m != nil {
return m.DeweysPerKB
}
return 0
}
// are any of the hashs available for download, or are any of the hashes desired for upload
// NOTE: if any hashes are stream hashes, and the server has the manifest but not all the content
// blobs, the server may reply that it needs extra blobs that were not in the original request
type HashesRequest struct {
Hashes []string `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *HashesRequest) Reset() { *m = HashesRequest{} }
func (m *HashesRequest) String() string { return proto.CompactTextString(m) }
func (*HashesRequest) ProtoMessage() {}
func (*HashesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_183aee39e18f30c9, []int{3}
}
func (m *HashesRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HashesRequest.Unmarshal(m, b)
}
func (m *HashesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_HashesRequest.Marshal(b, m, deterministic)
}
func (m *HashesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_HashesRequest.Merge(m, src)
}
func (m *HashesRequest) XXX_Size() int {
return xxx_messageInfo_HashesRequest.Size(m)
}
func (m *HashesRequest) XXX_DiscardUnknown() {
xxx_messageInfo_HashesRequest.DiscardUnknown(m)
}
var xxx_messageInfo_HashesRequest proto.InternalMessageInfo
func (m *HashesRequest) GetHashes() []string {
if m != nil {
return m.Hashes
}
return nil
}
type HashesResponse struct {
Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
Hashes map[string]bool `protobuf:"bytes,2,rep,name=hashes,proto3" json:"hashes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *HashesResponse) Reset() { *m = HashesResponse{} }
func (m *HashesResponse) String() string { return proto.CompactTextString(m) }
func (*HashesResponse) ProtoMessage() {}
func (*HashesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_183aee39e18f30c9, []int{4}
}
func (m *HashesResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HashesResponse.Unmarshal(m, b)
}
func (m *HashesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_HashesResponse.Marshal(b, m, deterministic)
}
func (m *HashesResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_HashesResponse.Merge(m, src)
}
func (m *HashesResponse) XXX_Size() int {
return xxx_messageInfo_HashesResponse.Size(m)
}
func (m *HashesResponse) XXX_DiscardUnknown() {
xxx_messageInfo_HashesResponse.DiscardUnknown(m)
}
var xxx_messageInfo_HashesResponse proto.InternalMessageInfo
func (m *HashesResponse) GetError() *Error {
if m != nil {
return m.Error
}
return nil
}
func (m *HashesResponse) GetHashes() map[string]bool {
if m != nil {
return m.Hashes
}
return nil
}
// download the hash
type DownloadRequest struct {
Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DownloadRequest) Reset() { *m = DownloadRequest{} }
func (m *DownloadRequest) String() string { return proto.CompactTextString(m) }
func (*DownloadRequest) ProtoMessage() {}
func (*DownloadRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_183aee39e18f30c9, []int{5}
}
func (m *DownloadRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DownloadRequest.Unmarshal(m, b)
}
func (m *DownloadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DownloadRequest.Marshal(b, m, deterministic)
}
func (m *DownloadRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DownloadRequest.Merge(m, src)
}
func (m *DownloadRequest) XXX_Size() int {
return xxx_messageInfo_DownloadRequest.Size(m)
}
func (m *DownloadRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DownloadRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DownloadRequest proto.InternalMessageInfo
func (m *DownloadRequest) GetHash() string {
if m != nil {
return m.Hash
}
return ""
}
type DownloadResponse struct {
Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
Blob []byte `protobuf:"bytes,3,opt,name=blob,proto3" json:"blob,omitempty"`
Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DownloadResponse) Reset() { *m = DownloadResponse{} }
func (m *DownloadResponse) String() string { return proto.CompactTextString(m) }
func (*DownloadResponse) ProtoMessage() {}
func (*DownloadResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_183aee39e18f30c9, []int{6}
}
func (m *DownloadResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DownloadResponse.Unmarshal(m, b)
}
func (m *DownloadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DownloadResponse.Marshal(b, m, deterministic)
}
func (m *DownloadResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_DownloadResponse.Merge(m, src)
}
func (m *DownloadResponse) XXX_Size() int {
return xxx_messageInfo_DownloadResponse.Size(m)
}
func (m *DownloadResponse) XXX_DiscardUnknown() {
xxx_messageInfo_DownloadResponse.DiscardUnknown(m)
}
var xxx_messageInfo_DownloadResponse proto.InternalMessageInfo
func (m *DownloadResponse) GetError() *Error {
if m != nil {
return m.Error
}
return nil
}
func (m *DownloadResponse) GetHash() string {
if m != nil {
return m.Hash
}
return ""
}
func (m *DownloadResponse) GetBlob() []byte {
if m != nil {
return m.Blob
}
return nil
}
func (m *DownloadResponse) GetAddress() string {
if m != nil {
return m.Address
}
return ""
}
// upload the hash
type UploadRequest struct {
Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
Blob []byte `protobuf:"bytes,2,opt,name=blob,proto3" json:"blob,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UploadRequest) Reset() { *m = UploadRequest{} }
func (m *UploadRequest) String() string { return proto.CompactTextString(m) }
func (*UploadRequest) ProtoMessage() {}
func (*UploadRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_183aee39e18f30c9, []int{7}
}
func (m *UploadRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UploadRequest.Unmarshal(m, b)
}
func (m *UploadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UploadRequest.Marshal(b, m, deterministic)
}
func (m *UploadRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UploadRequest.Merge(m, src)
}
func (m *UploadRequest) XXX_Size() int {
return xxx_messageInfo_UploadRequest.Size(m)
}
func (m *UploadRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UploadRequest.DiscardUnknown(m)
}
var xxx_messageInfo_UploadRequest proto.InternalMessageInfo
func (m *UploadRequest) GetHash() string {
if m != nil {
return m.Hash
}
return ""
}
func (m *UploadRequest) GetBlob() []byte {
if m != nil {
return m.Blob
}
return nil
}
type UploadResponse struct {
Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UploadResponse) Reset() { *m = UploadResponse{} }
func (m *UploadResponse) String() string { return proto.CompactTextString(m) }
func (*UploadResponse) ProtoMessage() {}
func (*UploadResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_183aee39e18f30c9, []int{8}
}
func (m *UploadResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UploadResponse.Unmarshal(m, b)
}
func (m *UploadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UploadResponse.Marshal(b, m, deterministic)
}
func (m *UploadResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_UploadResponse.Merge(m, src)
}
func (m *UploadResponse) XXX_Size() int {
return xxx_messageInfo_UploadResponse.Size(m)
}
func (m *UploadResponse) XXX_DiscardUnknown() {
xxx_messageInfo_UploadResponse.DiscardUnknown(m)
}
var xxx_messageInfo_UploadResponse proto.InternalMessageInfo
func (m *UploadResponse) GetError() *Error {
if m != nil {
return m.Error
}
return nil
}
func (m *UploadResponse) GetHash() string {
if m != nil {
return m.Hash
}
return ""
}
func init() {
proto.RegisterType((*Error)(nil), "blobex.Error")
proto.RegisterType((*PriceCheckRequest)(nil), "blobex.PriceCheckRequest")
proto.RegisterType((*PriceCheckResponse)(nil), "blobex.PriceCheckResponse")
proto.RegisterType((*HashesRequest)(nil), "blobex.HashesRequest")
proto.RegisterType((*HashesResponse)(nil), "blobex.HashesResponse")
proto.RegisterMapType((map[string]bool)(nil), "blobex.HashesResponse.HashesEntry")
proto.RegisterType((*DownloadRequest)(nil), "blobex.DownloadRequest")
proto.RegisterType((*DownloadResponse)(nil), "blobex.DownloadResponse")
proto.RegisterType((*UploadRequest)(nil), "blobex.UploadRequest")
proto.RegisterType((*UploadResponse)(nil), "blobex.UploadResponse")
}
// 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
// BlobExchangeClient is the client API for BlobExchange service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type BlobExchangeClient interface {
PriceCheck(ctx context.Context, in *PriceCheckRequest, opts ...grpc.CallOption) (*PriceCheckResponse, error)
DownloadCheck(ctx context.Context, in *HashesRequest, opts ...grpc.CallOption) (*HashesResponse, error)
Download(ctx context.Context, opts ...grpc.CallOption) (BlobExchange_DownloadClient, error)
UploadCheck(ctx context.Context, in *HashesRequest, opts ...grpc.CallOption) (*HashesResponse, error)
Upload(ctx context.Context, opts ...grpc.CallOption) (BlobExchange_UploadClient, error)
}
type blobExchangeClient struct {
cc *grpc.ClientConn
}
func NewBlobExchangeClient(cc *grpc.ClientConn) BlobExchangeClient {
return &blobExchangeClient{cc}
}
func (c *blobExchangeClient) PriceCheck(ctx context.Context, in *PriceCheckRequest, opts ...grpc.CallOption) (*PriceCheckResponse, error) {
out := new(PriceCheckResponse)
err := c.cc.Invoke(ctx, "/blobex.BlobExchange/PriceCheck", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *blobExchangeClient) DownloadCheck(ctx context.Context, in *HashesRequest, opts ...grpc.CallOption) (*HashesResponse, error) {
out := new(HashesResponse)
err := c.cc.Invoke(ctx, "/blobex.BlobExchange/DownloadCheck", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *blobExchangeClient) Download(ctx context.Context, opts ...grpc.CallOption) (BlobExchange_DownloadClient, error) {
stream, err := c.cc.NewStream(ctx, &_BlobExchange_serviceDesc.Streams[0], "/blobex.BlobExchange/Download", opts...)
if err != nil {
return nil, err
}
x := &blobExchangeDownloadClient{stream}
return x, nil
}
type BlobExchange_DownloadClient interface {
Send(*DownloadRequest) error
Recv() (*DownloadResponse, error)
grpc.ClientStream
}
type blobExchangeDownloadClient struct {
grpc.ClientStream
}
func (x *blobExchangeDownloadClient) Send(m *DownloadRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *blobExchangeDownloadClient) Recv() (*DownloadResponse, error) {
m := new(DownloadResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *blobExchangeClient) UploadCheck(ctx context.Context, in *HashesRequest, opts ...grpc.CallOption) (*HashesResponse, error) {
out := new(HashesResponse)
err := c.cc.Invoke(ctx, "/blobex.BlobExchange/UploadCheck", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *blobExchangeClient) Upload(ctx context.Context, opts ...grpc.CallOption) (BlobExchange_UploadClient, error) {
stream, err := c.cc.NewStream(ctx, &_BlobExchange_serviceDesc.Streams[1], "/blobex.BlobExchange/Upload", opts...)
if err != nil {
return nil, err
}
x := &blobExchangeUploadClient{stream}
return x, nil
}
type BlobExchange_UploadClient interface {
Send(*UploadRequest) error
Recv() (*UploadResponse, error)
grpc.ClientStream
}
type blobExchangeUploadClient struct {
grpc.ClientStream
}
func (x *blobExchangeUploadClient) Send(m *UploadRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *blobExchangeUploadClient) Recv() (*UploadResponse, error) {
m := new(UploadResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// BlobExchangeServer is the server API for BlobExchange service.
type BlobExchangeServer interface {
PriceCheck(context.Context, *PriceCheckRequest) (*PriceCheckResponse, error)
DownloadCheck(context.Context, *HashesRequest) (*HashesResponse, error)
Download(BlobExchange_DownloadServer) error
UploadCheck(context.Context, *HashesRequest) (*HashesResponse, error)
Upload(BlobExchange_UploadServer) error
}
func RegisterBlobExchangeServer(s *grpc.Server, srv BlobExchangeServer) {
s.RegisterService(&_BlobExchange_serviceDesc, srv)
}
func _BlobExchange_PriceCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PriceCheckRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BlobExchangeServer).PriceCheck(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/blobex.BlobExchange/PriceCheck",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BlobExchangeServer).PriceCheck(ctx, req.(*PriceCheckRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BlobExchange_DownloadCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HashesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BlobExchangeServer).DownloadCheck(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/blobex.BlobExchange/DownloadCheck",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BlobExchangeServer).DownloadCheck(ctx, req.(*HashesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BlobExchange_Download_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(BlobExchangeServer).Download(&blobExchangeDownloadServer{stream})
}
type BlobExchange_DownloadServer interface {
Send(*DownloadResponse) error
Recv() (*DownloadRequest, error)
grpc.ServerStream
}
type blobExchangeDownloadServer struct {
grpc.ServerStream
}
func (x *blobExchangeDownloadServer) Send(m *DownloadResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *blobExchangeDownloadServer) Recv() (*DownloadRequest, error) {
m := new(DownloadRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _BlobExchange_UploadCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HashesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BlobExchangeServer).UploadCheck(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/blobex.BlobExchange/UploadCheck",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BlobExchangeServer).UploadCheck(ctx, req.(*HashesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BlobExchange_Upload_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(BlobExchangeServer).Upload(&blobExchangeUploadServer{stream})
}
type BlobExchange_UploadServer interface {
Send(*UploadResponse) error
Recv() (*UploadRequest, error)
grpc.ServerStream
}
type blobExchangeUploadServer struct {
grpc.ServerStream
}
func (x *blobExchangeUploadServer) Send(m *UploadResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *blobExchangeUploadServer) Recv() (*UploadRequest, error) {
m := new(UploadRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
var _BlobExchange_serviceDesc = grpc.ServiceDesc{
ServiceName: "blobex.BlobExchange",
HandlerType: (*BlobExchangeServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "PriceCheck",
Handler: _BlobExchange_PriceCheck_Handler,
},
{
MethodName: "DownloadCheck",
Handler: _BlobExchange_DownloadCheck_Handler,
},
{
MethodName: "UploadCheck",
Handler: _BlobExchange_UploadCheck_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "Download",
Handler: _BlobExchange_Download_Handler,
ServerStreams: true,
ClientStreams: true,
},
{
StreamName: "Upload",
Handler: _BlobExchange_Upload_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "blobex.proto",
}
func init() { proto.RegisterFile("blobex.proto", fileDescriptor_183aee39e18f30c9) }
var fileDescriptor_183aee39e18f30c9 = []byte{
// 436 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xcd, 0x6e, 0xd4,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