diff --git a/cmd/payments/main.go b/cmd/payments/main.go deleted file mode 100644 index a517a8d17..000000000 --- a/cmd/payments/main.go +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (C) 2019 Storj Labs, Inc. -// See LICENSE for copying information. - -package main - -import ( - "context" - "fmt" - "os" - "time" - - "github.com/golang/protobuf/ptypes" - "github.com/spf13/cobra" - "github.com/zeebo/errs" - - "storj.io/storj/pkg/pb" - "storj.io/storj/pkg/provider" - "storj.io/storj/pkg/transport" -) - -var ( - ctx = context.Background() - // ErrPaymentsDial throws when there are errors dialing the payments client - ErrPaymentsDial = errs.Class("error dialing payments client") - - // ErrRequest is for gRPC request errors after dialing - ErrRequest = errs.Class("error processing request") - - // ErrIdentity is for errors during identity creation for this CLI - ErrIdentity = errs.Class("error creating identity") - - // ErrArgs throws when there are errors with CLI args - ErrArgs = errs.Class("error with CLI args") - - port string - - rootCmd = &cobra.Command{Use: "payments"} - - cmdGenerate = &cobra.Command{ - Use: "generatecsv", - Short: "generates payment csv", - Args: cobra.MinimumNArgs(2), - RunE: generatecsv, - } -) - -// Payments gives access to the payments api -type Payments struct { - client pb.PaymentsClient -} - -func main() { - rootCmd.PersistentFlags().StringVarP(&port, "port", "p", ":10000", "satellite port") - rootCmd.AddCommand(cmdGenerate) - err := rootCmd.Execute() - if err != nil { - fmt.Println("Error", err) - os.Exit(1) - } -} - -// NewPayments creates a payments object -func NewPayments() (*Payments, error) { - identity, err := provider.NewFullIdentity(ctx, 12, 4) - if err != nil { - return &Payments{}, ErrIdentity.Wrap(err) - } - tc := transport.NewClient(identity) - - // TODO: this might be blocked after requiring authorization - // use satellite identity or later private grpc - fmt.Println("Warning: created new ID, may not be able to connect to satellite") - conn, err := tc.DialAddress(ctx, port) - if err != nil { - return &Payments{}, ErrPaymentsDial.Wrap(err) - } - - c := pb.NewPaymentsClient(conn) - return &Payments{client: c}, nil -} - -// generateCSV makes a call to the payments client to query the db and generate a csv -func generatecsv(cmd *cobra.Command, args []string) error { - fmt.Println("entering payments generatecsv") - layout := "2006-01-02" - start, err := time.Parse(layout, args[0]) - if err != nil { - return ErrArgs.Wrap(errs.New("Invalid date format. Please use YYYY-MM-DD")) - } - end, err := time.Parse(layout, args[1]) - if err != nil { - return ErrArgs.Wrap(errs.New("Invalid date format. Please use YYYY-MM-DD")) - } - - // Ensure that start date is not after end date - if start.After(end) { - return errs.New("Invalid time period (%v) - (%v)", start, end) - } - - startTimestamp, err := ptypes.TimestampProto(start) - if err != nil { - return err - } - endTimestamp, err := ptypes.TimestampProto(end) - if err != nil { - return err - } - p, err := NewPayments() - if err != nil { - return err - } - - req := &pb.GenerateCSVRequest{ - StartTime: startTimestamp, - EndTime: endTimestamp, - } - - resp, err := p.client.GenerateCSV(ctx, req) - if err != nil { - return ErrRequest.Wrap(err) - } - - fmt.Println("Created payments report at", resp.GetFilepath()) - return nil -} diff --git a/internal/testplanet/planet.go b/internal/testplanet/planet.go index c414a6211..2ab0d56e0 100644 --- a/internal/testplanet/planet.go +++ b/internal/testplanet/planet.go @@ -34,7 +34,6 @@ import ( "storj.io/storj/pkg/kademlia" "storj.io/storj/pkg/node" "storj.io/storj/pkg/overlay" - "storj.io/storj/pkg/payments" "storj.io/storj/pkg/pb" "storj.io/storj/pkg/peertls" "storj.io/storj/pkg/piecestore/psserver" @@ -289,9 +288,6 @@ func (planet *Planet) newSatellites(count int) ([]*satellite.Peer, error) { Rollup: rollup.Config{ Interval: 120 * time.Second, }, - Payments: payments.Config{ - Filepath: filepath.Join(storageDir, "reports"), - }, Console: consoleweb.Config{ Address: "127.0.0.1:0", }, diff --git a/pkg/payments/server.go b/pkg/payments/server.go deleted file mode 100644 index 9dd32375f..000000000 --- a/pkg/payments/server.go +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (C) 2019 Storj Labs, Inc. -// See LICENSE for copying information. - -package payments - -import ( - "context" - "encoding/csv" - "os" - "path/filepath" - "strconv" - - "github.com/golang/protobuf/ptypes" - "github.com/zeebo/errs" - "go.uber.org/zap" - monkit "gopkg.in/spacemonkeygo/monkit.v2" - - "storj.io/storj/pkg/accounting" - "storj.io/storj/pkg/overlay" - "storj.io/storj/pkg/pb" - "storj.io/storj/pkg/provider" - "storj.io/storj/pkg/utils" -) - -var ( - mon = monkit.Package() - // Error is the main payments error class for this package - Error = errs.Class("payments server error: ") -) - -// Config is a configuration struct for everything you need to start the Payments responsibility. -type Config struct { - Filepath string `help:"the file path of the generated csv" default:"$CONFDIR/payments"` - // TODO: service should not write to disk, but return the result instead -} - -// Server holds references to info needed for the payments responsibility -type Server struct { // TODO: separate endpoint and service - filepath string - accountingDB accounting.DB - overlayDB overlay.DB - log *zap.Logger -} - -// New creates a new payments Endpoint -func New(log *zap.Logger, accounting accounting.DB, overlay overlay.DB, filepath string) *Server { - return &Server{ - filepath: filepath, - accountingDB: accounting, - overlayDB: overlay, - log: log, - } -} - -// Pay creates a payment to a single storage node -func (srv *Server) Pay(ctx context.Context, req *pb.PaymentRequest) (*pb.PaymentResponse, error) { - // TODO - return &pb.PaymentResponse{}, Error.New("Pay not implemented") -} - -// Calculate determines the outstanding balance for a given storage node -func (srv *Server) Calculate(ctx context.Context, req *pb.CalculateRequest) (*pb.CalculateResponse, error) { - // TODO - return &pb.CalculateResponse{}, Error.New("Calculate not implemented") -} - -// AdjustPrices sets the prices paid by a satellite for data at rest and bandwidth -func (srv *Server) AdjustPrices(ctx context.Context, req *pb.AdjustPricesRequest) (*pb.AdjustPricesResponse, error) { - // TODO - return &pb.AdjustPricesResponse{}, Error.New("AdjustPrices not implemented") -} - -// GenerateCSV creates a csv file for payment purposes -func (srv *Server) GenerateCSV(ctx context.Context, req *pb.GenerateCSVRequest) (_ *pb.GenerateCSVResponse, err error) { - defer mon.Task()(&ctx)(&err) - - start, err := ptypes.Timestamp(req.StartTime) - if err != nil { - return nil, Error.Wrap(err) - } - - end, err := ptypes.Timestamp(req.EndTime) - if err != nil { - return nil, Error.Wrap(err) - } - - pi, err := provider.PeerIdentityFromContext(ctx) - if err != nil { - return nil, Error.Wrap(err) - } - - layout := "2006-01-02" - - if err := os.MkdirAll(srv.filepath, 0700); err != nil { - return nil, Error.Wrap(err) - } - - filename := pi.ID.String() + "--" + start.Format(layout) + "--" + end.Format(layout) + ".csv" - path := filepath.Join(srv.filepath, filename) - file, err := os.Create(path) - if err != nil { - return nil, Error.Wrap(err) - } - defer utils.LogClose(file) - - rows, err := srv.accountingDB.QueryPaymentInfo(ctx, start, end) - if err != nil { - return nil, Error.Wrap(err) - } - - w := csv.NewWriter(file) - headers := []string{ - "nodeID", - "nodeCreationDate", - "auditSuccessRatio", - "byte-hours:AtRest", - "bytes:BWRepair-GET", - "bytes:BWRepair-PUT", - "bytes:BWAudit", - "bytes:BWGet", - "bytes:BWPut", - "date", - "walletAddress", - } - if err := w.Write(headers); err != nil { - return nil, Error.Wrap(err) - } - - for _, row := range rows { - nid := row.NodeID - wallet, err := srv.overlayDB.GetWalletAddress(ctx, nid) - if err != nil { - return nil, Error.Wrap(err) - } - row.Wallet = wallet - record := structToStringSlice(row) - if err := w.Write(record); err != nil { - return nil, Error.Wrap(err) - } - } - if err := w.Error(); err != nil { - return nil, Error.Wrap(err) - } - w.Flush() - abs, err := filepath.Abs(path) - if err != nil { - return nil, err - } - return &pb.GenerateCSVResponse{Filepath: abs}, nil -} - -func structToStringSlice(s *accounting.CSVRow) []string { - record := []string{ - s.NodeID.String(), - s.NodeCreationDate.Format("2006-01-02"), - strconv.FormatFloat(s.AuditSuccessRatio, 'f', 5, 64), - strconv.FormatFloat(s.AtRestTotal, 'f', 5, 64), - strconv.FormatInt(s.GetRepairTotal, 10), - strconv.FormatInt(s.PutRepairTotal, 10), - strconv.FormatInt(s.GetAuditTotal, 10), - strconv.FormatInt(s.PutTotal, 10), - strconv.FormatInt(s.GetTotal, 10), - s.Date.Format("2006-01-02"), - s.Wallet, - } - return record -} diff --git a/pkg/pb/bandwidth.pb.go b/pkg/pb/bandwidth.pb.go index 54451a2d1..fa2172824 100644 --- a/pkg/pb/bandwidth.pb.go +++ b/pkg/pb/bandwidth.pb.go @@ -46,7 +46,7 @@ func (x AgreementsSummary_Status) String() string { return proto.EnumName(AgreementsSummary_Status_name, int32(x)) } func (AgreementsSummary_Status) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_bandwidth_1560d6d92a271e58, []int{0, 0} + return fileDescriptor_bandwidth_da05cbbeac812a9d, []int{0, 0} } type AgreementsSummary struct { @@ -60,7 +60,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_1560d6d92a271e58, []int{0} + return fileDescriptor_bandwidth_da05cbbeac812a9d, []int{0} } func (m *AgreementsSummary) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AgreementsSummary.Unmarshal(m, b) @@ -164,9 +164,9 @@ var _Bandwidth_serviceDesc = grpc.ServiceDesc{ Metadata: "bandwidth.proto", } -func init() { proto.RegisterFile("bandwidth.proto", fileDescriptor_bandwidth_1560d6d92a271e58) } +func init() { proto.RegisterFile("bandwidth.proto", fileDescriptor_bandwidth_da05cbbeac812a9d) } -var fileDescriptor_bandwidth_1560d6d92a271e58 = []byte{ +var fileDescriptor_bandwidth_da05cbbeac812a9d = []byte{ // 210 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, diff --git a/pkg/pb/certificate.pb.go b/pkg/pb/certificate.pb.go index 5344599c3..1c4b4528b 100644 --- a/pkg/pb/certificate.pb.go +++ b/pkg/pb/certificate.pb.go @@ -36,7 +36,7 @@ func (m *SigningRequest) Reset() { *m = SigningRequest{} } func (m *SigningRequest) String() string { return proto.CompactTextString(m) } func (*SigningRequest) ProtoMessage() {} func (*SigningRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_certificate_c55bd879e75eb964, []int{0} + return fileDescriptor_certificate_2545cbff56dfc715, []int{0} } func (m *SigningRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SigningRequest.Unmarshal(m, b) @@ -81,7 +81,7 @@ func (m *SigningResponse) Reset() { *m = SigningResponse{} } func (m *SigningResponse) String() string { return proto.CompactTextString(m) } func (*SigningResponse) ProtoMessage() {} func (*SigningResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_certificate_c55bd879e75eb964, []int{1} + return fileDescriptor_certificate_2545cbff56dfc715, []int{1} } func (m *SigningResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SigningResponse.Unmarshal(m, b) @@ -185,9 +185,9 @@ var _Certificates_serviceDesc = grpc.ServiceDesc{ Metadata: "certificate.proto", } -func init() { proto.RegisterFile("certificate.proto", fileDescriptor_certificate_c55bd879e75eb964) } +func init() { proto.RegisterFile("certificate.proto", fileDescriptor_certificate_2545cbff56dfc715) } -var fileDescriptor_certificate_c55bd879e75eb964 = []byte{ +var fileDescriptor_certificate_2545cbff56dfc715 = []byte{ // 192 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4c, 0x4e, 0x2d, 0x2a, 0xc9, 0x4c, 0xcb, 0x4c, 0x4e, 0x2c, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0xc9, diff --git a/pkg/pb/datarepair.pb.go b/pkg/pb/datarepair.pb.go index 475c3b865..95d27904c 100644 --- a/pkg/pb/datarepair.pb.go +++ b/pkg/pb/datarepair.pb.go @@ -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_45267f47333c8119, []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_45267f47333c8119) } -var fileDescriptor_datarepair_13e4beab54f194bd = []byte{ +var fileDescriptor_datarepair_45267f47333c8119 = []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, diff --git a/pkg/pb/inspector.pb.go b/pkg/pb/inspector.pb.go index da70a48a1..a59e785cd 100644 --- a/pkg/pb/inspector.pb.go +++ b/pkg/pb/inspector.pb.go @@ -36,7 +36,7 @@ func (m *GetStatsRequest) Reset() { *m = GetStatsRequest{} } func (m *GetStatsRequest) String() string { return proto.CompactTextString(m) } func (*GetStatsRequest) ProtoMessage() {} func (*GetStatsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_inspector_27853f276f81267a, []int{0} + return fileDescriptor_inspector_70ce24287dd78336, []int{0} } func (m *GetStatsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetStatsRequest.Unmarshal(m, b) @@ -70,7 +70,7 @@ func (m *GetStatsResponse) Reset() { *m = GetStatsResponse{} } func (m *GetStatsResponse) String() string { return proto.CompactTextString(m) } func (*GetStatsResponse) ProtoMessage() {} func (*GetStatsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_inspector_27853f276f81267a, []int{1} + return fileDescriptor_inspector_70ce24287dd78336, []int{1} } func (m *GetStatsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetStatsResponse.Unmarshal(m, b) @@ -134,7 +134,7 @@ func (m *CreateStatsRequest) Reset() { *m = CreateStatsRequest{} } func (m *CreateStatsRequest) String() string { return proto.CompactTextString(m) } func (*CreateStatsRequest) ProtoMessage() {} func (*CreateStatsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_inspector_27853f276f81267a, []int{2} + return fileDescriptor_inspector_70ce24287dd78336, []int{2} } func (m *CreateStatsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateStatsRequest.Unmarshal(m, b) @@ -192,7 +192,7 @@ func (m *CreateStatsResponse) Reset() { *m = CreateStatsResponse{} } func (m *CreateStatsResponse) String() string { return proto.CompactTextString(m) } func (*CreateStatsResponse) ProtoMessage() {} func (*CreateStatsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_inspector_27853f276f81267a, []int{3} + return fileDescriptor_inspector_70ce24287dd78336, []int{3} } func (m *CreateStatsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateStatsResponse.Unmarshal(m, b) @@ -224,7 +224,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_inspector_27853f276f81267a, []int{4} + return fileDescriptor_inspector_70ce24287dd78336, []int{4} } func (m *CountNodesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CountNodesResponse.Unmarshal(m, b) @@ -261,7 +261,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_inspector_27853f276f81267a, []int{5} + return fileDescriptor_inspector_70ce24287dd78336, []int{5} } func (m *CountNodesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CountNodesRequest.Unmarshal(m, b) @@ -292,7 +292,7 @@ func (m *GetBucketsRequest) Reset() { *m = GetBucketsRequest{} } func (m *GetBucketsRequest) String() string { return proto.CompactTextString(m) } func (*GetBucketsRequest) ProtoMessage() {} func (*GetBucketsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_inspector_27853f276f81267a, []int{6} + return fileDescriptor_inspector_70ce24287dd78336, []int{6} } func (m *GetBucketsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBucketsRequest.Unmarshal(m, b) @@ -324,7 +324,7 @@ func (m *GetBucketsResponse) Reset() { *m = GetBucketsResponse{} } func (m *GetBucketsResponse) String() string { return proto.CompactTextString(m) } func (*GetBucketsResponse) ProtoMessage() {} func (*GetBucketsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_inspector_27853f276f81267a, []int{7} + return fileDescriptor_inspector_70ce24287dd78336, []int{7} } func (m *GetBucketsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBucketsResponse.Unmarshal(m, b) @@ -363,7 +363,7 @@ func (m *GetBucketRequest) Reset() { *m = GetBucketRequest{} } func (m *GetBucketRequest) String() string { return proto.CompactTextString(m) } func (*GetBucketRequest) ProtoMessage() {} func (*GetBucketRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_inspector_27853f276f81267a, []int{8} + return fileDescriptor_inspector_70ce24287dd78336, []int{8} } func (m *GetBucketRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBucketRequest.Unmarshal(m, b) @@ -395,7 +395,7 @@ func (m *GetBucketResponse) Reset() { *m = GetBucketResponse{} } func (m *GetBucketResponse) String() string { return proto.CompactTextString(m) } func (*GetBucketResponse) ProtoMessage() {} func (*GetBucketResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_inspector_27853f276f81267a, []int{9} + return fileDescriptor_inspector_70ce24287dd78336, []int{9} } func (m *GetBucketResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBucketResponse.Unmarshal(m, b) @@ -433,7 +433,7 @@ func (m *Bucket) Reset() { *m = Bucket{} } func (m *Bucket) String() string { return proto.CompactTextString(m) } func (*Bucket) ProtoMessage() {} func (*Bucket) Descriptor() ([]byte, []int) { - return fileDescriptor_inspector_27853f276f81267a, []int{10} + return fileDescriptor_inspector_70ce24287dd78336, []int{10} } func (m *Bucket) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Bucket.Unmarshal(m, b) @@ -471,7 +471,7 @@ func (m *BucketList) Reset() { *m = BucketList{} } func (m *BucketList) String() string { return proto.CompactTextString(m) } func (*BucketList) ProtoMessage() {} func (*BucketList) Descriptor() ([]byte, []int) { - return fileDescriptor_inspector_27853f276f81267a, []int{11} + return fileDescriptor_inspector_70ce24287dd78336, []int{11} } func (m *BucketList) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BucketList.Unmarshal(m, b) @@ -511,7 +511,7 @@ func (m *PingNodeRequest) Reset() { *m = PingNodeRequest{} } func (m *PingNodeRequest) String() string { return proto.CompactTextString(m) } func (*PingNodeRequest) ProtoMessage() {} func (*PingNodeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_inspector_27853f276f81267a, []int{12} + return fileDescriptor_inspector_70ce24287dd78336, []int{12} } func (m *PingNodeRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PingNodeRequest.Unmarshal(m, b) @@ -549,7 +549,7 @@ func (m *PingNodeResponse) Reset() { *m = PingNodeResponse{} } func (m *PingNodeResponse) String() string { return proto.CompactTextString(m) } func (*PingNodeResponse) ProtoMessage() {} func (*PingNodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_inspector_27853f276f81267a, []int{13} + return fileDescriptor_inspector_70ce24287dd78336, []int{13} } func (m *PingNodeResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PingNodeResponse.Unmarshal(m, b) @@ -588,7 +588,7 @@ func (m *LookupNodeRequest) Reset() { *m = LookupNodeRequest{} } func (m *LookupNodeRequest) String() string { return proto.CompactTextString(m) } func (*LookupNodeRequest) ProtoMessage() {} func (*LookupNodeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_inspector_27853f276f81267a, []int{14} + return fileDescriptor_inspector_70ce24287dd78336, []int{14} } func (m *LookupNodeRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LookupNodeRequest.Unmarshal(m, b) @@ -634,7 +634,7 @@ func (m *LookupNodeResponse) Reset() { *m = LookupNodeResponse{} } func (m *LookupNodeResponse) String() string { return proto.CompactTextString(m) } func (*LookupNodeResponse) ProtoMessage() {} func (*LookupNodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_inspector_27853f276f81267a, []int{15} + return fileDescriptor_inspector_70ce24287dd78336, []int{15} } func (m *LookupNodeResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LookupNodeResponse.Unmarshal(m, b) @@ -1068,9 +1068,9 @@ var _StatDBInspector_serviceDesc = grpc.ServiceDesc{ Metadata: "inspector.proto", } -func init() { proto.RegisterFile("inspector.proto", fileDescriptor_inspector_27853f276f81267a) } +func init() { proto.RegisterFile("inspector.proto", fileDescriptor_inspector_70ce24287dd78336) } -var fileDescriptor_inspector_27853f276f81267a = []byte{ +var fileDescriptor_inspector_70ce24287dd78336 = []byte{ // 644 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcb, 0x6e, 0xd3, 0x40, 0x14, 0xc5, 0x4e, 0x9a, 0x26, 0x37, 0x51, 0x1e, 0x93, 0x22, 0x45, 0x4e, 0x68, 0xc2, 0x2c, 0x20, diff --git a/pkg/pb/meta.pb.go b/pkg/pb/meta.pb.go index 4c086271b..2bf21a1ad 100644 --- a/pkg/pb/meta.pb.go +++ b/pkg/pb/meta.pb.go @@ -31,7 +31,7 @@ func (m *SerializableMeta) Reset() { *m = SerializableMeta{} } func (m *SerializableMeta) String() string { return proto.CompactTextString(m) } func (*SerializableMeta) ProtoMessage() {} func (*SerializableMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_meta_12afffbb4ed1a0bb, []int{0} + return fileDescriptor_meta_d3a626c05679ee13, []int{0} } func (m *SerializableMeta) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SerializableMeta.Unmarshal(m, b) @@ -70,9 +70,9 @@ func init() { proto.RegisterMapType((map[string]string)(nil), "objects.SerializableMeta.UserDefinedEntry") } -func init() { proto.RegisterFile("meta.proto", fileDescriptor_meta_12afffbb4ed1a0bb) } +func init() { proto.RegisterFile("meta.proto", fileDescriptor_meta_d3a626c05679ee13) } -var fileDescriptor_meta_12afffbb4ed1a0bb = []byte{ +var fileDescriptor_meta_d3a626c05679ee13 = []byte{ // 191 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xca, 0x4d, 0x2d, 0x49, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0xcf, 0x4f, 0xca, 0x4a, 0x4d, 0x2e, 0x29, 0x56, diff --git a/pkg/pb/node.pb.go b/pkg/pb/node.pb.go index 9153a69f2..574fec7e7 100644 --- a/pkg/pb/node.pb.go +++ b/pkg/pb/node.pb.go @@ -49,7 +49,7 @@ func (x NodeType) String() string { return proto.EnumName(NodeType_name, int32(x)) } func (NodeType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_node_67af40c3abfaa4ce, []int{0} + return fileDescriptor_node_d0632cceb21d65c0, []int{0} } // NodeTransport is an enum of possible transports for the overlay network @@ -70,7 +70,7 @@ func (x NodeTransport) String() string { return proto.EnumName(NodeTransport_name, int32(x)) } func (NodeTransport) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_node_67af40c3abfaa4ce, []int{1} + return fileDescriptor_node_d0632cceb21d65c0, []int{1} } // NodeRestrictions contains all relevant data about a nodes ability to store data @@ -86,7 +86,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_node_67af40c3abfaa4ce, []int{0} + return fileDescriptor_node_d0632cceb21d65c0, []int{0} } func (m *NodeRestrictions) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeRestrictions.Unmarshal(m, b) @@ -145,7 +145,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_node_67af40c3abfaa4ce, []int{1} + return fileDescriptor_node_d0632cceb21d65c0, []int{1} } func (m *Node) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Node.Unmarshal(m, b) @@ -255,7 +255,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_node_67af40c3abfaa4ce, []int{2} + return fileDescriptor_node_d0632cceb21d65c0, []int{2} } func (m *NodeAddress) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeAddress.Unmarshal(m, b) @@ -308,7 +308,7 @@ func (m *NodeStats) Reset() { *m = NodeStats{} } func (m *NodeStats) String() string { return proto.CompactTextString(m) } func (*NodeStats) ProtoMessage() {} func (*NodeStats) Descriptor() ([]byte, []int) { - return fileDescriptor_node_67af40c3abfaa4ce, []int{3} + return fileDescriptor_node_d0632cceb21d65c0, []int{3} } func (m *NodeStats) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeStats.Unmarshal(m, b) @@ -389,7 +389,7 @@ func (m *NodeMetadata) Reset() { *m = NodeMetadata{} } func (m *NodeMetadata) String() string { return proto.CompactTextString(m) } func (*NodeMetadata) ProtoMessage() {} func (*NodeMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_node_67af40c3abfaa4ce, []int{4} + return fileDescriptor_node_d0632cceb21d65c0, []int{4} } func (m *NodeMetadata) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NodeMetadata.Unmarshal(m, b) @@ -433,9 +433,9 @@ func init() { proto.RegisterEnum("node.NodeTransport", NodeTransport_name, NodeTransport_value) } -func init() { proto.RegisterFile("node.proto", fileDescriptor_node_67af40c3abfaa4ce) } +func init() { proto.RegisterFile("node.proto", fileDescriptor_node_d0632cceb21d65c0) } -var fileDescriptor_node_67af40c3abfaa4ce = []byte{ +var fileDescriptor_node_d0632cceb21d65c0 = []byte{ // 652 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x94, 0xc1, 0x4e, 0xdb, 0x40, 0x10, 0x86, 0x49, 0x6c, 0x9c, 0x78, 0xec, 0xa4, 0x66, 0x40, 0xc8, 0x6a, 0xd5, 0x12, 0x82, 0xaa, diff --git a/pkg/pb/overlay.pb.go b/pkg/pb/overlay.pb.go index 0f527aac8..8013da40f 100644 --- a/pkg/pb/overlay.pb.go +++ b/pkg/pb/overlay.pb.go @@ -54,7 +54,7 @@ func (x Restriction_Operator) String() string { return proto.EnumName(Restriction_Operator_name, int32(x)) } func (Restriction_Operator) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_overlay_99a51b72c26b0776, []int{11, 0} + return fileDescriptor_overlay_490501b0d22ed92e, []int{11, 0} } type Restriction_Operand int32 @@ -77,7 +77,7 @@ func (x Restriction_Operand) String() string { return proto.EnumName(Restriction_Operand_name, int32(x)) } func (Restriction_Operand) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_overlay_99a51b72c26b0776, []int{11, 1} + return fileDescriptor_overlay_490501b0d22ed92e, []int{11, 1} } // LookupRequest is is request message for the lookup rpc call @@ -92,7 +92,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_99a51b72c26b0776, []int{0} + return fileDescriptor_overlay_490501b0d22ed92e, []int{0} } func (m *LookupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LookupRequest.Unmarshal(m, b) @@ -124,7 +124,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_99a51b72c26b0776, []int{1} + return fileDescriptor_overlay_490501b0d22ed92e, []int{1} } func (m *LookupResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LookupResponse.Unmarshal(m, b) @@ -163,7 +163,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_99a51b72c26b0776, []int{2} + return fileDescriptor_overlay_490501b0d22ed92e, []int{2} } func (m *LookupRequests) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LookupRequests.Unmarshal(m, b) @@ -202,7 +202,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_99a51b72c26b0776, []int{3} + return fileDescriptor_overlay_490501b0d22ed92e, []int{3} } func (m *LookupResponses) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LookupResponses.Unmarshal(m, b) @@ -241,7 +241,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_99a51b72c26b0776, []int{4} + return fileDescriptor_overlay_490501b0d22ed92e, []int{4} } func (m *FindStorageNodesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FindStorageNodesResponse.Unmarshal(m, b) @@ -284,7 +284,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_99a51b72c26b0776, []int{5} + return fileDescriptor_overlay_490501b0d22ed92e, []int{5} } func (m *FindStorageNodesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FindStorageNodesRequest.Unmarshal(m, b) @@ -349,7 +349,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_99a51b72c26b0776, []int{6} + return fileDescriptor_overlay_490501b0d22ed92e, []int{6} } func (m *OverlayOptions) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OverlayOptions.Unmarshal(m, b) @@ -418,7 +418,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_99a51b72c26b0776, []int{7} + return fileDescriptor_overlay_490501b0d22ed92e, []int{7} } func (m *QueryRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QueryRequest.Unmarshal(m, b) @@ -478,7 +478,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_99a51b72c26b0776, []int{8} + return fileDescriptor_overlay_490501b0d22ed92e, []int{8} } func (m *QueryResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QueryResponse.Unmarshal(m, b) @@ -522,7 +522,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_99a51b72c26b0776, []int{9} + return fileDescriptor_overlay_490501b0d22ed92e, []int{9} } func (m *PingRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PingRequest.Unmarshal(m, b) @@ -552,7 +552,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_99a51b72c26b0776, []int{10} + return fileDescriptor_overlay_490501b0d22ed92e, []int{10} } func (m *PingResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PingResponse.Unmarshal(m, b) @@ -585,7 +585,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_99a51b72c26b0776, []int{11} + return fileDescriptor_overlay_490501b0d22ed92e, []int{11} } func (m *Restriction) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Restriction.Unmarshal(m, b) @@ -884,9 +884,9 @@ var _Nodes_serviceDesc = grpc.ServiceDesc{ Metadata: "overlay.proto", } -func init() { proto.RegisterFile("overlay.proto", fileDescriptor_overlay_99a51b72c26b0776) } +func init() { proto.RegisterFile("overlay.proto", fileDescriptor_overlay_490501b0d22ed92e) } -var fileDescriptor_overlay_99a51b72c26b0776 = []byte{ +var fileDescriptor_overlay_490501b0d22ed92e = []byte{ // 845 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xdd, 0x8e, 0xdb, 0x44, 0x14, 0x5e, 0xe7, 0xc7, 0xc9, 0x9e, 0x24, 0x5e, 0x6b, 0xd4, 0xee, 0x06, 0x03, 0xdd, 0x60, 0x55, diff --git a/pkg/pb/payments.pb.go b/pkg/pb/payments.pb.go deleted file mode 100644 index 04ef71e3f..000000000 --- a/pkg/pb/payments.pb.go +++ /dev/null @@ -1,571 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: payments.proto - -package pb - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import timestamp "github.com/golang/protobuf/ptypes/timestamp" - -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -// The request message containing the details needed to pay a storage node. -type PaymentRequest struct { - // ID of the storage node to be paid - NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PaymentRequest) Reset() { *m = PaymentRequest{} } -func (m *PaymentRequest) String() string { return proto.CompactTextString(m) } -func (*PaymentRequest) ProtoMessage() {} -func (*PaymentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_payments_f4730bcfc665723c, []int{0} -} -func (m *PaymentRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PaymentRequest.Unmarshal(m, b) -} -func (m *PaymentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PaymentRequest.Marshal(b, m, deterministic) -} -func (dst *PaymentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PaymentRequest.Merge(dst, src) -} -func (m *PaymentRequest) XXX_Size() int { - return xxx_messageInfo_PaymentRequest.Size(m) -} -func (m *PaymentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PaymentRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_PaymentRequest proto.InternalMessageInfo - -func (m *PaymentRequest) GetNodeId() string { - if m != nil { - return m.NodeId - } - return "" -} - -// The response message for payments. -type PaymentResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PaymentResponse) Reset() { *m = PaymentResponse{} } -func (m *PaymentResponse) String() string { return proto.CompactTextString(m) } -func (*PaymentResponse) ProtoMessage() {} -func (*PaymentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_payments_f4730bcfc665723c, []int{1} -} -func (m *PaymentResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PaymentResponse.Unmarshal(m, b) -} -func (m *PaymentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PaymentResponse.Marshal(b, m, deterministic) -} -func (dst *PaymentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PaymentResponse.Merge(dst, src) -} -func (m *PaymentResponse) XXX_Size() int { - return xxx_messageInfo_PaymentResponse.Size(m) -} -func (m *PaymentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PaymentResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PaymentResponse proto.InternalMessageInfo - -// The request message containing the details needed to calculate outstanding balance for a storage node. -type CalculateRequest struct { - // ID of the storage node to be calculated - NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CalculateRequest) Reset() { *m = CalculateRequest{} } -func (m *CalculateRequest) String() string { return proto.CompactTextString(m) } -func (*CalculateRequest) ProtoMessage() {} -func (*CalculateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_payments_f4730bcfc665723c, []int{2} -} -func (m *CalculateRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CalculateRequest.Unmarshal(m, b) -} -func (m *CalculateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CalculateRequest.Marshal(b, m, deterministic) -} -func (dst *CalculateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CalculateRequest.Merge(dst, src) -} -func (m *CalculateRequest) XXX_Size() int { - return xxx_messageInfo_CalculateRequest.Size(m) -} -func (m *CalculateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CalculateRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CalculateRequest proto.InternalMessageInfo - -func (m *CalculateRequest) GetNodeId() string { - if m != nil { - return m.NodeId - } - return "" -} - -// The response message for payment calculations. -type CalculateResponse struct { - // ID of the storage node calculation made for - NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - // total balance in Storj of outstanding credit - Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CalculateResponse) Reset() { *m = CalculateResponse{} } -func (m *CalculateResponse) String() string { return proto.CompactTextString(m) } -func (*CalculateResponse) ProtoMessage() {} -func (*CalculateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_payments_f4730bcfc665723c, []int{3} -} -func (m *CalculateResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CalculateResponse.Unmarshal(m, b) -} -func (m *CalculateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CalculateResponse.Marshal(b, m, deterministic) -} -func (dst *CalculateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CalculateResponse.Merge(dst, src) -} -func (m *CalculateResponse) XXX_Size() int { - return xxx_messageInfo_CalculateResponse.Size(m) -} -func (m *CalculateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CalculateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CalculateResponse proto.InternalMessageInfo - -func (m *CalculateResponse) GetNodeId() string { - if m != nil { - return m.NodeId - } - return "" -} - -func (m *CalculateResponse) GetTotal() int64 { - if m != nil { - return m.Total - } - return 0 -} - -// The request message for adjusting the cost of storage/bandwidth for a satelitte. -type AdjustPricesRequest struct { - // price per gigabyte of bandwidth calculated in Storj - Bandwidth int64 `protobuf:"varint,1,opt,name=bandwidth,proto3" json:"bandwidth,omitempty"` - // price for GB/H of storage calculated in Storj - Storage int64 `protobuf:"varint,2,opt,name=storage,proto3" json:"storage,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AdjustPricesRequest) Reset() { *m = AdjustPricesRequest{} } -func (m *AdjustPricesRequest) String() string { return proto.CompactTextString(m) } -func (*AdjustPricesRequest) ProtoMessage() {} -func (*AdjustPricesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_payments_f4730bcfc665723c, []int{4} -} -func (m *AdjustPricesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AdjustPricesRequest.Unmarshal(m, b) -} -func (m *AdjustPricesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AdjustPricesRequest.Marshal(b, m, deterministic) -} -func (dst *AdjustPricesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AdjustPricesRequest.Merge(dst, src) -} -func (m *AdjustPricesRequest) XXX_Size() int { - return xxx_messageInfo_AdjustPricesRequest.Size(m) -} -func (m *AdjustPricesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AdjustPricesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AdjustPricesRequest proto.InternalMessageInfo - -func (m *AdjustPricesRequest) GetBandwidth() int64 { - if m != nil { - return m.Bandwidth - } - return 0 -} - -func (m *AdjustPricesRequest) GetStorage() int64 { - if m != nil { - return m.Storage - } - return 0 -} - -// The response message from adjusting cost basis on satelittes. -type AdjustPricesResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AdjustPricesResponse) Reset() { *m = AdjustPricesResponse{} } -func (m *AdjustPricesResponse) String() string { return proto.CompactTextString(m) } -func (*AdjustPricesResponse) ProtoMessage() {} -func (*AdjustPricesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_payments_f4730bcfc665723c, []int{5} -} -func (m *AdjustPricesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AdjustPricesResponse.Unmarshal(m, b) -} -func (m *AdjustPricesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AdjustPricesResponse.Marshal(b, m, deterministic) -} -func (dst *AdjustPricesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AdjustPricesResponse.Merge(dst, src) -} -func (m *AdjustPricesResponse) XXX_Size() int { - return xxx_messageInfo_AdjustPricesResponse.Size(m) -} -func (m *AdjustPricesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AdjustPricesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AdjustPricesResponse proto.InternalMessageInfo - -// The request message for querying the data needed to generate a payments CSV -type GenerateCSVRequest struct { - StartTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime" json:"start_time,omitempty"` - EndTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime" json:"end_time,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GenerateCSVRequest) Reset() { *m = GenerateCSVRequest{} } -func (m *GenerateCSVRequest) String() string { return proto.CompactTextString(m) } -func (*GenerateCSVRequest) ProtoMessage() {} -func (*GenerateCSVRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_payments_f4730bcfc665723c, []int{6} -} -func (m *GenerateCSVRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GenerateCSVRequest.Unmarshal(m, b) -} -func (m *GenerateCSVRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GenerateCSVRequest.Marshal(b, m, deterministic) -} -func (dst *GenerateCSVRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenerateCSVRequest.Merge(dst, src) -} -func (m *GenerateCSVRequest) XXX_Size() int { - return xxx_messageInfo_GenerateCSVRequest.Size(m) -} -func (m *GenerateCSVRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GenerateCSVRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GenerateCSVRequest proto.InternalMessageInfo - -func (m *GenerateCSVRequest) GetStartTime() *timestamp.Timestamp { - if m != nil { - return m.StartTime - } - return nil -} - -func (m *GenerateCSVRequest) GetEndTime() *timestamp.Timestamp { - if m != nil { - return m.EndTime - } - return nil -} - -// The response message for querying the data needed to generate a payments CSV -type GenerateCSVResponse struct { - Filepath string `protobuf:"bytes,1,opt,name=filepath,proto3" json:"filepath,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GenerateCSVResponse) Reset() { *m = GenerateCSVResponse{} } -func (m *GenerateCSVResponse) String() string { return proto.CompactTextString(m) } -func (*GenerateCSVResponse) ProtoMessage() {} -func (*GenerateCSVResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_payments_f4730bcfc665723c, []int{7} -} -func (m *GenerateCSVResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GenerateCSVResponse.Unmarshal(m, b) -} -func (m *GenerateCSVResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GenerateCSVResponse.Marshal(b, m, deterministic) -} -func (dst *GenerateCSVResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenerateCSVResponse.Merge(dst, src) -} -func (m *GenerateCSVResponse) XXX_Size() int { - return xxx_messageInfo_GenerateCSVResponse.Size(m) -} -func (m *GenerateCSVResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GenerateCSVResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GenerateCSVResponse proto.InternalMessageInfo - -func (m *GenerateCSVResponse) GetFilepath() string { - if m != nil { - return m.Filepath - } - return "" -} - -func init() { - proto.RegisterType((*PaymentRequest)(nil), "PaymentRequest") - proto.RegisterType((*PaymentResponse)(nil), "PaymentResponse") - proto.RegisterType((*CalculateRequest)(nil), "CalculateRequest") - proto.RegisterType((*CalculateResponse)(nil), "CalculateResponse") - proto.RegisterType((*AdjustPricesRequest)(nil), "AdjustPricesRequest") - proto.RegisterType((*AdjustPricesResponse)(nil), "AdjustPricesResponse") - proto.RegisterType((*GenerateCSVRequest)(nil), "GenerateCSVRequest") - proto.RegisterType((*GenerateCSVResponse)(nil), "GenerateCSVResponse") -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// PaymentsClient is the client API for Payments service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type PaymentsClient interface { - // Pay creates a payment to a single storage node - Pay(ctx context.Context, in *PaymentRequest, opts ...grpc.CallOption) (*PaymentResponse, error) - // Calculate determines the outstanding balance for a given storage node - Calculate(ctx context.Context, in *CalculateRequest, opts ...grpc.CallOption) (*CalculateResponse, error) - // AdjustPrices sets the prices paid by a satellite for data at rest and bandwidth - AdjustPrices(ctx context.Context, in *AdjustPricesRequest, opts ...grpc.CallOption) (*AdjustPricesResponse, error) - // GenerateCSV creates a csv file for payment purposes - GenerateCSV(ctx context.Context, in *GenerateCSVRequest, opts ...grpc.CallOption) (*GenerateCSVResponse, error) -} - -type paymentsClient struct { - cc *grpc.ClientConn -} - -func NewPaymentsClient(cc *grpc.ClientConn) PaymentsClient { - return &paymentsClient{cc} -} - -func (c *paymentsClient) Pay(ctx context.Context, in *PaymentRequest, opts ...grpc.CallOption) (*PaymentResponse, error) { - out := new(PaymentResponse) - err := c.cc.Invoke(ctx, "/Payments/Pay", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *paymentsClient) Calculate(ctx context.Context, in *CalculateRequest, opts ...grpc.CallOption) (*CalculateResponse, error) { - out := new(CalculateResponse) - err := c.cc.Invoke(ctx, "/Payments/Calculate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *paymentsClient) AdjustPrices(ctx context.Context, in *AdjustPricesRequest, opts ...grpc.CallOption) (*AdjustPricesResponse, error) { - out := new(AdjustPricesResponse) - err := c.cc.Invoke(ctx, "/Payments/AdjustPrices", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *paymentsClient) GenerateCSV(ctx context.Context, in *GenerateCSVRequest, opts ...grpc.CallOption) (*GenerateCSVResponse, error) { - out := new(GenerateCSVResponse) - err := c.cc.Invoke(ctx, "/Payments/GenerateCSV", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// PaymentsServer is the server API for Payments service. -type PaymentsServer interface { - // Pay creates a payment to a single storage node - Pay(context.Context, *PaymentRequest) (*PaymentResponse, error) - // Calculate determines the outstanding balance for a given storage node - Calculate(context.Context, *CalculateRequest) (*CalculateResponse, error) - // AdjustPrices sets the prices paid by a satellite for data at rest and bandwidth - AdjustPrices(context.Context, *AdjustPricesRequest) (*AdjustPricesResponse, error) - // GenerateCSV creates a csv file for payment purposes - GenerateCSV(context.Context, *GenerateCSVRequest) (*GenerateCSVResponse, error) -} - -func RegisterPaymentsServer(s *grpc.Server, srv PaymentsServer) { - s.RegisterService(&_Payments_serviceDesc, srv) -} - -func _Payments_Pay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PaymentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PaymentsServer).Pay(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Payments/Pay", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PaymentsServer).Pay(ctx, req.(*PaymentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payments_Calculate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CalculateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PaymentsServer).Calculate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Payments/Calculate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PaymentsServer).Calculate(ctx, req.(*CalculateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payments_AdjustPrices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AdjustPricesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PaymentsServer).AdjustPrices(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Payments/AdjustPrices", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PaymentsServer).AdjustPrices(ctx, req.(*AdjustPricesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payments_GenerateCSV_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GenerateCSVRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PaymentsServer).GenerateCSV(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Payments/GenerateCSV", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PaymentsServer).GenerateCSV(ctx, req.(*GenerateCSVRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Payments_serviceDesc = grpc.ServiceDesc{ - ServiceName: "Payments", - HandlerType: (*PaymentsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Pay", - Handler: _Payments_Pay_Handler, - }, - { - MethodName: "Calculate", - Handler: _Payments_Calculate_Handler, - }, - { - MethodName: "AdjustPrices", - Handler: _Payments_AdjustPrices_Handler, - }, - { - MethodName: "GenerateCSV", - Handler: _Payments_GenerateCSV_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "payments.proto", -} - -func init() { proto.RegisterFile("payments.proto", fileDescriptor_payments_f4730bcfc665723c) } - -var fileDescriptor_payments_f4730bcfc665723c = []byte{ - // 376 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xcd, 0x4a, 0xfb, 0x40, - 0x14, 0xc5, 0x49, 0xfb, 0xff, 0xb7, 0xcd, 0xad, 0xf4, 0x63, 0x1a, 0xb5, 0x04, 0xc1, 0x92, 0x55, - 0x45, 0x98, 0x62, 0x45, 0x50, 0x5c, 0xd9, 0x2e, 0xc4, 0x85, 0x50, 0xa2, 0xb8, 0x70, 0x53, 0x26, - 0x9d, 0xdb, 0x1a, 0x49, 0x33, 0x31, 0x33, 0x41, 0xfa, 0x02, 0xbe, 0xa6, 0xaf, 0x22, 0xf9, 0xaa, - 0xfd, 0x92, 0x2e, 0xcf, 0x70, 0xee, 0xbd, 0x73, 0x7e, 0x07, 0x6a, 0x01, 0x5b, 0xcc, 0xd1, 0x57, - 0x92, 0x06, 0xa1, 0x50, 0xc2, 0x3c, 0x9d, 0x09, 0x31, 0xf3, 0xb0, 0x97, 0x28, 0x27, 0x9a, 0xf6, - 0x94, 0x3b, 0x47, 0xa9, 0xd8, 0x3c, 0x48, 0x0d, 0xd6, 0x19, 0xd4, 0x46, 0xe9, 0x88, 0x8d, 0x1f, - 0x11, 0x4a, 0x45, 0x8e, 0xa1, 0xec, 0x0b, 0x8e, 0x63, 0x97, 0xb7, 0xb5, 0x8e, 0xd6, 0xd5, 0xed, - 0x52, 0x2c, 0x1f, 0xb8, 0xd5, 0x84, 0xfa, 0xd2, 0x2a, 0x03, 0xe1, 0x4b, 0xb4, 0xce, 0xa1, 0x31, - 0x64, 0xde, 0x24, 0xf2, 0x98, 0xc2, 0xbd, 0xf3, 0x03, 0x68, 0xae, 0x98, 0xd3, 0x0d, 0x7f, 0xba, - 0x89, 0x01, 0xff, 0x95, 0x50, 0xcc, 0x6b, 0x17, 0x3a, 0x5a, 0xb7, 0x68, 0xa7, 0xc2, 0x7a, 0x84, - 0xd6, 0x1d, 0x7f, 0x8f, 0xa4, 0x1a, 0x85, 0xee, 0x04, 0x65, 0x7e, 0xf3, 0x04, 0x74, 0x87, 0xf9, - 0xfc, 0xd3, 0xe5, 0xea, 0x2d, 0xd9, 0x53, 0xb4, 0x7f, 0x1f, 0x48, 0x1b, 0xca, 0x52, 0x89, 0x90, - 0xcd, 0x30, 0x5b, 0x96, 0x4b, 0xeb, 0x08, 0x8c, 0xf5, 0x75, 0x59, 0xae, 0x2f, 0x0d, 0xc8, 0x3d, - 0xfa, 0x18, 0x32, 0x85, 0xc3, 0xa7, 0x97, 0xfc, 0xcc, 0x0d, 0x80, 0x54, 0x2c, 0x54, 0xe3, 0x98, - 0x62, 0x72, 0xa7, 0xda, 0x37, 0x69, 0x8a, 0x98, 0xe6, 0x88, 0xe9, 0x73, 0x8e, 0xd8, 0xd6, 0x13, - 0x77, 0xac, 0xc9, 0x15, 0x54, 0xd0, 0xe7, 0xe9, 0x60, 0x61, 0xef, 0x60, 0x19, 0x7d, 0x1e, 0x2b, - 0xeb, 0x02, 0x5a, 0x6b, 0xff, 0xc8, 0xa8, 0x99, 0x50, 0x99, 0xba, 0x1e, 0x06, 0x2c, 0x8b, 0xab, - 0xdb, 0x4b, 0xdd, 0xff, 0xd6, 0xa0, 0x92, 0xf5, 0x24, 0x49, 0x17, 0x8a, 0x23, 0xb6, 0x20, 0x75, - 0xba, 0x5e, 0xb2, 0xd9, 0xa0, 0x1b, 0x55, 0x92, 0x3e, 0xe8, 0xcb, 0x76, 0x48, 0x93, 0x6e, 0xd6, - 0x6a, 0x12, 0xba, 0x5d, 0xde, 0x2d, 0x1c, 0xac, 0xe2, 0x23, 0x06, 0xdd, 0x51, 0x8e, 0x79, 0x48, - 0x77, 0x31, 0x26, 0xd7, 0x50, 0x5d, 0x89, 0x46, 0x5a, 0x74, 0x1b, 0xb8, 0x69, 0xd0, 0x1d, 0xe9, - 0x07, 0xff, 0x5e, 0x0b, 0x81, 0xe3, 0x94, 0x12, 0x6e, 0x97, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x52, 0x02, 0x1c, 0x61, 0xf3, 0x02, 0x00, 0x00, -} diff --git a/pkg/pb/payments.proto b/pkg/pb/payments.proto deleted file mode 100644 index 8ef87fcdf..000000000 --- a/pkg/pb/payments.proto +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (C) 2019 Storj Labs, Inc. -// See LICENSE for copying information. - -syntax = "proto3"; -option go_package = "pb"; -import "google/protobuf/timestamp.proto"; - -// The service definition for the Payments API -service Payments { - // Pay creates a payment to a single storage node - rpc Pay(PaymentRequest) returns (PaymentResponse); - // Calculate determines the outstanding balance for a given storage node - rpc Calculate(CalculateRequest) returns (CalculateResponse); - // AdjustPrices sets the prices paid by a satellite for data at rest and bandwidth - rpc AdjustPrices(AdjustPricesRequest) returns (AdjustPricesResponse); - // GenerateCSV creates a csv file for payment purposes - rpc GenerateCSV(GenerateCSVRequest) returns (GenerateCSVResponse); -} - -// The request message containing the details needed to pay a storage node. -message PaymentRequest { - // ID of the storage node to be paid - string node_id = 1; -} -// The response message for payments. -message PaymentResponse {} - -// The request message containing the details needed to calculate outstanding balance for a storage node. -message CalculateRequest { - // ID of the storage node to be calculated - string node_id = 1; -} - -// The response message for payment calculations. -message CalculateResponse { - // ID of the storage node calculation made for - string node_id = 1; - // total balance in Storj of outstanding credit - int64 total = 2; -} - -// The request message for adjusting the cost of storage/bandwidth for a satelitte. -message AdjustPricesRequest { - // price per gigabyte of bandwidth calculated in Storj - int64 bandwidth = 1; - // price for GB/H of storage calculated in Storj - int64 storage = 2; -} - -// The response message from adjusting cost basis on satelittes. -message AdjustPricesResponse {} - -// The request message for querying the data needed to generate a payments CSV -message GenerateCSVRequest { - google.protobuf.Timestamp start_time = 1; - google.protobuf.Timestamp end_time = 2; -} - - // The response message for querying the data needed to generate a payments CSV -message GenerateCSVResponse { - string filepath = 1; -} diff --git a/pkg/pb/piecestore.pb.go b/pkg/pb/piecestore.pb.go index 87f0aebc2..637b03dfc 100644 --- a/pkg/pb/piecestore.pb.go +++ b/pkg/pb/piecestore.pb.go @@ -54,7 +54,7 @@ func (x PayerBandwidthAllocation_Action) String() string { return proto.EnumName(PayerBandwidthAllocation_Action_name, int32(x)) } func (PayerBandwidthAllocation_Action) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_piecestore_664948018be76fe5, []int{0, 0} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{0, 0} } type PayerBandwidthAllocation struct { @@ -69,7 +69,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_664948018be76fe5, []int{0} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{0} } func (m *PayerBandwidthAllocation) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PayerBandwidthAllocation.Unmarshal(m, b) @@ -121,7 +121,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_664948018be76fe5, []int{0, 0} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{0, 0} } func (m *PayerBandwidthAllocation_Data) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PayerBandwidthAllocation_Data.Unmarshal(m, b) @@ -195,7 +195,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_664948018be76fe5, []int{1} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{1} } func (m *RenterBandwidthAllocation) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RenterBandwidthAllocation.Unmarshal(m, b) @@ -242,7 +242,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_664948018be76fe5, []int{1, 0} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{1, 0} } func (m *RenterBandwidthAllocation_Data) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RenterBandwidthAllocation_Data.Unmarshal(m, b) @@ -289,7 +289,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_664948018be76fe5, []int{2} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{2} } func (m *PieceStore) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PieceStore.Unmarshal(m, b) @@ -344,7 +344,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_664948018be76fe5, []int{2, 0} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{2, 0} } func (m *PieceStore_PieceData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PieceStore_PieceData.Unmarshal(m, b) @@ -398,7 +398,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_664948018be76fe5, []int{3} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{3} } func (m *PieceId) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PieceId.Unmarshal(m, b) @@ -445,7 +445,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_664948018be76fe5, []int{4} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{4} } func (m *PieceSummary) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PieceSummary.Unmarshal(m, b) @@ -499,7 +499,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_664948018be76fe5, []int{5} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{5} } func (m *PieceRetrieval) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PieceRetrieval.Unmarshal(m, b) @@ -554,7 +554,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_664948018be76fe5, []int{5, 0} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{5, 0} } func (m *PieceRetrieval_PieceData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PieceRetrieval_PieceData.Unmarshal(m, b) @@ -607,7 +607,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_664948018be76fe5, []int{6} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{6} } func (m *PieceRetrievalStream) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PieceRetrievalStream.Unmarshal(m, b) @@ -654,7 +654,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_664948018be76fe5, []int{7} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{7} } func (m *PieceDelete) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PieceDelete.Unmarshal(m, b) @@ -699,7 +699,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_664948018be76fe5, []int{8} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{8} } func (m *PieceDeleteSummary) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PieceDeleteSummary.Unmarshal(m, b) @@ -738,7 +738,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_664948018be76fe5, []int{9} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{9} } func (m *PieceStoreSummary) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PieceStoreSummary.Unmarshal(m, b) @@ -782,7 +782,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_664948018be76fe5, []int{10} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{10} } func (m *StatsReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StatsReq.Unmarshal(m, b) @@ -816,7 +816,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_664948018be76fe5, []int{11} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{11} } func (m *StatSummary) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StatSummary.Unmarshal(m, b) @@ -877,7 +877,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_664948018be76fe5, []int{12} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{12} } func (m *SignedMessage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignedMessage.Unmarshal(m, b) @@ -928,7 +928,7 @@ func (m *DashboardReq) Reset() { *m = DashboardReq{} } func (m *DashboardReq) String() string { return proto.CompactTextString(m) } func (*DashboardReq) ProtoMessage() {} func (*DashboardReq) Descriptor() ([]byte, []int) { - return fileDescriptor_piecestore_664948018be76fe5, []int{13} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{13} } func (m *DashboardReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DashboardReq.Unmarshal(m, b) @@ -964,7 +964,7 @@ func (m *DashboardStats) Reset() { *m = DashboardStats{} } func (m *DashboardStats) String() string { return proto.CompactTextString(m) } func (*DashboardStats) ProtoMessage() {} func (*DashboardStats) Descriptor() ([]byte, []int) { - return fileDescriptor_piecestore_664948018be76fe5, []int{14} + return fileDescriptor_piecestore_4b57efffb1b6b03f, []int{14} } func (m *DashboardStats) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DashboardStats.Unmarshal(m, b) @@ -1380,9 +1380,9 @@ var _PieceStoreRoutes_serviceDesc = grpc.ServiceDesc{ Metadata: "piecestore.proto", } -func init() { proto.RegisterFile("piecestore.proto", fileDescriptor_piecestore_664948018be76fe5) } +func init() { proto.RegisterFile("piecestore.proto", fileDescriptor_piecestore_4b57efffb1b6b03f) } -var fileDescriptor_piecestore_664948018be76fe5 = []byte{ +var fileDescriptor_piecestore_4b57efffb1b6b03f = []byte{ // 1130 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4b, 0x6f, 0xdb, 0xc6, 0x13, 0x17, 0x29, 0x5b, 0x8f, 0x91, 0x25, 0x2b, 0x9b, 0xe0, 0xff, 0x97, 0x85, 0xd8, 0x16, 0x98, diff --git a/pkg/pb/pointerdb.pb.go b/pkg/pb/pointerdb.pb.go index 10ef7c077..90661f165 100644 --- a/pkg/pb/pointerdb.pb.go +++ b/pkg/pb/pointerdb.pb.go @@ -42,7 +42,7 @@ func (x RedundancyScheme_SchemeType) String() string { return proto.EnumName(RedundancyScheme_SchemeType_name, int32(x)) } func (RedundancyScheme_SchemeType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_pointerdb_3f3e047a48f87feb, []int{0, 0} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{0, 0} } type Pointer_DataType int32 @@ -65,7 +65,7 @@ func (x Pointer_DataType) String() string { return proto.EnumName(Pointer_DataType_name, int32(x)) } func (Pointer_DataType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_pointerdb_3f3e047a48f87feb, []int{3, 0} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{3, 0} } type RedundancyScheme struct { @@ -85,7 +85,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_3f3e047a48f87feb, []int{0} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{0} } func (m *RedundancyScheme) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RedundancyScheme.Unmarshal(m, b) @@ -159,7 +159,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_3f3e047a48f87feb, []int{1} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{1} } func (m *RemotePiece) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemotePiece.Unmarshal(m, b) @@ -201,7 +201,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_3f3e047a48f87feb, []int{2} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{2} } func (m *RemoteSegment) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoteSegment.Unmarshal(m, b) @@ -266,7 +266,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_3f3e047a48f87feb, []int{3} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{3} } func (m *Pointer) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Pointer.Unmarshal(m, b) @@ -348,7 +348,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_3f3e047a48f87feb, []int{4} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{4} } func (m *PutRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PutRequest.Unmarshal(m, b) @@ -394,7 +394,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_3f3e047a48f87feb, []int{5} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{5} } func (m *GetRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetRequest.Unmarshal(m, b) @@ -438,7 +438,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_3f3e047a48f87feb, []int{6} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{6} } func (m *ListRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListRequest.Unmarshal(m, b) @@ -511,7 +511,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_3f3e047a48f87feb, []int{7} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{7} } func (m *PutResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PutResponse.Unmarshal(m, b) @@ -546,7 +546,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_3f3e047a48f87feb, []int{8} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{8} } func (m *GetResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetResponse.Unmarshal(m, b) @@ -607,7 +607,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_3f3e047a48f87feb, []int{9} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{9} } func (m *ListResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListResponse.Unmarshal(m, b) @@ -654,7 +654,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_3f3e047a48f87feb, []int{9, 0} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{9, 0} } func (m *ListResponse_Item) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListResponse_Item.Unmarshal(m, b) @@ -706,7 +706,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_3f3e047a48f87feb, []int{10} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{10} } func (m *DeleteRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteRequest.Unmarshal(m, b) @@ -744,7 +744,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_3f3e047a48f87feb, []int{11} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{11} } func (m *DeleteResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteResponse.Unmarshal(m, b) @@ -779,7 +779,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_3f3e047a48f87feb, []int{12} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{12} } func (m *IterateRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IterateRequest.Unmarshal(m, b) @@ -838,7 +838,7 @@ func (m *PayerBandwidthAllocationRequest) Reset() { *m = PayerBandwidthA func (m *PayerBandwidthAllocationRequest) String() string { return proto.CompactTextString(m) } func (*PayerBandwidthAllocationRequest) ProtoMessage() {} func (*PayerBandwidthAllocationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_pointerdb_3f3e047a48f87feb, []int{13} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{13} } func (m *PayerBandwidthAllocationRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PayerBandwidthAllocationRequest.Unmarshal(m, b) @@ -876,7 +876,7 @@ func (m *PayerBandwidthAllocationResponse) Reset() { *m = PayerBandwidth func (m *PayerBandwidthAllocationResponse) String() string { return proto.CompactTextString(m) } func (*PayerBandwidthAllocationResponse) ProtoMessage() {} func (*PayerBandwidthAllocationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_pointerdb_3f3e047a48f87feb, []int{14} + return fileDescriptor_pointerdb_a17404d4c37610e8, []int{14} } func (m *PayerBandwidthAllocationResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PayerBandwidthAllocationResponse.Unmarshal(m, b) @@ -1138,9 +1138,9 @@ var _PointerDB_serviceDesc = grpc.ServiceDesc{ Metadata: "pointerdb.proto", } -func init() { proto.RegisterFile("pointerdb.proto", fileDescriptor_pointerdb_3f3e047a48f87feb) } +func init() { proto.RegisterFile("pointerdb.proto", fileDescriptor_pointerdb_a17404d4c37610e8) } -var fileDescriptor_pointerdb_3f3e047a48f87feb = []byte{ +var fileDescriptor_pointerdb_a17404d4c37610e8 = []byte{ // 1092 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x5d, 0x6f, 0x1b, 0x45, 0x17, 0xae, 0xbf, 0xe3, 0xb3, 0x76, 0xea, 0x77, 0xd4, 0x37, 0xdd, 0xba, 0x45, 0x09, 0x8b, 0x80, diff --git a/pkg/pb/streams.pb.go b/pkg/pb/streams.pb.go index a181c2f35..0accfcc87 100644 --- a/pkg/pb/streams.pb.go +++ b/pkg/pb/streams.pb.go @@ -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_streams_2b972859339b7bc3, []int{0} + return fileDescriptor_streams_bbbe703970d9d652, []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_streams_2b972859339b7bc3, []int{1} + return fileDescriptor_streams_bbbe703970d9d652, []int{1} } func (m *StreamInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StreamInfo.Unmarshal(m, b) @@ -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_streams_2b972859339b7bc3, []int{2} + return fileDescriptor_streams_bbbe703970d9d652, []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("streams.proto", fileDescriptor_streams_2b972859339b7bc3) } +func init() { proto.RegisterFile("streams.proto", fileDescriptor_streams_bbbe703970d9d652) } -var fileDescriptor_streams_2b972859339b7bc3 = []byte{ +var fileDescriptor_streams_bbbe703970d9d652 = []byte{ // 304 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x51, 0xcb, 0x4e, 0xc3, 0x30, 0x10, 0x54, 0x5f, 0x50, 0xb6, 0x29, 0x05, 0x03, 0x52, 0x04, 0x17, 0x14, 0x0e, 0x20, 0x84, 0x7a, diff --git a/satellite/peer.go b/satellite/peer.go index d76615954..46e135122 100644 --- a/satellite/peer.go +++ b/satellite/peer.go @@ -31,7 +31,6 @@ import ( "storj.io/storj/pkg/kademlia" "storj.io/storj/pkg/node" "storj.io/storj/pkg/overlay" - "storj.io/storj/pkg/payments" "storj.io/storj/pkg/pb" "storj.io/storj/pkg/pointerdb" "storj.io/storj/pkg/server" @@ -87,9 +86,8 @@ type Config struct { Repairer repairer.Config Audit audit.Config - Tally tally.Config - Rollup rollup.Config - Payments payments.Config + Tally tally.Config + Rollup rollup.Config Console consoleweb.Config } @@ -155,10 +153,6 @@ type Peer struct { Rollup *rollup.Rollup } - Payments struct { - Endpoint *payments.Server - } - Console struct { Listener net.Listener Service *console.Service @@ -340,11 +334,6 @@ func New(log *zap.Logger, full *identity.FullIdentity, db DB, config *Config) (* peer.Accounting.Rollup = rollup.New(peer.Log.Named("rollup"), peer.DB.Accounting(), config.Rollup.Interval) } - { // setup payments - peer.Payments.Endpoint = payments.New(peer.Log.Named("payments"), peer.DB.Accounting(), peer.DB.OverlayCache(), config.Payments.Filepath) - pb.RegisterPaymentsServer(peer.Public.Server.GRPC(), peer.Payments.Endpoint) - } - { // setup console config := config.Console diff --git a/satellite/satellitedb/accounting.go b/satellite/satellitedb/accounting.go index 87b47e230..c6edd6a53 100644 --- a/satellite/satellitedb/accounting.go +++ b/satellite/satellitedb/accounting.go @@ -223,30 +223,3 @@ func (db *accountingDB) QueryPaymentInfo(ctx context.Context, start time.Time, e } return rows, nil } - -func (db *accountingDB) TestPayments(ctx context.Context) error { - rows, err := db.db.All_Node_Id(ctx) - if err != nil { - return Error.Wrap(err) - } - ids := [][]byte{} - for _, r := range rows { - ids = append(ids, r.Id) - } - for i, id := range ids { - nID := dbx.AccountingRollup_NodeId(id) - st := dbx.AccountingRollup_StartTime(time.Date(2018, time.Month(i+1), i+1, 0, 0, 0, 0, time.UTC)) - pt := dbx.AccountingRollup_PutTotal(int64(i)) - gt := dbx.AccountingRollup_GetTotal(int64(i)) - gat := dbx.AccountingRollup_GetAuditTotal(int64(i)) - grt := dbx.AccountingRollup_GetRepairTotal(int64(i)) - prt := dbx.AccountingRollup_PutRepairTotal(int64(i)) - art := dbx.AccountingRollup_AtRestTotal(float64(i)) - _, err = db.db.Create_AccountingRollup(ctx, nID, st, pt, gt, gat, grt, prt, art) - if err != nil { - return Error.Wrap(err) - } - } - - return nil -}