fb5ccbc407
* Pieces must be name spaced by Satellite * fixed formatting
1217 lines
44 KiB
Go
1217 lines
44 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: piecestore.proto
|
|
|
|
package pb
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import 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 PayerBandwidthAllocation struct {
|
|
Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
|
|
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PayerBandwidthAllocation) Reset() { *m = PayerBandwidthAllocation{} }
|
|
func (m *PayerBandwidthAllocation) String() string { return proto.CompactTextString(m) }
|
|
func (*PayerBandwidthAllocation) ProtoMessage() {}
|
|
func (*PayerBandwidthAllocation) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_piecestore_13a9a597c2abd9cf, []int{0}
|
|
}
|
|
func (m *PayerBandwidthAllocation) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_PayerBandwidthAllocation.Unmarshal(m, b)
|
|
}
|
|
func (m *PayerBandwidthAllocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_PayerBandwidthAllocation.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *PayerBandwidthAllocation) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PayerBandwidthAllocation.Merge(dst, src)
|
|
}
|
|
func (m *PayerBandwidthAllocation) XXX_Size() int {
|
|
return xxx_messageInfo_PayerBandwidthAllocation.Size(m)
|
|
}
|
|
func (m *PayerBandwidthAllocation) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PayerBandwidthAllocation.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PayerBandwidthAllocation proto.InternalMessageInfo
|
|
|
|
func (m *PayerBandwidthAllocation) GetSignature() []byte {
|
|
if m != nil {
|
|
return m.Signature
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *PayerBandwidthAllocation) GetData() []byte {
|
|
if m != nil {
|
|
return m.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type PayerBandwidthAllocation_Data struct {
|
|
Payer []byte `protobuf:"bytes,1,opt,name=payer,proto3" json:"payer,omitempty"`
|
|
Renter []byte `protobuf:"bytes,2,opt,name=renter,proto3" json:"renter,omitempty"`
|
|
MaxSize int64 `protobuf:"varint,3,opt,name=max_size,json=maxSize,proto3" json:"max_size,omitempty"`
|
|
ExpirationUnixSec int64 `protobuf:"varint,4,opt,name=expiration_unix_sec,json=expirationUnixSec,proto3" json:"expiration_unix_sec,omitempty"`
|
|
SerialNumber string `protobuf:"bytes,5,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PayerBandwidthAllocation_Data) Reset() { *m = PayerBandwidthAllocation_Data{} }
|
|
func (m *PayerBandwidthAllocation_Data) String() string { return proto.CompactTextString(m) }
|
|
func (*PayerBandwidthAllocation_Data) ProtoMessage() {}
|
|
func (*PayerBandwidthAllocation_Data) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_piecestore_13a9a597c2abd9cf, []int{0, 0}
|
|
}
|
|
func (m *PayerBandwidthAllocation_Data) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_PayerBandwidthAllocation_Data.Unmarshal(m, b)
|
|
}
|
|
func (m *PayerBandwidthAllocation_Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_PayerBandwidthAllocation_Data.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *PayerBandwidthAllocation_Data) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PayerBandwidthAllocation_Data.Merge(dst, src)
|
|
}
|
|
func (m *PayerBandwidthAllocation_Data) XXX_Size() int {
|
|
return xxx_messageInfo_PayerBandwidthAllocation_Data.Size(m)
|
|
}
|
|
func (m *PayerBandwidthAllocation_Data) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PayerBandwidthAllocation_Data.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PayerBandwidthAllocation_Data proto.InternalMessageInfo
|
|
|
|
func (m *PayerBandwidthAllocation_Data) GetPayer() []byte {
|
|
if m != nil {
|
|
return m.Payer
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *PayerBandwidthAllocation_Data) GetRenter() []byte {
|
|
if m != nil {
|
|
return m.Renter
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *PayerBandwidthAllocation_Data) GetMaxSize() int64 {
|
|
if m != nil {
|
|
return m.MaxSize
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *PayerBandwidthAllocation_Data) GetExpirationUnixSec() int64 {
|
|
if m != nil {
|
|
return m.ExpirationUnixSec
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *PayerBandwidthAllocation_Data) GetSerialNumber() string {
|
|
if m != nil {
|
|
return m.SerialNumber
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RenterBandwidthAllocation struct {
|
|
Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
|
|
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *RenterBandwidthAllocation) Reset() { *m = RenterBandwidthAllocation{} }
|
|
func (m *RenterBandwidthAllocation) String() string { return proto.CompactTextString(m) }
|
|
func (*RenterBandwidthAllocation) ProtoMessage() {}
|
|
func (*RenterBandwidthAllocation) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_piecestore_13a9a597c2abd9cf, []int{1}
|
|
}
|
|
func (m *RenterBandwidthAllocation) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_RenterBandwidthAllocation.Unmarshal(m, b)
|
|
}
|
|
func (m *RenterBandwidthAllocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_RenterBandwidthAllocation.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *RenterBandwidthAllocation) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_RenterBandwidthAllocation.Merge(dst, src)
|
|
}
|
|
func (m *RenterBandwidthAllocation) XXX_Size() int {
|
|
return xxx_messageInfo_RenterBandwidthAllocation.Size(m)
|
|
}
|
|
func (m *RenterBandwidthAllocation) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_RenterBandwidthAllocation.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_RenterBandwidthAllocation proto.InternalMessageInfo
|
|
|
|
func (m *RenterBandwidthAllocation) GetSignature() []byte {
|
|
if m != nil {
|
|
return m.Signature
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *RenterBandwidthAllocation) GetData() []byte {
|
|
if m != nil {
|
|
return m.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type RenterBandwidthAllocation_Data struct {
|
|
PayerAllocation *PayerBandwidthAllocation `protobuf:"bytes,1,opt,name=payer_allocation,json=payerAllocation,proto3" json:"payer_allocation,omitempty"`
|
|
Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *RenterBandwidthAllocation_Data) Reset() { *m = RenterBandwidthAllocation_Data{} }
|
|
func (m *RenterBandwidthAllocation_Data) String() string { return proto.CompactTextString(m) }
|
|
func (*RenterBandwidthAllocation_Data) ProtoMessage() {}
|
|
func (*RenterBandwidthAllocation_Data) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_piecestore_13a9a597c2abd9cf, []int{1, 0}
|
|
}
|
|
func (m *RenterBandwidthAllocation_Data) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_RenterBandwidthAllocation_Data.Unmarshal(m, b)
|
|
}
|
|
func (m *RenterBandwidthAllocation_Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_RenterBandwidthAllocation_Data.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *RenterBandwidthAllocation_Data) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_RenterBandwidthAllocation_Data.Merge(dst, src)
|
|
}
|
|
func (m *RenterBandwidthAllocation_Data) XXX_Size() int {
|
|
return xxx_messageInfo_RenterBandwidthAllocation_Data.Size(m)
|
|
}
|
|
func (m *RenterBandwidthAllocation_Data) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_RenterBandwidthAllocation_Data.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_RenterBandwidthAllocation_Data proto.InternalMessageInfo
|
|
|
|
func (m *RenterBandwidthAllocation_Data) GetPayerAllocation() *PayerBandwidthAllocation {
|
|
if m != nil {
|
|
return m.PayerAllocation
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *RenterBandwidthAllocation_Data) GetTotal() int64 {
|
|
if m != nil {
|
|
return m.Total
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type PieceStore struct {
|
|
Bandwidthallocation *RenterBandwidthAllocation `protobuf:"bytes,1,opt,name=bandwidthallocation,proto3" json:"bandwidthallocation,omitempty"`
|
|
Piecedata *PieceStore_PieceData `protobuf:"bytes,2,opt,name=piecedata,proto3" json:"piecedata,omitempty"`
|
|
Authorization *SignedMessage `protobuf:"bytes,3,opt,name=authorization,proto3" json:"authorization,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PieceStore) Reset() { *m = PieceStore{} }
|
|
func (m *PieceStore) String() string { return proto.CompactTextString(m) }
|
|
func (*PieceStore) ProtoMessage() {}
|
|
func (*PieceStore) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_piecestore_13a9a597c2abd9cf, []int{2}
|
|
}
|
|
func (m *PieceStore) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_PieceStore.Unmarshal(m, b)
|
|
}
|
|
func (m *PieceStore) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_PieceStore.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *PieceStore) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PieceStore.Merge(dst, src)
|
|
}
|
|
func (m *PieceStore) XXX_Size() int {
|
|
return xxx_messageInfo_PieceStore.Size(m)
|
|
}
|
|
func (m *PieceStore) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PieceStore.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PieceStore proto.InternalMessageInfo
|
|
|
|
func (m *PieceStore) GetBandwidthallocation() *RenterBandwidthAllocation {
|
|
if m != nil {
|
|
return m.Bandwidthallocation
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *PieceStore) GetPiecedata() *PieceStore_PieceData {
|
|
if m != nil {
|
|
return m.Piecedata
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *PieceStore) GetAuthorization() *SignedMessage {
|
|
if m != nil {
|
|
return m.Authorization
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type PieceStore_PieceData struct {
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
ExpirationUnixSec int64 `protobuf:"varint,2,opt,name=expiration_unix_sec,json=expirationUnixSec,proto3" json:"expiration_unix_sec,omitempty"`
|
|
Content []byte `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PieceStore_PieceData) Reset() { *m = PieceStore_PieceData{} }
|
|
func (m *PieceStore_PieceData) String() string { return proto.CompactTextString(m) }
|
|
func (*PieceStore_PieceData) ProtoMessage() {}
|
|
func (*PieceStore_PieceData) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_piecestore_13a9a597c2abd9cf, []int{2, 0}
|
|
}
|
|
func (m *PieceStore_PieceData) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_PieceStore_PieceData.Unmarshal(m, b)
|
|
}
|
|
func (m *PieceStore_PieceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_PieceStore_PieceData.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *PieceStore_PieceData) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PieceStore_PieceData.Merge(dst, src)
|
|
}
|
|
func (m *PieceStore_PieceData) XXX_Size() int {
|
|
return xxx_messageInfo_PieceStore_PieceData.Size(m)
|
|
}
|
|
func (m *PieceStore_PieceData) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PieceStore_PieceData.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PieceStore_PieceData proto.InternalMessageInfo
|
|
|
|
func (m *PieceStore_PieceData) GetId() string {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *PieceStore_PieceData) GetExpirationUnixSec() int64 {
|
|
if m != nil {
|
|
return m.ExpirationUnixSec
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *PieceStore_PieceData) GetContent() []byte {
|
|
if m != nil {
|
|
return m.Content
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type PieceId struct {
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Authorization *SignedMessage `protobuf:"bytes,2,opt,name=authorization,proto3" json:"authorization,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PieceId) Reset() { *m = PieceId{} }
|
|
func (m *PieceId) String() string { return proto.CompactTextString(m) }
|
|
func (*PieceId) ProtoMessage() {}
|
|
func (*PieceId) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_piecestore_13a9a597c2abd9cf, []int{3}
|
|
}
|
|
func (m *PieceId) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_PieceId.Unmarshal(m, b)
|
|
}
|
|
func (m *PieceId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_PieceId.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *PieceId) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PieceId.Merge(dst, src)
|
|
}
|
|
func (m *PieceId) XXX_Size() int {
|
|
return xxx_messageInfo_PieceId.Size(m)
|
|
}
|
|
func (m *PieceId) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PieceId.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PieceId proto.InternalMessageInfo
|
|
|
|
func (m *PieceId) GetId() string {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *PieceId) GetAuthorization() *SignedMessage {
|
|
if m != nil {
|
|
return m.Authorization
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type PieceSummary struct {
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
|
|
ExpirationUnixSec int64 `protobuf:"varint,3,opt,name=expiration_unix_sec,json=expirationUnixSec,proto3" json:"expiration_unix_sec,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PieceSummary) Reset() { *m = PieceSummary{} }
|
|
func (m *PieceSummary) String() string { return proto.CompactTextString(m) }
|
|
func (*PieceSummary) ProtoMessage() {}
|
|
func (*PieceSummary) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_piecestore_13a9a597c2abd9cf, []int{4}
|
|
}
|
|
func (m *PieceSummary) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_PieceSummary.Unmarshal(m, b)
|
|
}
|
|
func (m *PieceSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_PieceSummary.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *PieceSummary) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PieceSummary.Merge(dst, src)
|
|
}
|
|
func (m *PieceSummary) XXX_Size() int {
|
|
return xxx_messageInfo_PieceSummary.Size(m)
|
|
}
|
|
func (m *PieceSummary) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PieceSummary.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PieceSummary proto.InternalMessageInfo
|
|
|
|
func (m *PieceSummary) GetId() string {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *PieceSummary) GetSize() int64 {
|
|
if m != nil {
|
|
return m.Size
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *PieceSummary) GetExpirationUnixSec() int64 {
|
|
if m != nil {
|
|
return m.ExpirationUnixSec
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type PieceRetrieval struct {
|
|
Bandwidthallocation *RenterBandwidthAllocation `protobuf:"bytes,1,opt,name=bandwidthallocation,proto3" json:"bandwidthallocation,omitempty"`
|
|
PieceData *PieceRetrieval_PieceData `protobuf:"bytes,2,opt,name=pieceData,proto3" json:"pieceData,omitempty"`
|
|
Authorization *SignedMessage `protobuf:"bytes,3,opt,name=authorization,proto3" json:"authorization,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PieceRetrieval) Reset() { *m = PieceRetrieval{} }
|
|
func (m *PieceRetrieval) String() string { return proto.CompactTextString(m) }
|
|
func (*PieceRetrieval) ProtoMessage() {}
|
|
func (*PieceRetrieval) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_piecestore_13a9a597c2abd9cf, []int{5}
|
|
}
|
|
func (m *PieceRetrieval) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_PieceRetrieval.Unmarshal(m, b)
|
|
}
|
|
func (m *PieceRetrieval) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_PieceRetrieval.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *PieceRetrieval) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PieceRetrieval.Merge(dst, src)
|
|
}
|
|
func (m *PieceRetrieval) XXX_Size() int {
|
|
return xxx_messageInfo_PieceRetrieval.Size(m)
|
|
}
|
|
func (m *PieceRetrieval) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PieceRetrieval.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PieceRetrieval proto.InternalMessageInfo
|
|
|
|
func (m *PieceRetrieval) GetBandwidthallocation() *RenterBandwidthAllocation {
|
|
if m != nil {
|
|
return m.Bandwidthallocation
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *PieceRetrieval) GetPieceData() *PieceRetrieval_PieceData {
|
|
if m != nil {
|
|
return m.PieceData
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *PieceRetrieval) GetAuthorization() *SignedMessage {
|
|
if m != nil {
|
|
return m.Authorization
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type PieceRetrieval_PieceData struct {
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
|
|
Offset int64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PieceRetrieval_PieceData) Reset() { *m = PieceRetrieval_PieceData{} }
|
|
func (m *PieceRetrieval_PieceData) String() string { return proto.CompactTextString(m) }
|
|
func (*PieceRetrieval_PieceData) ProtoMessage() {}
|
|
func (*PieceRetrieval_PieceData) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_piecestore_13a9a597c2abd9cf, []int{5, 0}
|
|
}
|
|
func (m *PieceRetrieval_PieceData) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_PieceRetrieval_PieceData.Unmarshal(m, b)
|
|
}
|
|
func (m *PieceRetrieval_PieceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_PieceRetrieval_PieceData.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *PieceRetrieval_PieceData) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PieceRetrieval_PieceData.Merge(dst, src)
|
|
}
|
|
func (m *PieceRetrieval_PieceData) XXX_Size() int {
|
|
return xxx_messageInfo_PieceRetrieval_PieceData.Size(m)
|
|
}
|
|
func (m *PieceRetrieval_PieceData) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PieceRetrieval_PieceData.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PieceRetrieval_PieceData proto.InternalMessageInfo
|
|
|
|
func (m *PieceRetrieval_PieceData) GetId() string {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *PieceRetrieval_PieceData) GetSize() int64 {
|
|
if m != nil {
|
|
return m.Size
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *PieceRetrieval_PieceData) GetOffset() int64 {
|
|
if m != nil {
|
|
return m.Offset
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type PieceRetrievalStream struct {
|
|
Size int64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
|
|
Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PieceRetrievalStream) Reset() { *m = PieceRetrievalStream{} }
|
|
func (m *PieceRetrievalStream) String() string { return proto.CompactTextString(m) }
|
|
func (*PieceRetrievalStream) ProtoMessage() {}
|
|
func (*PieceRetrievalStream) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_piecestore_13a9a597c2abd9cf, []int{6}
|
|
}
|
|
func (m *PieceRetrievalStream) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_PieceRetrievalStream.Unmarshal(m, b)
|
|
}
|
|
func (m *PieceRetrievalStream) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_PieceRetrievalStream.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *PieceRetrievalStream) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PieceRetrievalStream.Merge(dst, src)
|
|
}
|
|
func (m *PieceRetrievalStream) XXX_Size() int {
|
|
return xxx_messageInfo_PieceRetrievalStream.Size(m)
|
|
}
|
|
func (m *PieceRetrievalStream) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PieceRetrievalStream.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PieceRetrievalStream proto.InternalMessageInfo
|
|
|
|
func (m *PieceRetrievalStream) GetSize() int64 {
|
|
if m != nil {
|
|
return m.Size
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *PieceRetrievalStream) GetContent() []byte {
|
|
if m != nil {
|
|
return m.Content
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type PieceDelete struct {
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Authorization *SignedMessage `protobuf:"bytes,3,opt,name=authorization,proto3" json:"authorization,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PieceDelete) Reset() { *m = PieceDelete{} }
|
|
func (m *PieceDelete) String() string { return proto.CompactTextString(m) }
|
|
func (*PieceDelete) ProtoMessage() {}
|
|
func (*PieceDelete) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_piecestore_13a9a597c2abd9cf, []int{7}
|
|
}
|
|
func (m *PieceDelete) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_PieceDelete.Unmarshal(m, b)
|
|
}
|
|
func (m *PieceDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_PieceDelete.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *PieceDelete) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PieceDelete.Merge(dst, src)
|
|
}
|
|
func (m *PieceDelete) XXX_Size() int {
|
|
return xxx_messageInfo_PieceDelete.Size(m)
|
|
}
|
|
func (m *PieceDelete) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PieceDelete.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PieceDelete proto.InternalMessageInfo
|
|
|
|
func (m *PieceDelete) GetId() string {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *PieceDelete) GetAuthorization() *SignedMessage {
|
|
if m != nil {
|
|
return m.Authorization
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type PieceDeleteSummary struct {
|
|
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PieceDeleteSummary) Reset() { *m = PieceDeleteSummary{} }
|
|
func (m *PieceDeleteSummary) String() string { return proto.CompactTextString(m) }
|
|
func (*PieceDeleteSummary) ProtoMessage() {}
|
|
func (*PieceDeleteSummary) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_piecestore_13a9a597c2abd9cf, []int{8}
|
|
}
|
|
func (m *PieceDeleteSummary) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_PieceDeleteSummary.Unmarshal(m, b)
|
|
}
|
|
func (m *PieceDeleteSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_PieceDeleteSummary.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *PieceDeleteSummary) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PieceDeleteSummary.Merge(dst, src)
|
|
}
|
|
func (m *PieceDeleteSummary) XXX_Size() int {
|
|
return xxx_messageInfo_PieceDeleteSummary.Size(m)
|
|
}
|
|
func (m *PieceDeleteSummary) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PieceDeleteSummary.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PieceDeleteSummary proto.InternalMessageInfo
|
|
|
|
func (m *PieceDeleteSummary) GetMessage() string {
|
|
if m != nil {
|
|
return m.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PieceStoreSummary struct {
|
|
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
|
|
TotalReceived int64 `protobuf:"varint,2,opt,name=totalReceived,proto3" json:"totalReceived,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PieceStoreSummary) Reset() { *m = PieceStoreSummary{} }
|
|
func (m *PieceStoreSummary) String() string { return proto.CompactTextString(m) }
|
|
func (*PieceStoreSummary) ProtoMessage() {}
|
|
func (*PieceStoreSummary) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_piecestore_13a9a597c2abd9cf, []int{9}
|
|
}
|
|
func (m *PieceStoreSummary) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_PieceStoreSummary.Unmarshal(m, b)
|
|
}
|
|
func (m *PieceStoreSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_PieceStoreSummary.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *PieceStoreSummary) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PieceStoreSummary.Merge(dst, src)
|
|
}
|
|
func (m *PieceStoreSummary) XXX_Size() int {
|
|
return xxx_messageInfo_PieceStoreSummary.Size(m)
|
|
}
|
|
func (m *PieceStoreSummary) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PieceStoreSummary.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PieceStoreSummary proto.InternalMessageInfo
|
|
|
|
func (m *PieceStoreSummary) GetMessage() string {
|
|
if m != nil {
|
|
return m.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *PieceStoreSummary) GetTotalReceived() int64 {
|
|
if m != nil {
|
|
return m.TotalReceived
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type StatsReq struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *StatsReq) Reset() { *m = StatsReq{} }
|
|
func (m *StatsReq) String() string { return proto.CompactTextString(m) }
|
|
func (*StatsReq) ProtoMessage() {}
|
|
func (*StatsReq) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_piecestore_13a9a597c2abd9cf, []int{10}
|
|
}
|
|
func (m *StatsReq) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_StatsReq.Unmarshal(m, b)
|
|
}
|
|
func (m *StatsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_StatsReq.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *StatsReq) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_StatsReq.Merge(dst, src)
|
|
}
|
|
func (m *StatsReq) XXX_Size() int {
|
|
return xxx_messageInfo_StatsReq.Size(m)
|
|
}
|
|
func (m *StatsReq) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_StatsReq.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_StatsReq proto.InternalMessageInfo
|
|
|
|
type StatSummary struct {
|
|
UsedSpace int64 `protobuf:"varint,1,opt,name=usedSpace,proto3" json:"usedSpace,omitempty"`
|
|
AvailableSpace int64 `protobuf:"varint,2,opt,name=availableSpace,proto3" json:"availableSpace,omitempty"`
|
|
UsedBandwidth int64 `protobuf:"varint,3,opt,name=usedBandwidth,proto3" json:"usedBandwidth,omitempty"`
|
|
AvailableBandwidth int64 `protobuf:"varint,4,opt,name=availableBandwidth,proto3" json:"availableBandwidth,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *StatSummary) Reset() { *m = StatSummary{} }
|
|
func (m *StatSummary) String() string { return proto.CompactTextString(m) }
|
|
func (*StatSummary) ProtoMessage() {}
|
|
func (*StatSummary) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_piecestore_13a9a597c2abd9cf, []int{11}
|
|
}
|
|
func (m *StatSummary) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_StatSummary.Unmarshal(m, b)
|
|
}
|
|
func (m *StatSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_StatSummary.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *StatSummary) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_StatSummary.Merge(dst, src)
|
|
}
|
|
func (m *StatSummary) XXX_Size() int {
|
|
return xxx_messageInfo_StatSummary.Size(m)
|
|
}
|
|
func (m *StatSummary) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_StatSummary.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_StatSummary proto.InternalMessageInfo
|
|
|
|
func (m *StatSummary) GetUsedSpace() int64 {
|
|
if m != nil {
|
|
return m.UsedSpace
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *StatSummary) GetAvailableSpace() int64 {
|
|
if m != nil {
|
|
return m.AvailableSpace
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *StatSummary) GetUsedBandwidth() int64 {
|
|
if m != nil {
|
|
return m.UsedBandwidth
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *StatSummary) GetAvailableBandwidth() int64 {
|
|
if m != nil {
|
|
return m.AvailableBandwidth
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type SignedMessage struct {
|
|
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
|
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
|
|
PublicKey []byte `protobuf:"bytes,3,opt,name=publicKey,proto3" json:"publicKey,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *SignedMessage) Reset() { *m = SignedMessage{} }
|
|
func (m *SignedMessage) String() string { return proto.CompactTextString(m) }
|
|
func (*SignedMessage) ProtoMessage() {}
|
|
func (*SignedMessage) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_piecestore_13a9a597c2abd9cf, []int{12}
|
|
}
|
|
func (m *SignedMessage) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_SignedMessage.Unmarshal(m, b)
|
|
}
|
|
func (m *SignedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_SignedMessage.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *SignedMessage) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_SignedMessage.Merge(dst, src)
|
|
}
|
|
func (m *SignedMessage) XXX_Size() int {
|
|
return xxx_messageInfo_SignedMessage.Size(m)
|
|
}
|
|
func (m *SignedMessage) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_SignedMessage.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_SignedMessage proto.InternalMessageInfo
|
|
|
|
func (m *SignedMessage) GetData() []byte {
|
|
if m != nil {
|
|
return m.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SignedMessage) GetSignature() []byte {
|
|
if m != nil {
|
|
return m.Signature
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SignedMessage) GetPublicKey() []byte {
|
|
if m != nil {
|
|
return m.PublicKey
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*PayerBandwidthAllocation)(nil), "piecestoreroutes.PayerBandwidthAllocation")
|
|
proto.RegisterType((*PayerBandwidthAllocation_Data)(nil), "piecestoreroutes.PayerBandwidthAllocation.Data")
|
|
proto.RegisterType((*RenterBandwidthAllocation)(nil), "piecestoreroutes.RenterBandwidthAllocation")
|
|
proto.RegisterType((*RenterBandwidthAllocation_Data)(nil), "piecestoreroutes.RenterBandwidthAllocation.Data")
|
|
proto.RegisterType((*PieceStore)(nil), "piecestoreroutes.PieceStore")
|
|
proto.RegisterType((*PieceStore_PieceData)(nil), "piecestoreroutes.PieceStore.PieceData")
|
|
proto.RegisterType((*PieceId)(nil), "piecestoreroutes.PieceId")
|
|
proto.RegisterType((*PieceSummary)(nil), "piecestoreroutes.PieceSummary")
|
|
proto.RegisterType((*PieceRetrieval)(nil), "piecestoreroutes.PieceRetrieval")
|
|
proto.RegisterType((*PieceRetrieval_PieceData)(nil), "piecestoreroutes.PieceRetrieval.PieceData")
|
|
proto.RegisterType((*PieceRetrievalStream)(nil), "piecestoreroutes.PieceRetrievalStream")
|
|
proto.RegisterType((*PieceDelete)(nil), "piecestoreroutes.PieceDelete")
|
|
proto.RegisterType((*PieceDeleteSummary)(nil), "piecestoreroutes.PieceDeleteSummary")
|
|
proto.RegisterType((*PieceStoreSummary)(nil), "piecestoreroutes.PieceStoreSummary")
|
|
proto.RegisterType((*StatsReq)(nil), "piecestoreroutes.StatsReq")
|
|
proto.RegisterType((*StatSummary)(nil), "piecestoreroutes.StatSummary")
|
|
proto.RegisterType((*SignedMessage)(nil), "piecestoreroutes.SignedMessage")
|
|
}
|
|
|
|
// 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
|
|
|
|
// PieceStoreRoutesClient is the client API for PieceStoreRoutes service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type PieceStoreRoutesClient interface {
|
|
Piece(ctx context.Context, in *PieceId, opts ...grpc.CallOption) (*PieceSummary, error)
|
|
Retrieve(ctx context.Context, opts ...grpc.CallOption) (PieceStoreRoutes_RetrieveClient, error)
|
|
Store(ctx context.Context, opts ...grpc.CallOption) (PieceStoreRoutes_StoreClient, error)
|
|
Delete(ctx context.Context, in *PieceDelete, opts ...grpc.CallOption) (*PieceDeleteSummary, error)
|
|
Stats(ctx context.Context, in *StatsReq, opts ...grpc.CallOption) (*StatSummary, error)
|
|
}
|
|
|
|
type pieceStoreRoutesClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewPieceStoreRoutesClient(cc *grpc.ClientConn) PieceStoreRoutesClient {
|
|
return &pieceStoreRoutesClient{cc}
|
|
}
|
|
|
|
func (c *pieceStoreRoutesClient) Piece(ctx context.Context, in *PieceId, opts ...grpc.CallOption) (*PieceSummary, error) {
|
|
out := new(PieceSummary)
|
|
err := c.cc.Invoke(ctx, "/piecestoreroutes.PieceStoreRoutes/Piece", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *pieceStoreRoutesClient) Retrieve(ctx context.Context, opts ...grpc.CallOption) (PieceStoreRoutes_RetrieveClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &_PieceStoreRoutes_serviceDesc.Streams[0], "/piecestoreroutes.PieceStoreRoutes/Retrieve", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &pieceStoreRoutesRetrieveClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type PieceStoreRoutes_RetrieveClient interface {
|
|
Send(*PieceRetrieval) error
|
|
Recv() (*PieceRetrievalStream, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type pieceStoreRoutesRetrieveClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *pieceStoreRoutesRetrieveClient) Send(m *PieceRetrieval) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *pieceStoreRoutesRetrieveClient) Recv() (*PieceRetrievalStream, error) {
|
|
m := new(PieceRetrievalStream)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func (c *pieceStoreRoutesClient) Store(ctx context.Context, opts ...grpc.CallOption) (PieceStoreRoutes_StoreClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &_PieceStoreRoutes_serviceDesc.Streams[1], "/piecestoreroutes.PieceStoreRoutes/Store", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &pieceStoreRoutesStoreClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type PieceStoreRoutes_StoreClient interface {
|
|
Send(*PieceStore) error
|
|
CloseAndRecv() (*PieceStoreSummary, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type pieceStoreRoutesStoreClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *pieceStoreRoutesStoreClient) Send(m *PieceStore) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *pieceStoreRoutesStoreClient) CloseAndRecv() (*PieceStoreSummary, error) {
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
return nil, err
|
|
}
|
|
m := new(PieceStoreSummary)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func (c *pieceStoreRoutesClient) Delete(ctx context.Context, in *PieceDelete, opts ...grpc.CallOption) (*PieceDeleteSummary, error) {
|
|
out := new(PieceDeleteSummary)
|
|
err := c.cc.Invoke(ctx, "/piecestoreroutes.PieceStoreRoutes/Delete", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *pieceStoreRoutesClient) Stats(ctx context.Context, in *StatsReq, opts ...grpc.CallOption) (*StatSummary, error) {
|
|
out := new(StatSummary)
|
|
err := c.cc.Invoke(ctx, "/piecestoreroutes.PieceStoreRoutes/Stats", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// PieceStoreRoutesServer is the server API for PieceStoreRoutes service.
|
|
type PieceStoreRoutesServer interface {
|
|
Piece(context.Context, *PieceId) (*PieceSummary, error)
|
|
Retrieve(PieceStoreRoutes_RetrieveServer) error
|
|
Store(PieceStoreRoutes_StoreServer) error
|
|
Delete(context.Context, *PieceDelete) (*PieceDeleteSummary, error)
|
|
Stats(context.Context, *StatsReq) (*StatSummary, error)
|
|
}
|
|
|
|
func RegisterPieceStoreRoutesServer(s *grpc.Server, srv PieceStoreRoutesServer) {
|
|
s.RegisterService(&_PieceStoreRoutes_serviceDesc, srv)
|
|
}
|
|
|
|
func _PieceStoreRoutes_Piece_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PieceId)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PieceStoreRoutesServer).Piece(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/piecestoreroutes.PieceStoreRoutes/Piece",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PieceStoreRoutesServer).Piece(ctx, req.(*PieceId))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _PieceStoreRoutes_Retrieve_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(PieceStoreRoutesServer).Retrieve(&pieceStoreRoutesRetrieveServer{stream})
|
|
}
|
|
|
|
type PieceStoreRoutes_RetrieveServer interface {
|
|
Send(*PieceRetrievalStream) error
|
|
Recv() (*PieceRetrieval, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type pieceStoreRoutesRetrieveServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *pieceStoreRoutesRetrieveServer) Send(m *PieceRetrievalStream) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *pieceStoreRoutesRetrieveServer) Recv() (*PieceRetrieval, error) {
|
|
m := new(PieceRetrieval)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func _PieceStoreRoutes_Store_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(PieceStoreRoutesServer).Store(&pieceStoreRoutesStoreServer{stream})
|
|
}
|
|
|
|
type PieceStoreRoutes_StoreServer interface {
|
|
SendAndClose(*PieceStoreSummary) error
|
|
Recv() (*PieceStore, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type pieceStoreRoutesStoreServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *pieceStoreRoutesStoreServer) SendAndClose(m *PieceStoreSummary) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *pieceStoreRoutesStoreServer) Recv() (*PieceStore, error) {
|
|
m := new(PieceStore)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func _PieceStoreRoutes_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PieceDelete)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PieceStoreRoutesServer).Delete(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/piecestoreroutes.PieceStoreRoutes/Delete",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PieceStoreRoutesServer).Delete(ctx, req.(*PieceDelete))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _PieceStoreRoutes_Stats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StatsReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PieceStoreRoutesServer).Stats(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/piecestoreroutes.PieceStoreRoutes/Stats",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PieceStoreRoutesServer).Stats(ctx, req.(*StatsReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _PieceStoreRoutes_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "piecestoreroutes.PieceStoreRoutes",
|
|
HandlerType: (*PieceStoreRoutesServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Piece",
|
|
Handler: _PieceStoreRoutes_Piece_Handler,
|
|
},
|
|
{
|
|
MethodName: "Delete",
|
|
Handler: _PieceStoreRoutes_Delete_Handler,
|
|
},
|
|
{
|
|
MethodName: "Stats",
|
|
Handler: _PieceStoreRoutes_Stats_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "Retrieve",
|
|
Handler: _PieceStoreRoutes_Retrieve_Handler,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
{
|
|
StreamName: "Store",
|
|
Handler: _PieceStoreRoutes_Store_Handler,
|
|
ClientStreams: true,
|
|
},
|
|
},
|
|
Metadata: "piecestore.proto",
|
|
}
|
|
|
|
func init() { proto.RegisterFile("piecestore.proto", fileDescriptor_piecestore_13a9a597c2abd9cf) }
|
|
|
|
var fileDescriptor_piecestore_13a9a597c2abd9cf = []byte{
|
|
// 782 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56,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