satellite/payments: mock methods added to endpoint to match pb PaymentsServer

Change-Id: Ic8ff44cbe0b2368021a5d83cf86ce0dd2b670fd7
This commit is contained in:
VitaliiShpital 2020-01-09 13:48:37 +02:00
parent d3d75a597f
commit a4e5c18877
3 changed files with 17 additions and 1 deletions

2
go.mod
View File

@ -111,7 +111,7 @@ require (
gopkg.in/olivere/elastic.v5 v5.0.76 // indirect gopkg.in/olivere/elastic.v5 v5.0.76 // indirect
gopkg.in/spacemonkeygo/monkit.v2 v2.0.0-20190612171030-cf5a9e6f8fd2 gopkg.in/spacemonkeygo/monkit.v2 v2.0.0-20190612171030-cf5a9e6f8fd2
gopkg.in/yaml.v2 v2.2.2 gopkg.in/yaml.v2 v2.2.2
storj.io/common v0.0.0-20200108114547-1c62e5708bce storj.io/common v0.0.0-20200109103211-f95ce3581da7
storj.io/drpc v0.0.7-0.20191115031725-2171c57838d2 storj.io/drpc v0.0.7-0.20191115031725-2171c57838d2
storj.io/uplink v0.0.0-20200108132132-c2c5e0d46c1a storj.io/uplink v0.0.0-20200108132132-c2c5e0d46c1a
) )

2
go.sum
View File

@ -590,6 +590,8 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
storj.io/common v0.0.0-20200108114547-1c62e5708bce h1:0okFmuEp38BNSKXQ72PXMTouSYMKMfC6H+GlNRfthbA= storj.io/common v0.0.0-20200108114547-1c62e5708bce h1:0okFmuEp38BNSKXQ72PXMTouSYMKMfC6H+GlNRfthbA=
storj.io/common v0.0.0-20200108114547-1c62e5708bce/go.mod h1:mDnchZF+e7g7u630Wwgu/X/zCmqpU0lvy5kQ3jQgs5k= storj.io/common v0.0.0-20200108114547-1c62e5708bce/go.mod h1:mDnchZF+e7g7u630Wwgu/X/zCmqpU0lvy5kQ3jQgs5k=
storj.io/common v0.0.0-20200109103211-f95ce3581da7 h1:vGQ7fEcRpCQG7HqH6/HDaJpnlsn46LvZEvqN/XreHJQ=
storj.io/common v0.0.0-20200109103211-f95ce3581da7/go.mod h1:mDnchZF+e7g7u630Wwgu/X/zCmqpU0lvy5kQ3jQgs5k=
storj.io/drpc v0.0.7-0.20191115031725-2171c57838d2 h1:8SgLYEhe99R8QlAD1EAOBPRyIR+cn2hqkXtWlAUPf/c= storj.io/drpc v0.0.7-0.20191115031725-2171c57838d2 h1:8SgLYEhe99R8QlAD1EAOBPRyIR+cn2hqkXtWlAUPf/c=
storj.io/drpc v0.0.7-0.20191115031725-2171c57838d2/go.mod h1:/ascUDbzNAv0A3Jj7wUIKFBH2JdJ2uJIBO/b9+2yHgQ= storj.io/drpc v0.0.7-0.20191115031725-2171c57838d2/go.mod h1:/ascUDbzNAv0A3Jj7wUIKFBH2JdJ2uJIBO/b9+2yHgQ=
storj.io/uplink v0.0.0-20200108132132-c2c5e0d46c1a h1:w/588H+U5IfTXCHA2GTFVLzpUbworS0DtoB4sR9h/8M= storj.io/uplink v0.0.0-20200108132132-c2c5e0d46c1a h1:w/588H+U5IfTXCHA2GTFVLzpUbworS0DtoB4sR9h/8M=

View File

@ -44,6 +44,20 @@ func (endpoint *Endpoint) ApplyInvoiceRecords(ctx context.Context, req *pb.Apply
return &pb.ApplyInvoiceRecordsResponse{}, nil return &pb.ApplyInvoiceRecordsResponse{}, nil
} }
// PrepareInvoiceCoupons creates coupon usage for all satellite projects.
func (endpoint *Endpoint) PrepareInvoiceCoupons(ctx context.Context, req *pb.PrepareInvoiceCouponsRequest) (_ *pb.PrepareInvoiceCouponsResponse, err error) {
defer mon.Task()(&ctx)(&err)
return &pb.PrepareInvoiceCouponsResponse{}, rpcstatus.Error(rpcstatus.Unimplemented, "not implemented")
}
// ApplyInvoiceCoupons creates stripe line items for all unapplied coupons.
func (endpoint *Endpoint) ApplyInvoiceCoupons(ctx context.Context, req *pb.ApplyInvoiceCouponsRequest) (_ *pb.ApplyInvoiceCouponsResponse, err error) {
defer mon.Task()(&ctx)(&err)
return &pb.ApplyInvoiceCouponsResponse{}, rpcstatus.Error(rpcstatus.Unimplemented, "not implemented")
}
// CreateInvoices creates invoice for all user accounts on the satellite. // CreateInvoices creates invoice for all user accounts on the satellite.
func (endpoint *Endpoint) CreateInvoices(ctx context.Context, req *pb.CreateInvoicesRequest) (_ *pb.CreateInvoicesResponse, err error) { func (endpoint *Endpoint) CreateInvoices(ctx context.Context, req *pb.CreateInvoicesRequest) (_ *pb.CreateInvoicesResponse, err error) {
defer mon.Task()(&ctx)(&err) defer mon.Task()(&ctx)(&err)