rename size
fields in protobuf messages for gogo compatibility (#690)
* rename `size` fields in protobuf messages for gogo compatibility * linter fixes
This commit is contained in:
parent
e7e0d1daaa
commit
54ccb460a9
@ -168,7 +168,7 @@ func main() {
|
||||
Data: serializedAllocation,
|
||||
}
|
||||
|
||||
rr, err := psClient.Get(ctx, psclient.PieceID(id), pieceInfo.Size, pba, nil)
|
||||
rr, err := psClient.Get(ctx, psclient.PieceID(id), pieceInfo.PieceSize, pba, nil)
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to retrieve file of id: %s\n", id)
|
||||
errRemove := os.Remove(outputDir)
|
||||
@ -178,7 +178,7 @@ func main() {
|
||||
return err
|
||||
}
|
||||
|
||||
reader, err := rr.Range(ctx, 0, pieceInfo.Size)
|
||||
reader, err := rr.Range(ctx, 0, pieceInfo.PieceSize)
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to retrieve file of id: %s\n", id)
|
||||
errRemove := os.Remove(outputDir)
|
||||
|
@ -128,7 +128,7 @@ func (t *tally) onlineNodes(ctx context.Context, nodeIDs []dht.NodeID) (online [
|
||||
}
|
||||
|
||||
func (t *tally) tallyAtRestStorage(ctx context.Context, pointer *pb.Pointer, nodes []*pb.Node, client node.Client) {
|
||||
segmentSize := pointer.GetSize()
|
||||
segmentSize := pointer.GetSegmentSize()
|
||||
minReq := pointer.Remote.Redundancy.GetMinReq()
|
||||
if minReq <= 0 {
|
||||
zap.L().Error("minReq must be an int greater than 0")
|
||||
|
@ -89,7 +89,7 @@ func (cursor *Cursor) NextStripe(ctx context.Context) (stripe *Stripe, err error
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if pointer.GetSize() == 0 {
|
||||
if pointer.GetSegmentSize() == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
@ -119,11 +119,11 @@ func getRandomStripe(es eestream.ErasureScheme, pointer *pb.Pointer) (index int,
|
||||
stripeSize := es.StripeSize()
|
||||
|
||||
// the last segment could be smaller than stripe size
|
||||
if pointer.GetSize() < int64(stripeSize) {
|
||||
if pointer.GetSegmentSize() < int64(stripeSize) {
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
randomStripeIndex, err := rand.Int(rand.Reader, big.NewInt(pointer.GetSize()/int64(stripeSize)))
|
||||
randomStripeIndex, err := rand.Int(rand.Reader, big.NewInt(pointer.GetSegmentSize()/int64(stripeSize)))
|
||||
if err != nil {
|
||||
return -1, err
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ func makePutRequest(path storj.Path) pb.PutRequest {
|
||||
PieceId: "testId",
|
||||
RemotePieces: rps,
|
||||
},
|
||||
Size: int64(10),
|
||||
SegmentSize: int64(10),
|
||||
},
|
||||
}
|
||||
return pr
|
||||
|
@ -138,7 +138,7 @@ func (d *defaultDownloader) DownloadShares(ctx context.Context, pointer *pb.Poin
|
||||
|
||||
// this downloads shares from nodes at the given stripe index
|
||||
for i, node := range nodes {
|
||||
paddedSize := calcPadded(pointer.GetSize(), shareSize)
|
||||
paddedSize := calcPadded(pointer.GetSegmentSize(), shareSize)
|
||||
pieceSize := paddedSize / int64(pointer.Remote.Redundancy.GetMinReq())
|
||||
|
||||
s, err := d.getShare(ctx, stripeIndex, shareSize, int(pieces[i].PieceNum), pieceID, pieceSize, node, authorization)
|
||||
|
@ -240,7 +240,7 @@ func makePointer(nodeAmt int) *pb.Pointer {
|
||||
PieceId: "testId",
|
||||
RemotePieces: rps,
|
||||
},
|
||||
Size: int64(1),
|
||||
SegmentSize: int64(1),
|
||||
}
|
||||
return pr
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ func (db *DB) getInfo(ctx context.Context, prefix string, bucket string, path st
|
||||
lastSegmentMeta := segments.Meta{
|
||||
Modified: convertTime(pointer.GetCreationDate()),
|
||||
Expiration: convertTime(pointer.GetExpirationDate()),
|
||||
Size: pointer.GetSize(),
|
||||
Size: pointer.GetSegmentSize(),
|
||||
Data: pointer.GetMetadata(),
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: bandwidth.proto
|
||||
|
||||
package pb
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
@ -21,7 +21,7 @@ var _ = math.Inf
|
||||
// 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
|
||||
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
type AgreementsSummary_Status int32
|
||||
|
||||
@ -43,7 +43,7 @@ func (x AgreementsSummary_Status) String() string {
|
||||
return proto.EnumName(AgreementsSummary_Status_name, int32(x))
|
||||
}
|
||||
func (AgreementsSummary_Status) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bandwidth_01db992f91c47bae, []int{0, 0}
|
||||
return fileDescriptor_bandwidth_acc7ad1b0a6a13c6, []int{0, 0}
|
||||
}
|
||||
|
||||
type AgreementsSummary struct {
|
||||
@ -57,7 +57,7 @@ func (m *AgreementsSummary) Reset() { *m = AgreementsSummary{} }
|
||||
func (m *AgreementsSummary) String() string { return proto.CompactTextString(m) }
|
||||
func (*AgreementsSummary) ProtoMessage() {}
|
||||
func (*AgreementsSummary) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bandwidth_01db992f91c47bae, []int{0}
|
||||
return fileDescriptor_bandwidth_acc7ad1b0a6a13c6, []int{0}
|
||||
}
|
||||
func (m *AgreementsSummary) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_AgreementsSummary.Unmarshal(m, b)
|
||||
@ -161,9 +161,9 @@ var _Bandwidth_serviceDesc = grpc.ServiceDesc{
|
||||
Metadata: "bandwidth.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("bandwidth.proto", fileDescriptor_bandwidth_01db992f91c47bae) }
|
||||
func init() { proto.RegisterFile("bandwidth.proto", fileDescriptor_bandwidth_acc7ad1b0a6a13c6) }
|
||||
|
||||
var fileDescriptor_bandwidth_01db992f91c47bae = []byte{
|
||||
var fileDescriptor_bandwidth_acc7ad1b0a6a13c6 = []byte{
|
||||
// 196 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4f, 0x4a, 0xcc, 0x4b,
|
||||
0x29, 0xcf, 0x4c, 0x29, 0xc9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, 0x48,
|
||||
|
@ -1,9 +1,9 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: datarepair.proto
|
||||
|
||||
package pb
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
@ -16,12 +16,12 @@ var _ = math.Inf
|
||||
// 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
|
||||
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
// InjuredSegment is the queue item used for the data repair queue
|
||||
type InjuredSegment struct {
|
||||
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
|
||||
LostPieces []int32 `protobuf:"varint,2,rep,packed,name=lost_pieces,json=lostPieces,proto3" json:"lost_pieces,omitempty"`
|
||||
LostPieces []int32 `protobuf:"varint,2,rep,packed,name=lost_pieces,json=lostPieces" json:"lost_pieces,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -31,7 +31,7 @@ func (m *InjuredSegment) Reset() { *m = InjuredSegment{} }
|
||||
func (m *InjuredSegment) String() string { return proto.CompactTextString(m) }
|
||||
func (*InjuredSegment) ProtoMessage() {}
|
||||
func (*InjuredSegment) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_datarepair_13e4beab54f194bd, []int{0}
|
||||
return fileDescriptor_datarepair_ed86aa1a63e3d6e4, []int{0}
|
||||
}
|
||||
func (m *InjuredSegment) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_InjuredSegment.Unmarshal(m, b)
|
||||
@ -69,9 +69,9 @@ func init() {
|
||||
proto.RegisterType((*InjuredSegment)(nil), "repair.InjuredSegment")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("datarepair.proto", fileDescriptor_datarepair_13e4beab54f194bd) }
|
||||
func init() { proto.RegisterFile("datarepair.proto", fileDescriptor_datarepair_ed86aa1a63e3d6e4) }
|
||||
|
||||
var fileDescriptor_datarepair_13e4beab54f194bd = []byte{
|
||||
var fileDescriptor_datarepair_ed86aa1a63e3d6e4 = []byte{
|
||||
// 119 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x48, 0x49, 0x2c, 0x49,
|
||||
0x2c, 0x4a, 0x2d, 0x48, 0xcc, 0x2c, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0,
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
package pb
|
||||
|
||||
//go:generate protoc --go_out=plugins=grpc:. meta.proto
|
||||
//go:generate protoc --go_out=plugins=grpc:. overlay.proto
|
||||
//go:generate protoc --go_out=plugins=grpc:. pointerdb.proto
|
||||
//go:generate protoc --go_out=plugins=grpc:. piecestore.proto
|
||||
//go:generate protoc --go_out=plugins=grpc:. bandwidth.proto
|
||||
//go:generate protoc --go_out=plugins=grpc:. kadcli.proto
|
||||
import "storj.io/storj/pkg/storj"
|
||||
|
||||
// Path represents a object path
|
||||
type Path = storj.Path
|
||||
|
||||
//go:generate protoc -I. --gogo_out=plugins=grpc:. meta.proto overlay.proto pointerdb.proto piecestore.proto bandwidth.proto kadcli.proto datarepair.proto
|
||||
|
@ -1,9 +1,9 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: kadcli.proto
|
||||
|
||||
package pb
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
@ -21,7 +21,7 @@ var _ = math.Inf
|
||||
// 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
|
||||
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
type CountNodesResponse struct {
|
||||
Kademlia int64 `protobuf:"varint,1,opt,name=kademlia,proto3" json:"kademlia,omitempty"`
|
||||
@ -35,7 +35,7 @@ func (m *CountNodesResponse) Reset() { *m = CountNodesResponse{} }
|
||||
func (m *CountNodesResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*CountNodesResponse) ProtoMessage() {}
|
||||
func (*CountNodesResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_kadcli_876a2f6c9e943bb8, []int{0}
|
||||
return fileDescriptor_kadcli_70f58752d8646e9c, []int{0}
|
||||
}
|
||||
func (m *CountNodesResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CountNodesResponse.Unmarshal(m, b)
|
||||
@ -79,7 +79,7 @@ func (m *CountNodesRequest) Reset() { *m = CountNodesRequest{} }
|
||||
func (m *CountNodesRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*CountNodesRequest) ProtoMessage() {}
|
||||
func (*CountNodesRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_kadcli_876a2f6c9e943bb8, []int{1}
|
||||
return fileDescriptor_kadcli_70f58752d8646e9c, []int{1}
|
||||
}
|
||||
func (m *CountNodesRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CountNodesRequest.Unmarshal(m, b)
|
||||
@ -178,9 +178,9 @@ var _KadCli_serviceDesc = grpc.ServiceDesc{
|
||||
Metadata: "kadcli.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("kadcli.proto", fileDescriptor_kadcli_876a2f6c9e943bb8) }
|
||||
func init() { proto.RegisterFile("kadcli.proto", fileDescriptor_kadcli_70f58752d8646e9c) }
|
||||
|
||||
var fileDescriptor_kadcli_876a2f6c9e943bb8 = []byte{
|
||||
var fileDescriptor_kadcli_70f58752d8646e9c = []byte{
|
||||
// 153 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xc9, 0x4e, 0x4c, 0x49,
|
||||
0xce, 0xc9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0x94, 0xbc, 0xb8, 0x84,
|
||||
|
@ -1,9 +1,9 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: meta.proto
|
||||
|
||||
package pb
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
@ -16,7 +16,7 @@ var _ = math.Inf
|
||||
// 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
|
||||
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
type SegmentMeta struct {
|
||||
EncryptedKey []byte `protobuf:"bytes,1,opt,name=encrypted_key,json=encryptedKey,proto3" json:"encrypted_key,omitempty"`
|
||||
@ -30,7 +30,7 @@ func (m *SegmentMeta) Reset() { *m = SegmentMeta{} }
|
||||
func (m *SegmentMeta) String() string { return proto.CompactTextString(m) }
|
||||
func (*SegmentMeta) ProtoMessage() {}
|
||||
func (*SegmentMeta) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_meta_7cdcbfdcc9c518d5, []int{0}
|
||||
return fileDescriptor_meta_f2973588633dae4c, []int{0}
|
||||
}
|
||||
func (m *SegmentMeta) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SegmentMeta.Unmarshal(m, b)
|
||||
@ -78,7 +78,7 @@ func (m *StreamInfo) Reset() { *m = StreamInfo{} }
|
||||
func (m *StreamInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*StreamInfo) ProtoMessage() {}
|
||||
func (*StreamInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_meta_7cdcbfdcc9c518d5, []int{1}
|
||||
return fileDescriptor_meta_f2973588633dae4c, []int{1}
|
||||
}
|
||||
func (m *StreamInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_StreamInfo.Unmarshal(m, b)
|
||||
@ -130,7 +130,7 @@ type StreamMeta struct {
|
||||
EncryptedStreamInfo []byte `protobuf:"bytes,1,opt,name=encrypted_stream_info,json=encryptedStreamInfo,proto3" json:"encrypted_stream_info,omitempty"`
|
||||
EncryptionType int32 `protobuf:"varint,2,opt,name=encryption_type,json=encryptionType,proto3" json:"encryption_type,omitempty"`
|
||||
EncryptionBlockSize int32 `protobuf:"varint,3,opt,name=encryption_block_size,json=encryptionBlockSize,proto3" json:"encryption_block_size,omitempty"`
|
||||
LastSegmentMeta *SegmentMeta `protobuf:"bytes,4,opt,name=last_segment_meta,json=lastSegmentMeta,proto3" json:"last_segment_meta,omitempty"`
|
||||
LastSegmentMeta *SegmentMeta `protobuf:"bytes,4,opt,name=last_segment_meta,json=lastSegmentMeta" json:"last_segment_meta,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -140,7 +140,7 @@ func (m *StreamMeta) Reset() { *m = StreamMeta{} }
|
||||
func (m *StreamMeta) String() string { return proto.CompactTextString(m) }
|
||||
func (*StreamMeta) ProtoMessage() {}
|
||||
func (*StreamMeta) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_meta_7cdcbfdcc9c518d5, []int{2}
|
||||
return fileDescriptor_meta_f2973588633dae4c, []int{2}
|
||||
}
|
||||
func (m *StreamMeta) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_StreamMeta.Unmarshal(m, b)
|
||||
@ -194,9 +194,9 @@ func init() {
|
||||
proto.RegisterType((*StreamMeta)(nil), "streams.StreamMeta")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("meta.proto", fileDescriptor_meta_7cdcbfdcc9c518d5) }
|
||||
func init() { proto.RegisterFile("meta.proto", fileDescriptor_meta_f2973588633dae4c) }
|
||||
|
||||
var fileDescriptor_meta_7cdcbfdcc9c518d5 = []byte{
|
||||
var fileDescriptor_meta_f2973588633dae4c = []byte{
|
||||
// 306 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x51, 0xcd, 0x4e, 0xf3, 0x30,
|
||||
0x10, 0x54, 0xff, 0xbe, 0xaf, 0x6c, 0x03, 0x05, 0x03, 0x52, 0x04, 0x17, 0x14, 0x0e, 0x20, 0x84,
|
||||
|
@ -1,9 +1,9 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: overlay.proto
|
||||
|
||||
package pb
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import duration "github.com/golang/protobuf/ptypes/duration"
|
||||
@ -22,7 +22,7 @@ var _ = math.Inf
|
||||
// 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
|
||||
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
// NodeTransport is an enum of possible transports for the overlay network
|
||||
type NodeTransport int32
|
||||
@ -42,7 +42,7 @@ func (x NodeTransport) String() string {
|
||||
return proto.EnumName(NodeTransport_name, int32(x))
|
||||
}
|
||||
func (NodeTransport) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{0}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{0}
|
||||
}
|
||||
|
||||
// NodeType is an enum of possible node types
|
||||
@ -66,7 +66,7 @@ func (x NodeType) String() string {
|
||||
return proto.EnumName(NodeType_name, int32(x))
|
||||
}
|
||||
func (NodeType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{1}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{1}
|
||||
}
|
||||
|
||||
type Restriction_Operator int32
|
||||
@ -98,7 +98,7 @@ func (x Restriction_Operator) String() string {
|
||||
return proto.EnumName(Restriction_Operator_name, int32(x))
|
||||
}
|
||||
func (Restriction_Operator) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{15, 0}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{15, 0}
|
||||
}
|
||||
|
||||
type Restriction_Operand int32
|
||||
@ -121,7 +121,7 @@ func (x Restriction_Operand) String() string {
|
||||
return proto.EnumName(Restriction_Operand_name, int32(x))
|
||||
}
|
||||
func (Restriction_Operand) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{15, 1}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{15, 1}
|
||||
}
|
||||
|
||||
// LookupRequest is is request message for the lookup rpc call
|
||||
@ -136,7 +136,7 @@ func (m *LookupRequest) Reset() { *m = LookupRequest{} }
|
||||
func (m *LookupRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*LookupRequest) ProtoMessage() {}
|
||||
func (*LookupRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{0}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{0}
|
||||
}
|
||||
func (m *LookupRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LookupRequest.Unmarshal(m, b)
|
||||
@ -165,7 +165,7 @@ func (m *LookupRequest) GetNodeID() string {
|
||||
|
||||
// LookupResponse is is response message for the lookup rpc call
|
||||
type LookupResponse struct {
|
||||
Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
|
||||
Node *Node `protobuf:"bytes,1,opt,name=node" json:"node,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -175,7 +175,7 @@ func (m *LookupResponse) Reset() { *m = LookupResponse{} }
|
||||
func (m *LookupResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*LookupResponse) ProtoMessage() {}
|
||||
func (*LookupResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{1}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{1}
|
||||
}
|
||||
func (m *LookupResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LookupResponse.Unmarshal(m, b)
|
||||
@ -204,7 +204,7 @@ func (m *LookupResponse) GetNode() *Node {
|
||||
|
||||
// LookupRequests is a list of LookupRequest
|
||||
type LookupRequests struct {
|
||||
Lookuprequest []*LookupRequest `protobuf:"bytes,1,rep,name=lookuprequest,proto3" json:"lookuprequest,omitempty"`
|
||||
Lookuprequest []*LookupRequest `protobuf:"bytes,1,rep,name=lookuprequest" json:"lookuprequest,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -214,7 +214,7 @@ func (m *LookupRequests) Reset() { *m = LookupRequests{} }
|
||||
func (m *LookupRequests) String() string { return proto.CompactTextString(m) }
|
||||
func (*LookupRequests) ProtoMessage() {}
|
||||
func (*LookupRequests) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{2}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{2}
|
||||
}
|
||||
func (m *LookupRequests) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LookupRequests.Unmarshal(m, b)
|
||||
@ -243,7 +243,7 @@ func (m *LookupRequests) GetLookuprequest() []*LookupRequest {
|
||||
|
||||
// LookupResponse is a list of LookupResponse
|
||||
type LookupResponses struct {
|
||||
Lookupresponse []*LookupResponse `protobuf:"bytes,1,rep,name=lookupresponse,proto3" json:"lookupresponse,omitempty"`
|
||||
Lookupresponse []*LookupResponse `protobuf:"bytes,1,rep,name=lookupresponse" json:"lookupresponse,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -253,7 +253,7 @@ func (m *LookupResponses) Reset() { *m = LookupResponses{} }
|
||||
func (m *LookupResponses) String() string { return proto.CompactTextString(m) }
|
||||
func (*LookupResponses) ProtoMessage() {}
|
||||
func (*LookupResponses) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{3}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{3}
|
||||
}
|
||||
func (m *LookupResponses) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LookupResponses.Unmarshal(m, b)
|
||||
@ -282,7 +282,7 @@ func (m *LookupResponses) GetLookupresponse() []*LookupResponse {
|
||||
|
||||
// FindStorageNodesResponse is is response message for the FindStorageNodes rpc call
|
||||
type FindStorageNodesResponse struct {
|
||||
Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
|
||||
Nodes []*Node `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -292,7 +292,7 @@ func (m *FindStorageNodesResponse) Reset() { *m = FindStorageNodesRespon
|
||||
func (m *FindStorageNodesResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*FindStorageNodesResponse) ProtoMessage() {}
|
||||
func (*FindStorageNodesResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{4}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{4}
|
||||
}
|
||||
func (m *FindStorageNodesResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_FindStorageNodesResponse.Unmarshal(m, b)
|
||||
@ -322,8 +322,8 @@ func (m *FindStorageNodesResponse) GetNodes() []*Node {
|
||||
// FindStorageNodesRequest is is request message for the FindStorageNodes rpc call
|
||||
type FindStorageNodesRequest struct {
|
||||
ObjectSize int64 `protobuf:"varint,1,opt,name=objectSize,proto3" json:"objectSize,omitempty"`
|
||||
ContractLength *duration.Duration `protobuf:"bytes,2,opt,name=contractLength,proto3" json:"contractLength,omitempty"`
|
||||
Opts *OverlayOptions `protobuf:"bytes,3,opt,name=opts,proto3" json:"opts,omitempty"`
|
||||
ContractLength *duration.Duration `protobuf:"bytes,2,opt,name=contractLength" json:"contractLength,omitempty"`
|
||||
Opts *OverlayOptions `protobuf:"bytes,3,opt,name=opts" json:"opts,omitempty"`
|
||||
Start []byte `protobuf:"bytes,4,opt,name=start,proto3" json:"start,omitempty"`
|
||||
MaxNodes int64 `protobuf:"varint,5,opt,name=maxNodes,proto3" json:"maxNodes,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
@ -335,7 +335,7 @@ func (m *FindStorageNodesRequest) Reset() { *m = FindStorageNodesRequest
|
||||
func (m *FindStorageNodesRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*FindStorageNodesRequest) ProtoMessage() {}
|
||||
func (*FindStorageNodesRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{5}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{5}
|
||||
}
|
||||
func (m *FindStorageNodesRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_FindStorageNodesRequest.Unmarshal(m, b)
|
||||
@ -403,7 +403,7 @@ func (m *NodeAddress) Reset() { *m = NodeAddress{} }
|
||||
func (m *NodeAddress) String() string { return proto.CompactTextString(m) }
|
||||
func (*NodeAddress) ProtoMessage() {}
|
||||
func (*NodeAddress) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{6}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{6}
|
||||
}
|
||||
func (m *NodeAddress) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NodeAddress.Unmarshal(m, b)
|
||||
@ -439,12 +439,12 @@ func (m *NodeAddress) GetAddress() string {
|
||||
|
||||
// OverlayOptions is a set of criteria that a node must meet to be considered for a storage opportunity
|
||||
type OverlayOptions struct {
|
||||
MaxLatency *duration.Duration `protobuf:"bytes,1,opt,name=maxLatency,proto3" json:"maxLatency,omitempty"`
|
||||
MinReputation *NodeRep `protobuf:"bytes,2,opt,name=minReputation,proto3" json:"minReputation,omitempty"`
|
||||
MaxLatency *duration.Duration `protobuf:"bytes,1,opt,name=maxLatency" json:"maxLatency,omitempty"`
|
||||
MinReputation *NodeRep `protobuf:"bytes,2,opt,name=minReputation" json:"minReputation,omitempty"`
|
||||
MinSpeedKbps int64 `protobuf:"varint,3,opt,name=minSpeedKbps,proto3" json:"minSpeedKbps,omitempty"`
|
||||
Amount int64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"`
|
||||
Restrictions *NodeRestrictions `protobuf:"bytes,5,opt,name=restrictions,proto3" json:"restrictions,omitempty"`
|
||||
ExcludedNodes []string `protobuf:"bytes,6,rep,name=excluded_nodes,json=excludedNodes,proto3" json:"excluded_nodes,omitempty"`
|
||||
Restrictions *NodeRestrictions `protobuf:"bytes,5,opt,name=restrictions" json:"restrictions,omitempty"`
|
||||
ExcludedNodes []string `protobuf:"bytes,6,rep,name=excluded_nodes,json=excludedNodes" json:"excluded_nodes,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -454,7 +454,7 @@ func (m *OverlayOptions) Reset() { *m = OverlayOptions{} }
|
||||
func (m *OverlayOptions) String() string { return proto.CompactTextString(m) }
|
||||
func (*OverlayOptions) ProtoMessage() {}
|
||||
func (*OverlayOptions) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{7}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{7}
|
||||
}
|
||||
func (m *OverlayOptions) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_OverlayOptions.Unmarshal(m, b)
|
||||
@ -530,7 +530,7 @@ func (m *NodeRep) Reset() { *m = NodeRep{} }
|
||||
func (m *NodeRep) String() string { return proto.CompactTextString(m) }
|
||||
func (*NodeRep) ProtoMessage() {}
|
||||
func (*NodeRep) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{8}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{8}
|
||||
}
|
||||
func (m *NodeRep) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NodeRep.Unmarshal(m, b)
|
||||
@ -584,7 +584,7 @@ func (m *NodeRestrictions) Reset() { *m = NodeRestrictions{} }
|
||||
func (m *NodeRestrictions) String() string { return proto.CompactTextString(m) }
|
||||
func (*NodeRestrictions) ProtoMessage() {}
|
||||
func (*NodeRestrictions) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{9}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{9}
|
||||
}
|
||||
func (m *NodeRestrictions) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NodeRestrictions.Unmarshal(m, b)
|
||||
@ -621,9 +621,9 @@ func (m *NodeRestrictions) GetFreeDisk() int64 {
|
||||
// Node represents a node in the overlay network
|
||||
type Node struct {
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Address *NodeAddress `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
|
||||
Address *NodeAddress `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"`
|
||||
Type NodeType `protobuf:"varint,3,opt,name=type,proto3,enum=overlay.NodeType" json:"type,omitempty"`
|
||||
Restrictions *NodeRestrictions `protobuf:"bytes,4,opt,name=restrictions,proto3" json:"restrictions,omitempty"`
|
||||
Restrictions *NodeRestrictions `protobuf:"bytes,4,opt,name=restrictions" json:"restrictions,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -633,7 +633,7 @@ func (m *Node) Reset() { *m = Node{} }
|
||||
func (m *Node) String() string { return proto.CompactTextString(m) }
|
||||
func (*Node) ProtoMessage() {}
|
||||
func (*Node) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{10}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{10}
|
||||
}
|
||||
func (m *Node) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Node.Unmarshal(m, b)
|
||||
@ -682,8 +682,8 @@ func (m *Node) GetRestrictions() *NodeRestrictions {
|
||||
}
|
||||
|
||||
type QueryRequest struct {
|
||||
Sender *Node `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
|
||||
Target *Node `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"`
|
||||
Sender *Node `protobuf:"bytes,1,opt,name=sender" json:"sender,omitempty"`
|
||||
Target *Node `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"`
|
||||
Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||
Pingback bool `protobuf:"varint,4,opt,name=pingback,proto3" json:"pingback,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
@ -695,7 +695,7 @@ func (m *QueryRequest) Reset() { *m = QueryRequest{} }
|
||||
func (m *QueryRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryRequest) ProtoMessage() {}
|
||||
func (*QueryRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{11}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{11}
|
||||
}
|
||||
func (m *QueryRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_QueryRequest.Unmarshal(m, b)
|
||||
@ -744,8 +744,8 @@ func (m *QueryRequest) GetPingback() bool {
|
||||
}
|
||||
|
||||
type QueryResponse struct {
|
||||
Sender *Node `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
|
||||
Response []*Node `protobuf:"bytes,2,rep,name=response,proto3" json:"response,omitempty"`
|
||||
Sender *Node `protobuf:"bytes,1,opt,name=sender" json:"sender,omitempty"`
|
||||
Response []*Node `protobuf:"bytes,2,rep,name=response" json:"response,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -755,7 +755,7 @@ func (m *QueryResponse) Reset() { *m = QueryResponse{} }
|
||||
func (m *QueryResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryResponse) ProtoMessage() {}
|
||||
func (*QueryResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{12}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{12}
|
||||
}
|
||||
func (m *QueryResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_QueryResponse.Unmarshal(m, b)
|
||||
@ -799,7 +799,7 @@ func (m *PingRequest) Reset() { *m = PingRequest{} }
|
||||
func (m *PingRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*PingRequest) ProtoMessage() {}
|
||||
func (*PingRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{13}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{13}
|
||||
}
|
||||
func (m *PingRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PingRequest.Unmarshal(m, b)
|
||||
@ -829,7 +829,7 @@ func (m *PingResponse) Reset() { *m = PingResponse{} }
|
||||
func (m *PingResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*PingResponse) ProtoMessage() {}
|
||||
func (*PingResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{14}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{14}
|
||||
}
|
||||
func (m *PingResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PingResponse.Unmarshal(m, b)
|
||||
@ -862,7 +862,7 @@ func (m *Restriction) Reset() { *m = Restriction{} }
|
||||
func (m *Restriction) String() string { return proto.CompactTextString(m) }
|
||||
func (*Restriction) ProtoMessage() {}
|
||||
func (*Restriction) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_overlay_b41771f04c080ed6, []int{15}
|
||||
return fileDescriptor_overlay_6cb6c4fd22c2f9b9, []int{15}
|
||||
}
|
||||
func (m *Restriction) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Restriction.Unmarshal(m, b)
|
||||
@ -1167,9 +1167,9 @@ var _Nodes_serviceDesc = grpc.ServiceDesc{
|
||||
Metadata: "overlay.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("overlay.proto", fileDescriptor_overlay_b41771f04c080ed6) }
|
||||
func init() { proto.RegisterFile("overlay.proto", fileDescriptor_overlay_6cb6c4fd22c2f9b9) }
|
||||
|
||||
var fileDescriptor_overlay_b41771f04c080ed6 = []byte{
|
||||
var fileDescriptor_overlay_6cb6c4fd22c2f9b9 = []byte{
|
||||
// 991 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x6d, 0x6f, 0xe3, 0x44,
|
||||
0x10, 0xae, 0x9d, 0xf7, 0x49, 0xe2, 0xf3, 0x8d, 0xee, 0xda, 0x10, 0x1d, 0xa7, 0xd4, 0x50, 0x11,
|
||||
|
@ -1,9 +1,9 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: piecestore.proto
|
||||
|
||||
package pb
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
@ -21,7 +21,7 @@ var _ = math.Inf
|
||||
// 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
|
||||
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
type PayerBandwidthAllocation_Action int32
|
||||
|
||||
@ -43,7 +43,7 @@ func (x PayerBandwidthAllocation_Action) String() string {
|
||||
return proto.EnumName(PayerBandwidthAllocation_Action_name, int32(x))
|
||||
}
|
||||
func (PayerBandwidthAllocation_Action) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_piecestore_51f85e261f621d08, []int{0, 0}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{0, 0}
|
||||
}
|
||||
|
||||
type PayerBandwidthAllocation struct {
|
||||
@ -58,7 +58,7 @@ func (m *PayerBandwidthAllocation) Reset() { *m = PayerBandwidthAllocati
|
||||
func (m *PayerBandwidthAllocation) String() string { return proto.CompactTextString(m) }
|
||||
func (*PayerBandwidthAllocation) ProtoMessage() {}
|
||||
func (*PayerBandwidthAllocation) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_piecestore_51f85e261f621d08, []int{0}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{0}
|
||||
}
|
||||
func (m *PayerBandwidthAllocation) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PayerBandwidthAllocation.Unmarshal(m, b)
|
||||
@ -109,7 +109,7 @@ func (m *PayerBandwidthAllocation_Data) Reset() { *m = PayerBandwidthAll
|
||||
func (m *PayerBandwidthAllocation_Data) String() string { return proto.CompactTextString(m) }
|
||||
func (*PayerBandwidthAllocation_Data) ProtoMessage() {}
|
||||
func (*PayerBandwidthAllocation_Data) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_piecestore_51f85e261f621d08, []int{0, 0}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{0, 0}
|
||||
}
|
||||
func (m *PayerBandwidthAllocation_Data) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PayerBandwidthAllocation_Data.Unmarshal(m, b)
|
||||
@ -190,7 +190,7 @@ func (m *RenterBandwidthAllocation) Reset() { *m = RenterBandwidthAlloca
|
||||
func (m *RenterBandwidthAllocation) String() string { return proto.CompactTextString(m) }
|
||||
func (*RenterBandwidthAllocation) ProtoMessage() {}
|
||||
func (*RenterBandwidthAllocation) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_piecestore_51f85e261f621d08, []int{1}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{1}
|
||||
}
|
||||
func (m *RenterBandwidthAllocation) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RenterBandwidthAllocation.Unmarshal(m, b)
|
||||
@ -225,7 +225,7 @@ func (m *RenterBandwidthAllocation) GetData() []byte {
|
||||
}
|
||||
|
||||
type RenterBandwidthAllocation_Data struct {
|
||||
PayerAllocation *PayerBandwidthAllocation `protobuf:"bytes,1,opt,name=payer_allocation,json=payerAllocation,proto3" json:"payer_allocation,omitempty"`
|
||||
PayerAllocation *PayerBandwidthAllocation `protobuf:"bytes,1,opt,name=payer_allocation,json=payerAllocation" json:"payer_allocation,omitempty"`
|
||||
Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
|
||||
StorageNodeId []byte `protobuf:"bytes,3,opt,name=storage_node_id,json=storageNodeId,proto3" json:"storage_node_id,omitempty"`
|
||||
PubKey []byte `protobuf:"bytes,4,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
|
||||
@ -238,7 +238,7 @@ func (m *RenterBandwidthAllocation_Data) Reset() { *m = RenterBandwidthA
|
||||
func (m *RenterBandwidthAllocation_Data) String() string { return proto.CompactTextString(m) }
|
||||
func (*RenterBandwidthAllocation_Data) ProtoMessage() {}
|
||||
func (*RenterBandwidthAllocation_Data) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_piecestore_51f85e261f621d08, []int{1, 0}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{1, 0}
|
||||
}
|
||||
func (m *RenterBandwidthAllocation_Data) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RenterBandwidthAllocation_Data.Unmarshal(m, b)
|
||||
@ -287,9 +287,9 @@ func (m *RenterBandwidthAllocation_Data) GetPubKey() []byte {
|
||||
}
|
||||
|
||||
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"`
|
||||
Bandwidthallocation *RenterBandwidthAllocation `protobuf:"bytes,1,opt,name=bandwidthallocation" json:"bandwidthallocation,omitempty"`
|
||||
Piecedata *PieceStore_PieceData `protobuf:"bytes,2,opt,name=piecedata" json:"piecedata,omitempty"`
|
||||
Authorization *SignedMessage `protobuf:"bytes,3,opt,name=authorization" json:"authorization,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -299,7 +299,7 @@ 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_51f85e261f621d08, []int{2}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{2}
|
||||
}
|
||||
func (m *PieceStore) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PieceStore.Unmarshal(m, b)
|
||||
@ -353,7 +353,7 @@ 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_51f85e261f621d08, []int{2, 0}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{2, 0}
|
||||
}
|
||||
func (m *PieceStore_PieceData) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PieceStore_PieceData.Unmarshal(m, b)
|
||||
@ -396,7 +396,7 @@ func (m *PieceStore_PieceData) GetContent() []byte {
|
||||
|
||||
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"`
|
||||
Authorization *SignedMessage `protobuf:"bytes,2,opt,name=authorization" json:"authorization,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -406,7 +406,7 @@ 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_51f85e261f621d08, []int{3}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{3}
|
||||
}
|
||||
func (m *PieceId) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PieceId.Unmarshal(m, b)
|
||||
@ -442,7 +442,7 @@ func (m *PieceId) GetAuthorization() *SignedMessage {
|
||||
|
||||
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"`
|
||||
PieceSize int64 `protobuf:"varint,2,opt,name=piece_size,json=pieceSize,proto3" json:"piece_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:"-"`
|
||||
@ -453,7 +453,7 @@ 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_51f85e261f621d08, []int{4}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{4}
|
||||
}
|
||||
func (m *PieceSummary) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PieceSummary.Unmarshal(m, b)
|
||||
@ -480,9 +480,9 @@ func (m *PieceSummary) GetId() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *PieceSummary) GetSize() int64 {
|
||||
func (m *PieceSummary) GetPieceSize() int64 {
|
||||
if m != nil {
|
||||
return m.Size
|
||||
return m.PieceSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@ -495,9 +495,9 @@ func (m *PieceSummary) GetExpirationUnixSec() int64 {
|
||||
}
|
||||
|
||||
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"`
|
||||
Bandwidthallocation *RenterBandwidthAllocation `protobuf:"bytes,1,opt,name=bandwidthallocation" json:"bandwidthallocation,omitempty"`
|
||||
PieceData *PieceRetrieval_PieceData `protobuf:"bytes,2,opt,name=pieceData" json:"pieceData,omitempty"`
|
||||
Authorization *SignedMessage `protobuf:"bytes,3,opt,name=authorization" json:"authorization,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -507,7 +507,7 @@ 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_51f85e261f621d08, []int{5}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{5}
|
||||
}
|
||||
func (m *PieceRetrieval) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PieceRetrieval.Unmarshal(m, b)
|
||||
@ -550,7 +550,7 @@ func (m *PieceRetrieval) GetAuthorization() *SignedMessage {
|
||||
|
||||
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"`
|
||||
PieceSize int64 `protobuf:"varint,2,opt,name=piece_size,json=pieceSize,proto3" json:"piece_size,omitempty"`
|
||||
Offset int64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
@ -561,7 +561,7 @@ func (m *PieceRetrieval_PieceData) Reset() { *m = PieceRetrieval_PieceDa
|
||||
func (m *PieceRetrieval_PieceData) String() string { return proto.CompactTextString(m) }
|
||||
func (*PieceRetrieval_PieceData) ProtoMessage() {}
|
||||
func (*PieceRetrieval_PieceData) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_piecestore_51f85e261f621d08, []int{5, 0}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{5, 0}
|
||||
}
|
||||
func (m *PieceRetrieval_PieceData) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PieceRetrieval_PieceData.Unmarshal(m, b)
|
||||
@ -588,9 +588,9 @@ func (m *PieceRetrieval_PieceData) GetId() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *PieceRetrieval_PieceData) GetSize() int64 {
|
||||
func (m *PieceRetrieval_PieceData) GetPieceSize() int64 {
|
||||
if m != nil {
|
||||
return m.Size
|
||||
return m.PieceSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@ -603,7 +603,7 @@ func (m *PieceRetrieval_PieceData) GetOffset() int64 {
|
||||
}
|
||||
|
||||
type PieceRetrievalStream struct {
|
||||
Size int64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
|
||||
PieceSize int64 `protobuf:"varint,1,opt,name=piece_size,json=pieceSize,proto3" json:"piece_size,omitempty"`
|
||||
Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
@ -614,7 +614,7 @@ 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_51f85e261f621d08, []int{6}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{6}
|
||||
}
|
||||
func (m *PieceRetrievalStream) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PieceRetrievalStream.Unmarshal(m, b)
|
||||
@ -634,9 +634,9 @@ func (m *PieceRetrievalStream) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_PieceRetrievalStream proto.InternalMessageInfo
|
||||
|
||||
func (m *PieceRetrievalStream) GetSize() int64 {
|
||||
func (m *PieceRetrievalStream) GetPieceSize() int64 {
|
||||
if m != nil {
|
||||
return m.Size
|
||||
return m.PieceSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@ -650,7 +650,7 @@ func (m *PieceRetrievalStream) GetContent() []byte {
|
||||
|
||||
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"`
|
||||
Authorization *SignedMessage `protobuf:"bytes,3,opt,name=authorization" json:"authorization,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -660,7 +660,7 @@ 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_51f85e261f621d08, []int{7}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{7}
|
||||
}
|
||||
func (m *PieceDelete) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PieceDelete.Unmarshal(m, b)
|
||||
@ -705,7 +705,7 @@ 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_51f85e261f621d08, []int{8}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{8}
|
||||
}
|
||||
func (m *PieceDeleteSummary) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PieceDeleteSummary.Unmarshal(m, b)
|
||||
@ -744,7 +744,7 @@ 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_51f85e261f621d08, []int{9}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{9}
|
||||
}
|
||||
func (m *PieceStoreSummary) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PieceStoreSummary.Unmarshal(m, b)
|
||||
@ -788,7 +788,7 @@ 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_51f85e261f621d08, []int{10}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{10}
|
||||
}
|
||||
func (m *StatsReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_StatsReq.Unmarshal(m, b)
|
||||
@ -822,7 +822,7 @@ 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_51f85e261f621d08, []int{11}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{11}
|
||||
}
|
||||
func (m *StatSummary) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_StatSummary.Unmarshal(m, b)
|
||||
@ -883,7 +883,7 @@ 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_51f85e261f621d08, []int{12}
|
||||
return fileDescriptor_piecestore_7e7d9ff35bc291a1, []int{12}
|
||||
}
|
||||
func (m *SignedMessage) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SignedMessage.Unmarshal(m, b)
|
||||
@ -1216,65 +1216,65 @@ var _PieceStoreRoutes_serviceDesc = grpc.ServiceDesc{
|
||||
Metadata: "piecestore.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("piecestore.proto", fileDescriptor_piecestore_51f85e261f621d08) }
|
||||
func init() { proto.RegisterFile("piecestore.proto", fileDescriptor_piecestore_7e7d9ff35bc291a1) }
|
||||
|
||||
var fileDescriptor_piecestore_51f85e261f621d08 = []byte{
|
||||
// 898 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x5d, 0x6e, 0xdb, 0x46,
|
||||
0x10, 0x36, 0x49, 0x59, 0xb2, 0x46, 0x3f, 0x51, 0x36, 0x41, 0x4b, 0xb3, 0x4e, 0xab, 0x32, 0x81,
|
||||
0x21, 0xa4, 0x80, 0xd0, 0xba, 0x27, 0x48, 0xa0, 0x20, 0x15, 0x82, 0xba, 0x06, 0x15, 0xbf, 0x04,
|
||||
0x28, 0xd8, 0x25, 0x39, 0x71, 0x16, 0xa1, 0x48, 0x96, 0x5c, 0xba, 0x92, 0x9f, 0x7b, 0x86, 0xbe,
|
||||
0xf4, 0x04, 0x45, 0x5f, 0x7b, 0x89, 0x9e, 0xa2, 0x57, 0x29, 0xb8, 0xbb, 0x22, 0x25, 0x4b, 0xb4,
|
||||
0x8a, 0x20, 0x7d, 0xe3, 0xce, 0xec, 0x7c, 0xf3, 0xcd, 0xec, 0x37, 0xbb, 0x84, 0x41, 0xc2, 0xd0,
|
||||
0xc7, 0x8c, 0xc7, 0x29, 0x8e, 0x93, 0x34, 0xe6, 0x31, 0x59, 0xb3, 0xa4, 0x71, 0xce, 0x31, 0xb3,
|
||||
0x7f, 0x33, 0xc0, 0xbc, 0xa0, 0x4b, 0x4c, 0x9f, 0xd3, 0x28, 0xf8, 0x85, 0x05, 0xfc, 0xdd, 0xb3,
|
||||
0x30, 0x8c, 0x7d, 0xca, 0x59, 0x1c, 0x91, 0x13, 0x68, 0x67, 0xec, 0x2a, 0xa2, 0x3c, 0x4f, 0xd1,
|
||||
0xd4, 0x86, 0xda, 0xa8, 0xeb, 0x54, 0x06, 0x42, 0xa0, 0x11, 0x50, 0x4e, 0x4d, 0x5d, 0x38, 0xc4,
|
||||
0xb7, 0xf5, 0xa7, 0x0e, 0x8d, 0x09, 0xe5, 0x94, 0x7c, 0x09, 0xdd, 0x8c, 0x72, 0x0c, 0x43, 0xc6,
|
||||
0xd1, 0x65, 0x81, 0x8a, 0xee, 0x94, 0xb6, 0x69, 0x40, 0x3e, 0x83, 0x76, 0x9e, 0x84, 0x2c, 0x7a,
|
||||
0x5f, 0xf8, 0x25, 0xc8, 0x91, 0x34, 0x4c, 0x03, 0x72, 0x0c, 0x47, 0x73, 0xba, 0x70, 0x33, 0x76,
|
||||
0x83, 0xa6, 0x31, 0xd4, 0x46, 0x86, 0xd3, 0x9a, 0xd3, 0xc5, 0x8c, 0xdd, 0x20, 0x19, 0xc3, 0x03,
|
||||
0x5c, 0x24, 0x2c, 0x15, 0x1c, 0xdd, 0x3c, 0x62, 0x0b, 0x37, 0x43, 0xdf, 0x6c, 0x88, 0x5d, 0xf7,
|
||||
0x2b, 0xd7, 0x65, 0xc4, 0x16, 0x33, 0xf4, 0xc9, 0x63, 0xe8, 0x65, 0x98, 0x32, 0x1a, 0xba, 0x51,
|
||||
0x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b, 0x36,
|
||||
0x5b, 0xfc, 0xbf, 0xda, 0xe6, 0x5f, 0xdb, 0x41, 0x67, 0x17, 0x0e, 0x99, 0x40, 0x5b, 0x40, 0x94,
|
||||
0xdd, 0xeb, 0x9c, 0x9d, 0xee, 0x68, 0x4a, 0xc9, 0x47, 0x7e, 0x16, 0x6d, 0x75, 0xaa, 0x40, 0xf2,
|
||||
0x02, 0x7a, 0x34, 0xe7, 0xef, 0xe2, 0x94, 0xdd, 0x48, 0x7a, 0x86, 0x40, 0xfa, 0x62, 0x1b, 0x69,
|
||||
0xc6, 0xae, 0x22, 0x0c, 0xbe, 0xc7, 0x2c, 0xa3, 0x57, 0xe8, 0x6c, 0x46, 0x59, 0x08, 0xed, 0x12,
|
||||
0x9e, 0xf4, 0x41, 0x57, 0x53, 0xd4, 0x76, 0x74, 0x16, 0xd4, 0x0d, 0x81, 0x5e, 0x37, 0x04, 0x26,
|
||||
0xb4, 0xfc, 0x38, 0xe2, 0x18, 0x71, 0x75, 0x00, 0xab, 0xa5, 0xfd, 0x13, 0xb4, 0x44, 0x9a, 0x69,
|
||||
0xb0, 0x95, 0x64, 0xab, 0x10, 0xfd, 0x43, 0x0a, 0xb1, 0x3d, 0xe8, 0xca, 0x96, 0xe5, 0xf3, 0x39,
|
||||
0x4d, 0x97, 0x5b, 0x69, 0x08, 0x34, 0xc4, 0x9c, 0x4b, 0xf2, 0xe2, 0xbb, 0xae, 0x3e, 0xa3, 0xa6,
|
||||
0x3e, 0xfb, 0x6f, 0x1d, 0xfa, 0x22, 0x89, 0x83, 0x3c, 0x65, 0x78, 0x4d, 0xc3, 0xff, 0x5b, 0x2b,
|
||||
0xdf, 0x29, 0xad, 0x4c, 0x2a, 0xad, 0x3c, 0xad, 0xd1, 0x4a, 0xc9, 0x69, 0x4b, 0x2f, 0x93, 0x8f,
|
||||
0xa8, 0x97, 0x97, 0x77, 0xe9, 0x65, 0x57, 0x8f, 0x3f, 0x81, 0x66, 0xfc, 0xf6, 0x6d,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, 0x3b, 0xe2, 0x3c,
|
||||
0xc9, 0x04, 0x0e, 0x85, 0x8d, 0x1c, 0xd7, 0x8c, 0xcb, 0x34, 0xb0, 0x3e, 0xaf, 0xbb, 0x75, 0x65,
|
||||
0x57, 0xed, 0x03, 0xf2, 0x06, 0x8e, 0x94, 0x3e, 0x91, 0x0c, 0xf7, 0xcd, 0x9d, 0x75, 0xba, 0x6f,
|
||||
0x87, 0x94, 0xb8, 0x7d, 0x30, 0xd2, 0xbe, 0xd6, 0xc8, 0x39, 0x1c, 0xca, 0xe7, 0xe6, 0xe4, 0xae,
|
||||
0xcb, 0xdf, 0x7a, 0x7c, 0x97, 0xb7, 0x64, 0x3a, 0xd2, 0xc8, 0x0f, 0xd0, 0x54, 0x53, 0xf0, 0xa8,
|
||||
0x26, 0x44, 0xba, 0xad, 0x27, 0x77, 0xba, 0xab, 0xe2, 0x27, 0x05, 0x41, 0xca, 0x33, 0x62, 0xed,
|
||||
0x18, 0x17, 0xa5, 0x44, 0xeb, 0xd1, 0x6e, 0x5f, 0x89, 0xf2, 0xbc, 0xf1, 0x46, 0x4f, 0x3c, 0xaf,
|
||||
0x29, 0x7e, 0x0d, 0xbf, 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x5b, 0xd5, 0xb9, 0x2e, 0x0a,
|
||||
0x00, 0x00,
|
||||
var fileDescriptor_piecestore_7e7d9ff35bc291a1 = []byte{
|
||||
// 900 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x6e, 0xdb, 0x46,
|
||||
0x10, 0x36, 0x49, 0x5b, 0xb2, 0x46, 0x3f, 0x51, 0x36, 0x41, 0x4b, 0xb3, 0x76, 0xab, 0x32, 0x81,
|
||||
0x21, 0xa4, 0x80, 0xd0, 0xba, 0x4f, 0x90, 0x40, 0x41, 0x2b, 0x04, 0x75, 0x0c, 0x2a, 0xbe, 0x04,
|
||||
0x28, 0xd8, 0x15, 0x39, 0x71, 0x16, 0xa1, 0x48, 0x96, 0x5c, 0xba, 0x92, 0xcf, 0x7d, 0x86, 0x5e,
|
||||
0xfa, 0x04, 0x45, 0xaf, 0x7d, 0x94, 0xde, 0xfb, 0x2a, 0x05, 0x77, 0x57, 0xa4, 0xfe, 0x28, 0x15,
|
||||
0x81, 0x7b, 0xd3, 0xce, 0xee, 0x7c, 0xf3, 0xcd, 0xb7, 0xdf, 0x70, 0x05, 0xdd, 0x98, 0xa1, 0x87,
|
||||
0x29, 0x8f, 0x12, 0x1c, 0xc4, 0x49, 0xc4, 0x23, 0xb2, 0x14, 0x49, 0xa2, 0x8c, 0x63, 0x6a, 0xff,
|
||||
0x66, 0x80, 0x79, 0x45, 0xe7, 0x98, 0xbc, 0xa0, 0xa1, 0xff, 0x0b, 0xf3, 0xf9, 0xfb, 0xe7, 0x41,
|
||||
0x10, 0x79, 0x94, 0xb3, 0x28, 0x24, 0xa7, 0xd0, 0x48, 0xd9, 0x4d, 0x48, 0x79, 0x96, 0xa0, 0xa9,
|
||||
0xf5, 0xb4, 0x7e, 0xcb, 0x29, 0x03, 0x84, 0xc0, 0xa1, 0x4f, 0x39, 0x35, 0x75, 0xb1, 0x21, 0x7e,
|
||||
0x5b, 0x7f, 0xea, 0x70, 0x38, 0xa4, 0x9c, 0x92, 0x2f, 0xa1, 0x95, 0x52, 0x8e, 0x41, 0xc0, 0x38,
|
||||
0xba, 0xcc, 0x57, 0xd9, 0xcd, 0x22, 0x36, 0xf2, 0xc9, 0x67, 0xd0, 0xc8, 0xe2, 0x80, 0x85, 0x1f,
|
||||
0xf2, 0x7d, 0x09, 0x72, 0x2c, 0x03, 0x23, 0x9f, 0x9c, 0xc0, 0xf1, 0x94, 0xce, 0xdc, 0x94, 0xdd,
|
||||
0xa1, 0x69, 0xf4, 0xb4, 0xbe, 0xe1, 0xd4, 0xa7, 0x74, 0x36, 0x66, 0x77, 0x48, 0x06, 0x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3b, 0xb6, 0x0b, 0xed, 0x15, 0x71, 0x8b,
|
||||
0x97, 0x45, 0x2b, 0x5f, 0x96, 0xd5, 0xb7, 0x48, 0x5f, 0x7f, 0x8b, 0x4e, 0xa1, 0x11, 0x67, 0x93,
|
||||
0x80, 0x79, 0xaf, 0x70, 0xae, 0x3e, 0x3d, 0x65, 0xe0, 0xe2, 0x77, 0x03, 0xba, 0xa5, 0xdc, 0x8e,
|
||||
0xb8, 0x4f, 0x32, 0x84, 0x23, 0x11, 0x23, 0x27, 0x15, 0x43, 0x34, 0xf2, 0xad, 0xcf, 0xab, 0x3e,
|
||||
0xcb, 0x52, 0x55, 0xfb, 0x80, 0xbc, 0x85, 0x63, 0x65, 0x55, 0x24, 0xbd, 0x7d, 0xd3, 0x68, 0x9d,
|
||||
0xef, 0x3b, 0x21, 0xdd, 0x6e, 0x1f, 0xf4, 0xb5, 0xaf, 0x35, 0x72, 0x09, 0x47, 0xf2, 0x3d, 0x3a,
|
||||
0xdd, 0xf5, 0x3a, 0x58, 0x4f, 0x76, 0xed, 0x16, 0x4c, 0xfb, 0x1a, 0x79, 0x0d, 0x35, 0x35, 0x05,
|
||||
0x67, 0x15, 0x29, 0x72, 0xdb, 0x7a, 0xba, 0x73, 0xbb, 0x6c, 0x7e, 0x98, 0x13, 0xa4, 0x3c, 0x25,
|
||||
0xd6, 0x96, 0x71, 0x51, 0x4e, 0xb4, 0xce, 0xb6, 0xef, 0x15, 0x28, 0x2f, 0x0e, 0xdf, 0xea, 0xf1,
|
||||
0x64, 0x52, 0x13, 0xff, 0x1d, 0xbf, 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0x07, 0x7f, 0x1f, 0xbd,
|
||||
0x4f, 0x0a, 0x00, 0x00,
|
||||
}
|
||||
|
@ -71,14 +71,14 @@ message PieceId {
|
||||
|
||||
message PieceSummary {
|
||||
string id = 1;
|
||||
int64 size = 2;
|
||||
int64 piece_size = 2;
|
||||
int64 expiration_unix_sec = 3;
|
||||
}
|
||||
|
||||
message PieceRetrieval {
|
||||
message PieceData {
|
||||
string id = 1;
|
||||
int64 size = 2;
|
||||
int64 piece_size = 2;
|
||||
int64 offset = 3;
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ message PieceRetrieval {
|
||||
}
|
||||
|
||||
message PieceRetrievalStream {
|
||||
int64 size = 1;
|
||||
int64 piece_size = 1;
|
||||
bytes content = 2;
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: pointerdb.proto
|
||||
|
||||
package pb
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import timestamp "github.com/golang/protobuf/ptypes/timestamp"
|
||||
@ -22,7 +22,7 @@ var _ = math.Inf
|
||||
// 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
|
||||
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
type RedundancyScheme_SchemeType int32
|
||||
|
||||
@ -41,7 +41,7 @@ func (x RedundancyScheme_SchemeType) String() string {
|
||||
return proto.EnumName(RedundancyScheme_SchemeType_name, int32(x))
|
||||
}
|
||||
func (RedundancyScheme_SchemeType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_pointerdb_a8e1675f0e1f1a65, []int{0, 0}
|
||||
return fileDescriptor_pointerdb_d3fa2888a84a5ca2, []int{0, 0}
|
||||
}
|
||||
|
||||
type Pointer_DataType int32
|
||||
@ -64,7 +64,7 @@ func (x Pointer_DataType) String() string {
|
||||
return proto.EnumName(Pointer_DataType_name, int32(x))
|
||||
}
|
||||
func (Pointer_DataType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_pointerdb_a8e1675f0e1f1a65, []int{3, 0}
|
||||
return fileDescriptor_pointerdb_d3fa2888a84a5ca2, []int{3, 0}
|
||||
}
|
||||
|
||||
type RedundancyScheme struct {
|
||||
@ -84,7 +84,7 @@ func (m *RedundancyScheme) Reset() { *m = RedundancyScheme{} }
|
||||
func (m *RedundancyScheme) String() string { return proto.CompactTextString(m) }
|
||||
func (*RedundancyScheme) ProtoMessage() {}
|
||||
func (*RedundancyScheme) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_pointerdb_a8e1675f0e1f1a65, []int{0}
|
||||
return fileDescriptor_pointerdb_d3fa2888a84a5ca2, []int{0}
|
||||
}
|
||||
func (m *RedundancyScheme) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RedundancyScheme.Unmarshal(m, b)
|
||||
@ -158,7 +158,7 @@ func (m *RemotePiece) Reset() { *m = RemotePiece{} }
|
||||
func (m *RemotePiece) String() string { return proto.CompactTextString(m) }
|
||||
func (*RemotePiece) ProtoMessage() {}
|
||||
func (*RemotePiece) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_pointerdb_a8e1675f0e1f1a65, []int{1}
|
||||
return fileDescriptor_pointerdb_d3fa2888a84a5ca2, []int{1}
|
||||
}
|
||||
func (m *RemotePiece) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RemotePiece.Unmarshal(m, b)
|
||||
@ -193,9 +193,9 @@ func (m *RemotePiece) GetNodeId() string {
|
||||
}
|
||||
|
||||
type RemoteSegment struct {
|
||||
Redundancy *RedundancyScheme `protobuf:"bytes,1,opt,name=redundancy,proto3" json:"redundancy,omitempty"`
|
||||
Redundancy *RedundancyScheme `protobuf:"bytes,1,opt,name=redundancy" json:"redundancy,omitempty"`
|
||||
PieceId string `protobuf:"bytes,2,opt,name=piece_id,json=pieceId,proto3" json:"piece_id,omitempty"`
|
||||
RemotePieces []*RemotePiece `protobuf:"bytes,3,rep,name=remote_pieces,json=remotePieces,proto3" json:"remote_pieces,omitempty"`
|
||||
RemotePieces []*RemotePiece `protobuf:"bytes,3,rep,name=remote_pieces,json=remotePieces" json:"remote_pieces,omitempty"`
|
||||
MerkleRoot []byte `protobuf:"bytes,4,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
@ -206,7 +206,7 @@ func (m *RemoteSegment) Reset() { *m = RemoteSegment{} }
|
||||
func (m *RemoteSegment) String() string { return proto.CompactTextString(m) }
|
||||
func (*RemoteSegment) ProtoMessage() {}
|
||||
func (*RemoteSegment) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_pointerdb_a8e1675f0e1f1a65, []int{2}
|
||||
return fileDescriptor_pointerdb_d3fa2888a84a5ca2, []int{2}
|
||||
}
|
||||
func (m *RemoteSegment) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RemoteSegment.Unmarshal(m, b)
|
||||
@ -257,10 +257,10 @@ func (m *RemoteSegment) GetMerkleRoot() []byte {
|
||||
type Pointer struct {
|
||||
Type Pointer_DataType `protobuf:"varint,1,opt,name=type,proto3,enum=pointerdb.Pointer_DataType" json:"type,omitempty"`
|
||||
InlineSegment []byte `protobuf:"bytes,3,opt,name=inline_segment,json=inlineSegment,proto3" json:"inline_segment,omitempty"`
|
||||
Remote *RemoteSegment `protobuf:"bytes,4,opt,name=remote,proto3" json:"remote,omitempty"`
|
||||
Size int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"`
|
||||
CreationDate *timestamp.Timestamp `protobuf:"bytes,6,opt,name=creation_date,json=creationDate,proto3" json:"creation_date,omitempty"`
|
||||
ExpirationDate *timestamp.Timestamp `protobuf:"bytes,7,opt,name=expiration_date,json=expirationDate,proto3" json:"expiration_date,omitempty"`
|
||||
Remote *RemoteSegment `protobuf:"bytes,4,opt,name=remote" json:"remote,omitempty"`
|
||||
SegmentSize int64 `protobuf:"varint,5,opt,name=segment_size,json=segmentSize,proto3" json:"segment_size,omitempty"`
|
||||
CreationDate *timestamp.Timestamp `protobuf:"bytes,6,opt,name=creation_date,json=creationDate" json:"creation_date,omitempty"`
|
||||
ExpirationDate *timestamp.Timestamp `protobuf:"bytes,7,opt,name=expiration_date,json=expirationDate" json:"expiration_date,omitempty"`
|
||||
Metadata []byte `protobuf:"bytes,8,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
@ -271,7 +271,7 @@ func (m *Pointer) Reset() { *m = Pointer{} }
|
||||
func (m *Pointer) String() string { return proto.CompactTextString(m) }
|
||||
func (*Pointer) ProtoMessage() {}
|
||||
func (*Pointer) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_pointerdb_a8e1675f0e1f1a65, []int{3}
|
||||
return fileDescriptor_pointerdb_d3fa2888a84a5ca2, []int{3}
|
||||
}
|
||||
func (m *Pointer) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Pointer.Unmarshal(m, b)
|
||||
@ -312,9 +312,9 @@ func (m *Pointer) GetRemote() *RemoteSegment {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Pointer) GetSize() int64 {
|
||||
func (m *Pointer) GetSegmentSize() int64 {
|
||||
if m != nil {
|
||||
return m.Size
|
||||
return m.SegmentSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@ -343,7 +343,7 @@ func (m *Pointer) GetMetadata() []byte {
|
||||
// PutRequest is a request message for the Put rpc call
|
||||
type PutRequest struct {
|
||||
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
|
||||
Pointer *Pointer `protobuf:"bytes,2,opt,name=pointer,proto3" json:"pointer,omitempty"`
|
||||
Pointer *Pointer `protobuf:"bytes,2,opt,name=pointer" json:"pointer,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -353,7 +353,7 @@ func (m *PutRequest) Reset() { *m = PutRequest{} }
|
||||
func (m *PutRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*PutRequest) ProtoMessage() {}
|
||||
func (*PutRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_pointerdb_a8e1675f0e1f1a65, []int{4}
|
||||
return fileDescriptor_pointerdb_d3fa2888a84a5ca2, []int{4}
|
||||
}
|
||||
func (m *PutRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PutRequest.Unmarshal(m, b)
|
||||
@ -399,7 +399,7 @@ func (m *GetRequest) Reset() { *m = GetRequest{} }
|
||||
func (m *GetRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetRequest) ProtoMessage() {}
|
||||
func (*GetRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_pointerdb_a8e1675f0e1f1a65, []int{5}
|
||||
return fileDescriptor_pointerdb_d3fa2888a84a5ca2, []int{5}
|
||||
}
|
||||
func (m *GetRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetRequest.Unmarshal(m, b)
|
||||
@ -443,7 +443,7 @@ func (m *ListRequest) Reset() { *m = ListRequest{} }
|
||||
func (m *ListRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListRequest) ProtoMessage() {}
|
||||
func (*ListRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_pointerdb_a8e1675f0e1f1a65, []int{6}
|
||||
return fileDescriptor_pointerdb_d3fa2888a84a5ca2, []int{6}
|
||||
}
|
||||
func (m *ListRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ListRequest.Unmarshal(m, b)
|
||||
@ -516,7 +516,7 @@ func (m *PutResponse) Reset() { *m = PutResponse{} }
|
||||
func (m *PutResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*PutResponse) ProtoMessage() {}
|
||||
func (*PutResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_pointerdb_a8e1675f0e1f1a65, []int{7}
|
||||
return fileDescriptor_pointerdb_d3fa2888a84a5ca2, []int{7}
|
||||
}
|
||||
func (m *PutResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PutResponse.Unmarshal(m, b)
|
||||
@ -538,10 +538,10 @@ var xxx_messageInfo_PutResponse proto.InternalMessageInfo
|
||||
|
||||
// GetResponse is a response message for the Get rpc call
|
||||
type GetResponse struct {
|
||||
Pointer *Pointer `protobuf:"bytes,1,opt,name=pointer,proto3" json:"pointer,omitempty"`
|
||||
Nodes []*Node `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`
|
||||
Pba *PayerBandwidthAllocation `protobuf:"bytes,3,opt,name=pba,proto3" json:"pba,omitempty"`
|
||||
Authorization *SignedMessage `protobuf:"bytes,4,opt,name=authorization,proto3" json:"authorization,omitempty"`
|
||||
Pointer *Pointer `protobuf:"bytes,1,opt,name=pointer" json:"pointer,omitempty"`
|
||||
Nodes []*Node `protobuf:"bytes,2,rep,name=nodes" json:"nodes,omitempty"`
|
||||
Pba *PayerBandwidthAllocation `protobuf:"bytes,3,opt,name=pba" json:"pba,omitempty"`
|
||||
Authorization *SignedMessage `protobuf:"bytes,4,opt,name=authorization" json:"authorization,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -551,7 +551,7 @@ func (m *GetResponse) Reset() { *m = GetResponse{} }
|
||||
func (m *GetResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetResponse) ProtoMessage() {}
|
||||
func (*GetResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_pointerdb_a8e1675f0e1f1a65, []int{8}
|
||||
return fileDescriptor_pointerdb_d3fa2888a84a5ca2, []int{8}
|
||||
}
|
||||
func (m *GetResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetResponse.Unmarshal(m, b)
|
||||
@ -601,7 +601,7 @@ func (m *GetResponse) GetAuthorization() *SignedMessage {
|
||||
|
||||
// ListResponse is a response message for the List rpc call
|
||||
type ListResponse struct {
|
||||
Items []*ListResponse_Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
|
||||
Items []*ListResponse_Item `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"`
|
||||
More bool `protobuf:"varint,2,opt,name=more,proto3" json:"more,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
@ -612,7 +612,7 @@ func (m *ListResponse) Reset() { *m = ListResponse{} }
|
||||
func (m *ListResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListResponse) ProtoMessage() {}
|
||||
func (*ListResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_pointerdb_a8e1675f0e1f1a65, []int{9}
|
||||
return fileDescriptor_pointerdb_d3fa2888a84a5ca2, []int{9}
|
||||
}
|
||||
func (m *ListResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ListResponse.Unmarshal(m, b)
|
||||
@ -648,7 +648,7 @@ func (m *ListResponse) GetMore() bool {
|
||||
|
||||
type ListResponse_Item struct {
|
||||
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
|
||||
Pointer *Pointer `protobuf:"bytes,2,opt,name=pointer,proto3" json:"pointer,omitempty"`
|
||||
Pointer *Pointer `protobuf:"bytes,2,opt,name=pointer" json:"pointer,omitempty"`
|
||||
IsPrefix bool `protobuf:"varint,3,opt,name=is_prefix,json=isPrefix,proto3" json:"is_prefix,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
@ -659,7 +659,7 @@ func (m *ListResponse_Item) Reset() { *m = ListResponse_Item{} }
|
||||
func (m *ListResponse_Item) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListResponse_Item) ProtoMessage() {}
|
||||
func (*ListResponse_Item) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_pointerdb_a8e1675f0e1f1a65, []int{9, 0}
|
||||
return fileDescriptor_pointerdb_d3fa2888a84a5ca2, []int{9, 0}
|
||||
}
|
||||
func (m *ListResponse_Item) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ListResponse_Item.Unmarshal(m, b)
|
||||
@ -711,7 +711,7 @@ func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
|
||||
func (m *DeleteRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteRequest) ProtoMessage() {}
|
||||
func (*DeleteRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_pointerdb_a8e1675f0e1f1a65, []int{10}
|
||||
return fileDescriptor_pointerdb_d3fa2888a84a5ca2, []int{10}
|
||||
}
|
||||
func (m *DeleteRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DeleteRequest.Unmarshal(m, b)
|
||||
@ -749,7 +749,7 @@ func (m *DeleteResponse) Reset() { *m = DeleteResponse{} }
|
||||
func (m *DeleteResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteResponse) ProtoMessage() {}
|
||||
func (*DeleteResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_pointerdb_a8e1675f0e1f1a65, []int{11}
|
||||
return fileDescriptor_pointerdb_d3fa2888a84a5ca2, []int{11}
|
||||
}
|
||||
func (m *DeleteResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DeleteResponse.Unmarshal(m, b)
|
||||
@ -784,7 +784,7 @@ func (m *IterateRequest) Reset() { *m = IterateRequest{} }
|
||||
func (m *IterateRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*IterateRequest) ProtoMessage() {}
|
||||
func (*IterateRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_pointerdb_a8e1675f0e1f1a65, []int{12}
|
||||
return fileDescriptor_pointerdb_d3fa2888a84a5ca2, []int{12}
|
||||
}
|
||||
func (m *IterateRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_IterateRequest.Unmarshal(m, b)
|
||||
@ -1030,71 +1030,72 @@ var _PointerDB_serviceDesc = grpc.ServiceDesc{
|
||||
Metadata: "pointerdb.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("pointerdb.proto", fileDescriptor_pointerdb_a8e1675f0e1f1a65) }
|
||||
func init() { proto.RegisterFile("pointerdb.proto", fileDescriptor_pointerdb_d3fa2888a84a5ca2) }
|
||||
|
||||
var fileDescriptor_pointerdb_a8e1675f0e1f1a65 = []byte{
|
||||
// 1003 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x5f, 0x6f, 0x1b, 0x45,
|
||||
0x10, 0xaf, 0xff, 0xdb, 0xe3, 0x38, 0x35, 0xab, 0x90, 0xba, 0x6e, 0x51, 0xa2, 0xab, 0x40, 0x01,
|
||||
0xaa, 0x0b, 0x32, 0x95, 0x90, 0x28, 0x08, 0x35, 0x4d, 0xa8, 0x2c, 0xb5, 0xc1, 0x5a, 0xe7, 0x89,
|
||||
0x97, 0xd3, 0xda, 0x37, 0xb6, 0x57, 0xdc, 0xdd, 0x5e, 0x76, 0xf7, 0x42, 0x93, 0x6f, 0xc2, 0x37,
|
||||
0xe1, 0x85, 0x47, 0x3e, 0x0a, 0x8f, 0x88, 0xaf, 0x80, 0x76, 0xf7, 0xce, 0x3e, 0x37, 0x34, 0x7d,
|
||||
0xe0, 0xc5, 0xbe, 0x99, 0xf9, 0xcd, 0xec, 0xce, 0xfc, 0x7e, 0xb3, 0x70, 0x3f, 0x15, 0x3c, 0xd1,
|
||||
0x28, 0xc3, 0x99, 0x9f, 0x4a, 0xa1, 0x05, 0xe9, 0xac, 0x1d, 0xc3, 0x83, 0xa5, 0x10, 0xcb, 0x08,
|
||||
0x8f, 0x6d, 0x60, 0x96, 0x2d, 0x8e, 0x35, 0x8f, 0x51, 0x69, 0x16, 0xa7, 0x0e, 0x3b, 0xec, 0x89,
|
||||
0x2b, 0x94, 0x11, 0xbb, 0xce, 0xcd, 0x7e, 0xca, 0x71, 0x8e, 0x4a, 0x0b, 0x89, 0xce, 0xe3, 0xfd,
|
||||
0x56, 0x85, 0x3e, 0xc5, 0x30, 0x4b, 0x42, 0x96, 0xcc, 0xaf, 0xa7, 0xf3, 0x15, 0xc6, 0x48, 0xbe,
|
||||
0x85, 0xba, 0xbe, 0x4e, 0x71, 0x50, 0x39, 0xac, 0x1c, 0xed, 0x8e, 0x3e, 0xf3, 0x37, 0x37, 0x78,
|
||||
0x17, 0xea, 0xbb, 0xbf, 0x8b, 0xeb, 0x14, 0xa9, 0xcd, 0x21, 0x0f, 0xa0, 0x15, 0xf3, 0x24, 0x90,
|
||||
0x78, 0x39, 0xa8, 0x1e, 0x56, 0x8e, 0x1a, 0xb4, 0x19, 0xf3, 0x84, 0xe2, 0x25, 0xd9, 0x83, 0x86,
|
||||
0x16, 0x9a, 0x45, 0x83, 0x9a, 0x75, 0x3b, 0x83, 0x7c, 0x0e, 0x7d, 0x89, 0x29, 0xe3, 0x32, 0xd0,
|
||||
0x2b, 0x89, 0x6a, 0x25, 0xa2, 0x70, 0x50, 0xb7, 0x80, 0xfb, 0xce, 0x7f, 0x51, 0xb8, 0xc9, 0x97,
|
||||
0xf0, 0x91, 0xca, 0xe6, 0x73, 0x54, 0xaa, 0x84, 0x6d, 0x58, 0x6c, 0x3f, 0x0f, 0x6c, 0xc0, 0x4f,
|
||||
0x81, 0xa0, 0x64, 0x2a, 0x93, 0x18, 0xa8, 0x15, 0x33, 0xbf, 0xfc, 0x06, 0x07, 0x4d, 0x87, 0xce,
|
||||
0x23, 0x53, 0x13, 0x98, 0xf2, 0x1b, 0xf4, 0xf6, 0x00, 0x36, 0x8d, 0x90, 0x26, 0x54, 0xe9, 0xb4,
|
||||
0x7f, 0xcf, 0x7b, 0x09, 0x5d, 0x8a, 0xb1, 0xd0, 0x38, 0x31, 0x53, 0x23, 0x8f, 0xa0, 0x63, 0xc7,
|
||||
0x17, 0x24, 0x59, 0x6c, 0x47, 0xd3, 0xa0, 0x6d, 0xeb, 0x38, 0xcf, 0x62, 0xd3, 0x76, 0x22, 0x42,
|
||||
0x0c, 0x78, 0x68, 0xdb, 0xee, 0xd0, 0xa6, 0x31, 0xc7, 0xa1, 0xf7, 0x67, 0x05, 0x7a, 0xae, 0xca,
|
||||
0x14, 0x97, 0x31, 0x26, 0x9a, 0x3c, 0x07, 0x90, 0xeb, 0x31, 0xda, 0x42, 0xdd, 0xd1, 0xa3, 0x3b,
|
||||
0x66, 0x4c, 0x4b, 0x70, 0xf2, 0x10, 0xdc, 0x99, 0x9b, 0x83, 0x5a, 0xd6, 0x1e, 0x87, 0xe4, 0x39,
|
||||
0xf4, 0xa4, 0x3d, 0x28, 0x70, 0x2c, 0x0f, 0x6a, 0x87, 0xb5, 0xa3, 0xee, 0x68, 0x7f, 0xab, 0xf4,
|
||||
0xba, 0x1d, 0xba, 0x23, 0x37, 0x86, 0x22, 0x07, 0xd0, 0x8d, 0x51, 0xfe, 0x12, 0x61, 0x20, 0x85,
|
||||
0xd0, 0x96, 0x82, 0x1d, 0x0a, 0xce, 0x45, 0x85, 0xd0, 0xde, 0xdf, 0x55, 0x68, 0x4d, 0x5c, 0x21,
|
||||
0x72, 0xbc, 0xa5, 0x8f, 0xf2, 0xdd, 0x73, 0x84, 0x7f, 0xca, 0x34, 0x2b, 0x89, 0xe2, 0x53, 0xd8,
|
||||
0xe5, 0x49, 0xc4, 0x13, 0x0c, 0x94, 0x1b, 0x82, 0x15, 0xc1, 0x0e, 0xed, 0x39, 0x6f, 0x31, 0x99,
|
||||
0xaf, 0xa0, 0xe9, 0x2e, 0x65, 0xcf, 0xef, 0x8e, 0x06, 0xb7, 0xae, 0x9e, 0x23, 0x69, 0x8e, 0x23,
|
||||
0x04, 0xea, 0x96, 0x58, 0x23, 0x83, 0x1a, 0xb5, 0xdf, 0xe4, 0x07, 0xe8, 0xcd, 0x25, 0x32, 0xcd,
|
||||
0x45, 0x12, 0x84, 0x4c, 0x3b, 0xd6, 0xbb, 0xa3, 0xa1, 0xef, 0x96, 0xc5, 0x2f, 0x96, 0xc5, 0xbf,
|
||||
0x28, 0x96, 0x85, 0xee, 0x14, 0x09, 0xa7, 0x4c, 0x23, 0x79, 0x09, 0xf7, 0xf1, 0x6d, 0xca, 0x65,
|
||||
0xa9, 0x44, 0xeb, 0x83, 0x25, 0x76, 0x37, 0x29, 0xb6, 0xc8, 0x10, 0xda, 0x31, 0x6a, 0x16, 0x32,
|
||||
0xcd, 0x06, 0x6d, 0xdb, 0xec, 0xda, 0xf6, 0x3c, 0x68, 0x17, 0x03, 0x22, 0x00, 0xcd, 0xf1, 0xf9,
|
||||
0xeb, 0xf1, 0xf9, 0x59, 0xff, 0x9e, 0xf9, 0xa6, 0x67, 0x6f, 0x7e, 0xba, 0x38, 0xeb, 0x57, 0xbc,
|
||||
0x73, 0x80, 0x49, 0xa6, 0x29, 0x5e, 0x66, 0xa8, 0xb4, 0xe9, 0x33, 0x65, 0x7a, 0x65, 0x27, 0xde,
|
||||
0xa1, 0xf6, 0x9b, 0x3c, 0x85, 0x56, 0x3e, 0x1e, 0xab, 0x84, 0xee, 0x88, 0xdc, 0x26, 0x82, 0x16,
|
||||
0x10, 0xef, 0x10, 0xe0, 0x15, 0xde, 0x55, 0xcf, 0xfb, 0xbd, 0x02, 0xdd, 0xd7, 0x5c, 0xad, 0x31,
|
||||
0xfb, 0xd0, 0x4c, 0x25, 0x2e, 0xf8, 0xdb, 0x1c, 0x95, 0x5b, 0x46, 0x2a, 0x4a, 0x33, 0xa9, 0x03,
|
||||
0xb6, 0x28, 0xce, 0xee, 0x50, 0xb0, 0xae, 0x17, 0xc6, 0x43, 0x3e, 0x01, 0xc0, 0x24, 0x0c, 0x66,
|
||||
0xb8, 0x10, 0x12, 0x2d, 0xd3, 0x1d, 0xda, 0xc1, 0x24, 0x3c, 0xb1, 0x0e, 0xf2, 0x18, 0x3a, 0x12,
|
||||
0xe7, 0x99, 0x54, 0xfc, 0xca, 0x11, 0xdd, 0xa6, 0x1b, 0x87, 0x79, 0x26, 0x22, 0x1e, 0x73, 0x9d,
|
||||
0x6f, 0xb6, 0x33, 0x4c, 0x49, 0x33, 0xbd, 0x60, 0x11, 0xb1, 0xa5, 0xb2, 0x84, 0xb6, 0x68, 0xc7,
|
||||
0x78, 0x7e, 0x34, 0x0e, 0xaf, 0x07, 0x5d, 0x3b, 0x2c, 0x95, 0x8a, 0x44, 0xa1, 0xf7, 0x57, 0x05,
|
||||
0xba, 0xb6, 0x59, 0x67, 0x97, 0x27, 0x55, 0xf9, 0xe0, 0xa4, 0xc8, 0x13, 0x68, 0x98, 0xdd, 0x55,
|
||||
0x83, 0xaa, 0xdd, 0x9f, 0x9e, 0x5f, 0xbc, 0xa1, 0xe7, 0x22, 0x44, 0xea, 0x62, 0xe4, 0x3b, 0xa8,
|
||||
0xa5, 0x33, 0x66, 0x9b, 0xeb, 0x8e, 0xbe, 0xf0, 0x37, 0xef, 0xaa, 0x14, 0x99, 0x46, 0xe5, 0x4f,
|
||||
0xd8, 0x35, 0xca, 0x13, 0x96, 0x84, 0xbf, 0xf2, 0x50, 0xaf, 0x5e, 0x44, 0x91, 0x98, 0x5b, 0x6d,
|
||||
0x50, 0x93, 0x46, 0xce, 0xa0, 0xc7, 0x32, 0xbd, 0x12, 0x92, 0xdf, 0x58, 0x6f, 0xae, 0xf7, 0x83,
|
||||
0xdb, 0x75, 0xa6, 0x7c, 0x99, 0x60, 0xf8, 0x06, 0x95, 0x62, 0x4b, 0xa4, 0xdb, 0x59, 0xde, 0x1f,
|
||||
0x15, 0xd8, 0x71, 0x8c, 0xe5, 0x8d, 0x8e, 0xa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5, 0x74, 0x36, 0x6b, 0xda, 0xa7, 0xee, 0xeb, 0x7f, 0x03, 0x00,
|
||||
0x00, 0xff, 0xff, 0xa1, 0x60, 0x9c, 0x3f, 0x86, 0x08, 0x00, 0x00,
|
||||
var fileDescriptor_pointerdb_d3fa2888a84a5ca2 = []byte{
|
||||
// 1010 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcd, 0x6e, 0x1b, 0x37,
|
||||
0x10, 0x8e, 0xfe, 0xa5, 0x59, 0xc9, 0x56, 0x09, 0xd7, 0x51, 0x94, 0x14, 0x76, 0x37, 0x68, 0xe1,
|
||||
0xb6, 0x81, 0x5c, 0xa8, 0x01, 0x0a, 0x34, 0x2d, 0x8a, 0x38, 0x76, 0x03, 0x01, 0x89, 0x2b, 0x50,
|
||||
0x3e, 0xf5, 0xb2, 0xa0, 0xb4, 0x23, 0x89, 0xa8, 0x76, 0xb9, 0x26, 0xb9, 0x6e, 0xec, 0x37, 0xe9,
|
||||
0x9b, 0xf4, 0xd2, 0x63, 0x1f, 0xa5, 0xe7, 0xbe, 0x40, 0x0f, 0x05, 0xc9, 0x5d, 0x69, 0x15, 0x37,
|
||||
0xce, 0x21, 0x17, 0x69, 0xe7, 0xe3, 0x37, 0x43, 0xce, 0x7c, 0x1f, 0x09, 0xbb, 0x89, 0xe0, 0xb1,
|
||||
0x46, 0x19, 0x4e, 0x07, 0x89, 0x14, 0x5a, 0x90, 0xd6, 0x1a, 0xe8, 0x1f, 0x2c, 0x84, 0x58, 0xac,
|
||||
0xf0, 0xd8, 0x2e, 0x4c, 0xd3, 0xf9, 0xb1, 0xe6, 0x11, 0x2a, 0xcd, 0xa2, 0xc4, 0x71, 0xfb, 0x1d,
|
||||
0x71, 0x85, 0x72, 0xc5, 0xae, 0xb3, 0xb0, 0x9b, 0x70, 0x9c, 0xa1, 0xd2, 0x42, 0xa2, 0x43, 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0x3b, 0x13, 0x78, 0xc3, 0xfe, 0xc0, 0xdd,
|
||||
0x9d, 0x41, 0x7e, 0x77, 0x06, 0x17, 0xf9, 0xdd, 0xa1, 0xed, 0x3c, 0xe1, 0x94, 0x69, 0x24, 0x2f,
|
||||
0x60, 0x17, 0xdf, 0x24, 0x5c, 0x16, 0x4a, 0x34, 0xde, 0x5b, 0x62, 0x67, 0x93, 0x62, 0x8b, 0xf4,
|
||||
0xa1, 0x19, 0xa1, 0x66, 0x21, 0xd3, 0xac, 0xd7, 0xb4, 0xbd, 0xaf, 0x63, 0xdf, 0x87, 0x66, 0x3e,
|
||||
0x2f, 0x02, 0x50, 0x1f, 0x9d, 0xbf, 0x1a, 0x9d, 0x9f, 0x75, 0xef, 0x99, 0x6f, 0x7a, 0xf6, 0xfa,
|
||||
0xe7, 0x8b, 0xb3, 0x6e, 0xc9, 0x3f, 0x07, 0x18, 0xa7, 0x9a, 0xe2, 0x65, 0x8a, 0x4a, 0x13, 0x02,
|
||||
0xd5, 0x84, 0xe9, 0xa5, 0x15, 0xa0, 0x45, 0xed, 0x37, 0x79, 0x02, 0x8d, 0x6c, 0x5a, 0xd6, 0x18,
|
||||
0xde, 0x90, 0xdc, 0xd6, 0x85, 0xe6, 0x14, 0xff, 0x10, 0xe0, 0x25, 0xde, 0x55, 0xcf, 0xff, 0xa3,
|
||||
0x04, 0xde, 0x2b, 0xae, 0xd6, 0x9c, 0x7d, 0xa8, 0x27, 0x12, 0xe7, 0xfc, 0x4d, 0xc6, 0xca, 0x22,
|
||||
0xe3, 0x1c, 0xa5, 0x99, 0xd4, 0x01, 0x9b, 0xe7, 0x7b, 0xb7, 0x28, 0x58, 0xe8, 0xb9, 0x41, 0xc8,
|
||||
0x27, 0x00, 0x18, 0x87, 0xc1, 0x14, 0xe7, 0x42, 0xa2, 0x15, 0xbe, 0x45, 0x5b, 0x18, 0x87, 0x27,
|
||||
0x16, 0x20, 0x8f, 0xa0, 0x25, 0x71, 0x96, 0x4a, 0x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 0x95, 0xb0, 0xdf, 0x7d, 0x84, 0xaa, 0xa1, 0x7c, 0xb8, 0xed,
|
||||
0xcc, 0x1b, 0xca, 0x55, 0x90, 0xf9, 0xa8, 0x62, 0xb7, 0x68, 0x72, 0x35, 0xb6, 0xb1, 0xff, 0x18,
|
||||
0x3a, 0xa7, 0xb8, 0x42, 0x8d, 0x77, 0xd9, 0xb2, 0x0b, 0x3b, 0x39, 0x29, 0x93, 0x57, 0xc2, 0xce,
|
||||
0x48, 0xa3, 0x64, 0x9b, 0xbc, 0x77, 0x59, 0x75, 0x0f, 0x6a, 0x73, 0x2e, 0x95, 0xce, 0x4c, 0xea,
|
||||
0x02, 0xd2, 0x83, 0x86, 0xf3, 0x1b, 0x66, 0x27, 0xca, 0x43, 0xb7, 0x72, 0x85, 0x66, 0xa5, 0x9a,
|
||||
0xaf, 0xd8, 0x70, 0xf8, 0x4f, 0x09, 0x5a, 0x59, 0x73, 0xa7, 0x27, 0xe4, 0x29, 0x54, 0xc6, 0xa9,
|
||||
0x26, 0x1f, 0x17, 0x3b, 0x5f, 0x5f, 0xd6, 0xfe, 0xfe, 0xdb, 0x70, 0xa6, 0xce, 0x53, 0xa8, 0xbc,
|
||||
0xc4, 0xed, 0xac, 0xcd, 0x95, 0xdc, 0xca, 0x2a, 0x9a, 0xf7, 0x5b, 0xa8, 0x1a, 0xed, 0xc8, 0xfe,
|
||||
0x2d, 0x31, 0x5d, 0xde, 0xfd, 0x77, 0x88, 0x4c, 0x7e, 0x80, 0xba, 0x1b, 0x1c, 0x29, 0x3e, 0xab,
|
||||
0x5b, 0x03, 0xef, 0x3f, 0xf8, 0x9f, 0x15, 0x97, 0x7e, 0x52, 0xfd, 0xa5, 0x9c, 0x4c, 0xa7, 0x75,
|
||||
0xfb, 0xd4, 0x7d, 0xf3, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x5e, 0x56, 0xbe, 0x95, 0x08,
|
||||
0x00, 0x00,
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ message Pointer {
|
||||
|
||||
bytes inline_segment = 3;
|
||||
RemoteSegment remote = 4;
|
||||
int64 size = 5;
|
||||
int64 segment_size = 5;
|
||||
|
||||
google.protobuf.Timestamp creation_date = 6;
|
||||
google.protobuf.Timestamp expiration_date = 7;
|
||||
|
@ -33,7 +33,7 @@ func PieceRanger(ctx context.Context, c *PieceStore, stream pb.PieceStoreRoutes_
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &pieceRanger{c: c, id: id, size: piece.Size, stream: stream, pba: pba, authorization: authorization}, nil
|
||||
return &pieceRanger{c: c, id: id, size: piece.PieceSize, stream: stream, pba: pba, authorization: authorization}, nil
|
||||
}
|
||||
|
||||
// PieceRangerSize creates a PieceRanger with known size.
|
||||
@ -64,7 +64,7 @@ func (r *pieceRanger) Range(ctx context.Context, offset, length int64) (io.ReadC
|
||||
}
|
||||
|
||||
// send piece data
|
||||
if err := r.stream.Send(&pb.PieceRetrieval{PieceData: &pb.PieceRetrieval_PieceData{Id: r.id.String(), Size: length, Offset: offset}, Authorization: r.authorization}); err != nil {
|
||||
if err := r.stream.Send(&pb.PieceRetrieval{PieceData: &pb.PieceRetrieval_PieceData{Id: r.id.String(), PieceSize: length, Offset: offset}, Authorization: r.authorization}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ func TestPieceRanger(t *testing.T) {
|
||||
|
||||
route.EXPECT().Piece(
|
||||
gomock.Any(), gomock.Any(), gomock.Any(),
|
||||
).Return(&pb.PieceSummary{Size: int64(len(tt.data))}, nil)
|
||||
).Return(&pb.PieceSummary{PieceSize: int64(len(tt.data))}, nil)
|
||||
|
||||
stream := pb.NewMockPieceStoreRoutes_RetrieveClient(ctrl)
|
||||
pid := NewPieceID()
|
||||
@ -59,7 +59,7 @@ func TestPieceRanger(t *testing.T) {
|
||||
if tt.offset >= 0 && tt.length > 0 && tt.offset+tt.length <= tt.size {
|
||||
msg1 := &pb.PieceRetrieval{
|
||||
PieceData: &pb.PieceRetrieval_PieceData{
|
||||
Id: pid.String(), Size: tt.length, Offset: tt.offset,
|
||||
Id: pid.String(), PieceSize: tt.length, Offset: tt.offset,
|
||||
},
|
||||
}
|
||||
|
||||
@ -67,8 +67,8 @@ func TestPieceRanger(t *testing.T) {
|
||||
stream.EXPECT().Send(gomock.Any()).Return(nil).MinTimes(0).MaxTimes(1)
|
||||
stream.EXPECT().Recv().Return(
|
||||
&pb.PieceRetrievalStream{
|
||||
Size: tt.length,
|
||||
Content: []byte(tt.data)[tt.offset : tt.offset+tt.length],
|
||||
PieceSize: tt.length,
|
||||
Content: []byte(tt.data)[tt.offset : tt.offset+tt.length],
|
||||
}, nil)
|
||||
stream.EXPECT().Recv().Return(&pb.PieceRetrievalStream{}, io.EOF)
|
||||
}
|
||||
@ -137,7 +137,7 @@ func TestPieceRangerSize(t *testing.T) {
|
||||
if tt.offset >= 0 && tt.length > 0 && tt.offset+tt.length <= tt.size {
|
||||
msg1 := &pb.PieceRetrieval{
|
||||
PieceData: &pb.PieceRetrieval_PieceData{
|
||||
Id: pid.String(), Size: tt.length, Offset: tt.offset,
|
||||
Id: pid.String(), PieceSize: tt.length, Offset: tt.offset,
|
||||
},
|
||||
}
|
||||
|
||||
@ -145,8 +145,8 @@ func TestPieceRangerSize(t *testing.T) {
|
||||
stream.EXPECT().Send(gomock.Any()).Return(nil).MinTimes(0).MaxTimes(1)
|
||||
stream.EXPECT().Recv().Return(
|
||||
&pb.PieceRetrievalStream{
|
||||
Size: tt.length,
|
||||
Content: []byte(tt.data)[tt.offset : tt.offset+tt.length],
|
||||
PieceSize: tt.length,
|
||||
Content: []byte(tt.data)[tt.offset : tt.offset+tt.length],
|
||||
}, nil)
|
||||
stream.EXPECT().Recv().Return(&pb.PieceRetrievalStream{}, io.EOF)
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ func NewStreamWriter(s *Server, stream pb.PieceStoreRoutes_RetrieveServer) *Stre
|
||||
// Write -- Write method for piece upload to stream for Server.Retrieve
|
||||
func (s *StreamWriter) Write(b []byte) (int, error) {
|
||||
// Write the buffer to the stream we opened earlier
|
||||
if err := s.stream.Send(&pb.PieceRetrievalStream{Size: int64(len(b)), Content: b}); err != nil {
|
||||
if err := s.stream.Send(&pb.PieceRetrievalStream{PieceSize: int64(len(b)), Content: b}); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
|
@ -68,11 +68,11 @@ func (s *Server) Retrieve(stream pb.PieceStoreRoutes_RetrieveServer) (err error)
|
||||
}
|
||||
|
||||
// Read the size specified
|
||||
totalToRead := pd.GetSize()
|
||||
totalToRead := pd.GetPieceSize()
|
||||
fileSize := fileInfo.Size()
|
||||
|
||||
// Read the entire file if specified -1 but make sure we do it from the correct offset
|
||||
if pd.GetSize() <= -1 || totalToRead+pd.GetOffset() > fileSize {
|
||||
if pd.GetPieceSize() <= -1 || totalToRead+pd.GetOffset() > fileSize {
|
||||
totalToRead = fileSize - pd.GetOffset()
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,7 @@ func (s *Server) Piece(ctx context.Context, in *pb.PieceId) (*pb.PieceSummary, e
|
||||
}
|
||||
|
||||
zap.S().Infof("Successfully retrieved meta for %s.", in.GetId())
|
||||
return &pb.PieceSummary{Id: in.GetId(), Size: fileInfo.Size(), ExpirationUnixSec: ttl}, nil
|
||||
return &pb.PieceSummary{Id: in.GetId(), PieceSize: fileInfo.Size(), ExpirationUnixSec: ttl}, nil
|
||||
}
|
||||
|
||||
// Stats will return statistics about the Server
|
||||
|
@ -122,7 +122,7 @@ func TestPiece(t *testing.T) {
|
||||
assert.NoError(err)
|
||||
|
||||
assert.Equal(tt.id, resp.GetId())
|
||||
assert.Equal(tt.size, resp.GetSize())
|
||||
assert.Equal(tt.size, resp.GetPieceSize())
|
||||
assert.Equal(tt.expiration, resp.GetExpirationUnixSec())
|
||||
})
|
||||
}
|
||||
@ -233,7 +233,7 @@ func TestRetrieve(t *testing.T) {
|
||||
assert.NoError(err)
|
||||
|
||||
// send piece database
|
||||
err = stream.Send(&pb.PieceRetrieval{PieceData: &pb.PieceRetrieval_PieceData{Id: tt.id, Size: tt.reqSize, Offset: tt.offset}})
|
||||
err = stream.Send(&pb.PieceRetrieval{PieceData: &pb.PieceRetrieval_PieceData{Id: tt.id, PieceSize: tt.reqSize, Offset: tt.offset}})
|
||||
assert.NoError(err)
|
||||
|
||||
totalAllocated := int64(0)
|
||||
@ -274,7 +274,7 @@ func TestRetrieve(t *testing.T) {
|
||||
}
|
||||
|
||||
data = fmt.Sprintf("%s%s", data, string(resp.GetContent()))
|
||||
totalRetrieved += resp.GetSize()
|
||||
totalRetrieved += resp.GetPieceSize()
|
||||
}
|
||||
|
||||
assert.NoError(err)
|
||||
|
@ -68,7 +68,7 @@ func makePointer(path storj.Path) pb.PutRequest {
|
||||
PieceId: "testId",
|
||||
RemotePieces: rps,
|
||||
},
|
||||
Size: int64(1),
|
||||
SegmentSize: int64(1),
|
||||
},
|
||||
}
|
||||
return pr
|
||||
@ -198,7 +198,7 @@ func TestList(t *testing.T) {
|
||||
{"prefix", "after", "before", false, 1, meta.All, "some key",
|
||||
[]*pb.ListResponse_Item{
|
||||
{Path: "a/b/c", Pointer: &pb.Pointer{
|
||||
Size: 1234,
|
||||
SegmentSize: 1234,
|
||||
CreationDate: ptypes.TimestampNow(),
|
||||
ExpirationDate: ptypes.TimestampNow(),
|
||||
}},
|
||||
@ -206,8 +206,8 @@ func TestList(t *testing.T) {
|
||||
true, nil, ""},
|
||||
{"some/prefix", "start/after", "end/before", true, 123, meta.Size, "some key",
|
||||
[]*pb.ListResponse_Item{
|
||||
{Path: "a/b/c", Pointer: &pb.Pointer{Size: 1234}},
|
||||
{Path: "x/y", Pointer: &pb.Pointer{Size: 789}},
|
||||
{Path: "a/b/c", Pointer: &pb.Pointer{SegmentSize: 1234}},
|
||||
{Path: "x/y", Pointer: &pb.Pointer{SegmentSize: 789}},
|
||||
},
|
||||
true, nil, ""},
|
||||
} {
|
||||
@ -246,7 +246,7 @@ func TestList(t *testing.T) {
|
||||
|
||||
for i := 0; i < len(items); i++ {
|
||||
assert.Equal(t, tt.items[i].GetPath(), items[i].Path)
|
||||
assert.Equal(t, tt.items[i].GetPointer().GetSize(), items[i].Pointer.GetSize())
|
||||
assert.Equal(t, tt.items[i].GetPointer().GetSegmentSize(), items[i].Pointer.GetSegmentSize())
|
||||
assert.Equal(t, tt.items[i].GetPointer().GetCreationDate(), items[i].Pointer.GetCreationDate())
|
||||
assert.Equal(t, tt.items[i].GetPointer().GetExpirationDate(), items[i].Pointer.GetExpirationDate())
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ func (s *Server) validateAuth(ctx context.Context) error {
|
||||
func (s *Server) validateSegment(req *pb.PutRequest) error {
|
||||
min := s.config.MinRemoteSegmentSize
|
||||
remote := req.GetPointer().Remote
|
||||
remoteSize := req.GetPointer().GetSize()
|
||||
remoteSize := req.GetPointer().GetSegmentSize()
|
||||
|
||||
if remote != nil && remoteSize < int64(min) {
|
||||
return segmentError.New("remote segment size %d less than minimum allowed %d", remoteSize, min)
|
||||
@ -256,7 +256,7 @@ func (s *Server) setMetadata(item *pb.ListResponse_Item, data []byte, metaFlags
|
||||
item.Pointer.ExpirationDate = pr.GetExpirationDate()
|
||||
}
|
||||
if metaFlags&meta.Size != 0 {
|
||||
item.Pointer.Size = pr.GetSize()
|
||||
item.Pointer.SegmentSize = pr.GetSegmentSize()
|
||||
}
|
||||
if metaFlags&meta.UserDefined != 0 {
|
||||
item.Pointer.Metadata = pr.GetMetadata()
|
||||
|
@ -97,7 +97,7 @@ func TestServiceGet(t *testing.T) {
|
||||
|
||||
path := "a/b/c"
|
||||
|
||||
pr := &pb.Pointer{Size: 123}
|
||||
pr := &pb.Pointer{SegmentSize: 123}
|
||||
prBytes, err := proto.Marshal(pr)
|
||||
assert.NoError(t, err, errTag)
|
||||
|
||||
|
@ -107,7 +107,7 @@ func (s *segmentStore) Put(ctx context.Context, data io.Reader, expiration time.
|
||||
pointer = &pb.Pointer{
|
||||
Type: pb.Pointer_INLINE,
|
||||
InlineSegment: peekReader.thresholdBuf,
|
||||
Size: int64(len(peekReader.thresholdBuf)),
|
||||
SegmentSize: int64(len(peekReader.thresholdBuf)),
|
||||
ExpirationDate: exp,
|
||||
Metadata: metadata,
|
||||
}
|
||||
@ -181,7 +181,7 @@ func (s *segmentStore) makeRemotePointer(nodes []*pb.Node, pieceID psclient.Piec
|
||||
PieceId: string(pieceID),
|
||||
RemotePieces: remotePieces,
|
||||
},
|
||||
Size: readerSize,
|
||||
SegmentSize: readerSize,
|
||||
ExpirationDate: exp,
|
||||
Metadata: metadata,
|
||||
}
|
||||
@ -230,7 +230,7 @@ func (s *segmentStore) Get(ctx context.Context, path storj.Path) (rr ranger.Rang
|
||||
|
||||
authorization := s.pdb.SignedMessage()
|
||||
pba := s.pdb.PayerBandwidthAllocation()
|
||||
rr, err = s.ec.Get(ctx, nodes, es, pid, pr.GetSize(), pba, authorization)
|
||||
rr, err = s.ec.Get(ctx, nodes, es, pid, pr.GetSegmentSize(), pba, authorization)
|
||||
if err != nil {
|
||||
return nil, Meta{}, Error.Wrap(err)
|
||||
}
|
||||
@ -377,7 +377,7 @@ func (s *segmentStore) Repair(ctx context.Context, path storj.Path, lostPieces [
|
||||
pba := s.pdb.PayerBandwidthAllocation()
|
||||
|
||||
// download the segment using the nodes just with healthy nodes
|
||||
rr, err := s.ec.Get(ctx, healthyNodes, es, pid, pr.GetSize(), pba, signedMessage)
|
||||
rr, err := s.ec.Get(ctx, healthyNodes, es, pid, pr.GetSegmentSize(), pba, signedMessage)
|
||||
if err != nil {
|
||||
return Error.Wrap(err)
|
||||
}
|
||||
@ -472,7 +472,7 @@ func convertMeta(pr *pb.Pointer) Meta {
|
||||
return Meta{
|
||||
Modified: convertTime(pr.GetCreationDate()),
|
||||
Expiration: convertTime(pr.GetExpirationDate()),
|
||||
Size: pr.GetSize(),
|
||||
Size: pr.GetSegmentSize(),
|
||||
Data: pr.GetMetadata(),
|
||||
}
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ func TestSegmentStoreGetInline(t *testing.T) {
|
||||
InlineSegment: tt.inlineContent,
|
||||
CreationDate: someTime,
|
||||
ExpirationDate: someTime,
|
||||
Size: tt.size,
|
||||
SegmentSize: tt.size,
|
||||
Metadata: tt.metadata,
|
||||
}, nil, nil),
|
||||
}
|
||||
@ -279,7 +279,7 @@ func TestSegmentStoreRepairRemote(t *testing.T) {
|
||||
},
|
||||
CreationDate: someTime,
|
||||
ExpirationDate: someTime,
|
||||
Size: tt.size,
|
||||
SegmentSize: tt.size,
|
||||
Metadata: tt.metadata,
|
||||
}, nil, nil),
|
||||
mockOC.EXPECT().BulkLookup(gomock.Any(), gomock.Any()),
|
||||
@ -352,7 +352,7 @@ func TestSegmentStoreGetRemote(t *testing.T) {
|
||||
},
|
||||
CreationDate: someTime,
|
||||
ExpirationDate: someTime,
|
||||
Size: tt.size,
|
||||
SegmentSize: tt.size,
|
||||
Metadata: tt.metadata,
|
||||
}, nil, nil),
|
||||
mockOC.EXPECT().BulkLookup(gomock.Any(), gomock.Any()),
|
||||
@ -406,7 +406,7 @@ func TestSegmentStoreDeleteInline(t *testing.T) {
|
||||
InlineSegment: tt.inlineContent,
|
||||
CreationDate: someTime,
|
||||
ExpirationDate: someTime,
|
||||
Size: tt.size,
|
||||
SegmentSize: tt.size,
|
||||
Metadata: tt.metadata,
|
||||
}, nil, nil),
|
||||
mockPDB.EXPECT().Delete(
|
||||
@ -466,7 +466,7 @@ func TestSegmentStoreDeleteRemote(t *testing.T) {
|
||||
},
|
||||
CreationDate: someTime,
|
||||
ExpirationDate: someTime,
|
||||
Size: tt.size,
|
||||
SegmentSize: tt.size,
|
||||
Metadata: tt.metadata,
|
||||
}, nil, nil),
|
||||
mockOC.EXPECT().BulkLookup(gomock.Any(), gomock.Any()),
|
||||
@ -526,7 +526,7 @@ func TestSegmentStoreList(t *testing.T) {
|
||||
InlineSegment: tt.inlineContent,
|
||||
CreationDate: someTime,
|
||||
ExpirationDate: someTime,
|
||||
Size: int64(4),
|
||||
SegmentSize: int64(4),
|
||||
Metadata: tt.metadata,
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user