lbry.go/blobex/blobex.pb.go

766 lines
26 KiB
Go
Raw Permalink Normal View History

2018-10-25 20:20:21 +02:00
// 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"`
2018-11-06 20:52:12 +01:00
Price uint64 `protobuf:"varint,5,opt,name=price,proto3" json:"price,omitempty"`
2018-10-25 20:20:21 +02:00
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 ""
}
2018-11-06 20:52:12 +01:00
func (m *DownloadResponse) GetPrice() uint64 {
if m != nil {
return m.Price
}
return 0
}
2018-10-25 20:20:21 +02:00
// 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)
2018-10-25 20:25:10 +02:00
UploadCheck(ctx context.Context, in *HashesRequest, opts ...grpc.CallOption) (*HashesResponse, error)
2018-10-25 20:20:21 +02:00
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
}
2018-10-25 20:25:10 +02:00
func (c *blobExchangeClient) UploadCheck(ctx context.Context, in *HashesRequest, opts ...grpc.CallOption) (*HashesResponse, error) {
2018-10-25 20:20:21 +02:00
out := new(HashesResponse)
2018-10-25 20:25:10 +02:00
err := c.cc.Invoke(ctx, "/blobex.BlobExchange/UploadCheck", in, out, opts...)
2018-10-25 20:20:21 +02:00
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
2018-10-25 20:25:10 +02:00
UploadCheck(context.Context, *HashesRequest) (*HashesResponse, error)
2018-10-25 20:20:21 +02:00
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
}
2018-10-25 20:25:10 +02:00
func _BlobExchange_UploadCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2018-10-25 20:20:21 +02:00
in := new(HashesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
2018-10-25 20:25:10 +02:00
return srv.(BlobExchangeServer).UploadCheck(ctx, in)
2018-10-25 20:20:21 +02:00
}
info := &grpc.UnaryServerInfo{
Server: srv,
2018-10-25 20:25:10 +02:00
FullMethod: "/blobex.BlobExchange/UploadCheck",
2018-10-25 20:20:21 +02:00
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2018-10-25 20:25:10 +02:00
return srv.(BlobExchangeServer).UploadCheck(ctx, req.(*HashesRequest))
2018-10-25 20:20:21 +02:00
}
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,
},
{
2018-10-25 20:25:10 +02:00
MethodName: "UploadCheck",
Handler: _BlobExchange_UploadCheck_Handler,
2018-10-25 20:20:21 +02:00
},
},
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{
2018-11-06 20:52:12 +01:00
// 449 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcd, 0x6e, 0x13, 0x31,
0x10, 0xae, 0x37, 0x3f, 0x34, 0xb3, 0xd9, 0x52, 0x06, 0x28, 0x26, 0xa7, 0x95, 0x11, 0x62, 0x4f,
0x15, 0x0a, 0x42, 0x40, 0x25, 0x10, 0x6a, 0x89, 0x04, 0xe2, 0x52, 0x59, 0xe2, 0xc4, 0x69, 0x93,
0x1d, 0x35, 0xa8, 0xcb, 0x7a, 0xb1, 0x53, 0xda, 0x3c, 0x05, 0x2f, 0xc2, 0x1b, 0xf1, 0x32, 0xc8,
0xf6, 0xba, 0x9b, 0xb4, 0x95, 0x50, 0xe8, 0x6d, 0xbe, 0xf1, 0xcc, 0xf7, 0x8d, 0xfd, 0x8d, 0x0c,
0xc3, 0x69, 0xa9, 0xa6, 0x74, 0xb1, 0x5f, 0x6b, 0xb5, 0x50, 0xd8, 0xf7, 0x48, 0xbc, 0x84, 0xde,
0x44, 0x6b, 0xa5, 0x11, 0xa1, 0x3b, 0x53, 0x05, 0x71, 0x96, 0xb2, 0x2c, 0x91, 0x2e, 0x46, 0x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