Commit 04a6c06b authored by Go Protoc Bot's avatar Go Protoc Bot
Browse files

update

parent ea68daac
......@@ -5,7 +5,7 @@ go 1.16
require (
github.com/golang/protobuf v1.5.2
github.com/mwitkow/go-proto-validators v0.3.2
google.golang.org/genproto v0.0.0-20211018162055-cf77aa76bad2
google.golang.org/genproto v0.0.0-20211020151524-b7c3a969101a
google.golang.org/grpc v1.41.0
google.golang.org/protobuf v1.27.1
)
......@@ -109,8 +109,8 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20211018162055-cf77aa76bad2 h1:CUp93KYgL06Y/PdI8aRJaFiAHevPIGWQmijSqaUhue8=
google.golang.org/genproto v0.0.0-20211018162055-cf77aa76bad2/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211020151524-b7c3a969101a h1:8maMHMQp9NroHXhc3HelFX9Ay2lWlXLcdH5mw5Biz0s=
google.golang.org/genproto v0.0.0-20211020151524-b7c3a969101a/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
......
This diff is collapsed.
......@@ -4,6 +4,7 @@ package payment
import (
context "context"
empty "github.com/golang/protobuf/ptypes/empty"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
......@@ -32,6 +33,8 @@ type PaymentClient interface {
CreatePaymentGateway(ctx context.Context, in *CreatePaymentGatewayRequest, opts ...grpc.CallOption) (*PaymentGateway, error)
// GetPaymentGateway retrieves a payment gateway by its name.
GetPaymentGateway(ctx context.Context, in *GetPaymentGatewayRequest, opts ...grpc.CallOption) (*PaymentGateway, error)
// TriggerStateUpdate triggers a complete state update of the payment api. (Usually done lazily)
TriggerStateUpdate(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
}
type paymentClient struct {
......@@ -105,6 +108,15 @@ func (c *paymentClient) GetPaymentGateway(ctx context.Context, in *GetPaymentGat
return out, nil
}
func (c *paymentClient) TriggerStateUpdate(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/vseth.sip.payment.Payment/TriggerStateUpdate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PaymentServer is the server API for Payment service.
// All implementations must embed UnimplementedPaymentServer
// for forward compatibility
......@@ -123,6 +135,8 @@ type PaymentServer interface {
CreatePaymentGateway(context.Context, *CreatePaymentGatewayRequest) (*PaymentGateway, error)
// GetPaymentGateway retrieves a payment gateway by its name.
GetPaymentGateway(context.Context, *GetPaymentGatewayRequest) (*PaymentGateway, error)
// TriggerStateUpdate triggers a complete state update of the payment api. (Usually done lazily)
TriggerStateUpdate(context.Context, *empty.Empty) (*empty.Empty, error)
mustEmbedUnimplementedPaymentServer()
}
......@@ -151,6 +165,9 @@ func (UnimplementedPaymentServer) CreatePaymentGateway(context.Context, *CreateP
func (UnimplementedPaymentServer) GetPaymentGateway(context.Context, *GetPaymentGatewayRequest) (*PaymentGateway, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentGateway not implemented")
}
func (UnimplementedPaymentServer) TriggerStateUpdate(context.Context, *empty.Empty) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method TriggerStateUpdate not implemented")
}
func (UnimplementedPaymentServer) mustEmbedUnimplementedPaymentServer() {}
// UnsafePaymentServer may be embedded to opt out of forward compatibility for this service.
......@@ -290,6 +307,24 @@ func _Payment_GetPaymentGateway_Handler(srv interface{}, ctx context.Context, de
return interceptor(ctx, in, info, handler)
}
func _Payment_TriggerStateUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PaymentServer).TriggerStateUpdate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/vseth.sip.payment.Payment/TriggerStateUpdate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentServer).TriggerStateUpdate(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
// Payment_ServiceDesc is the grpc.ServiceDesc for Payment service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
......@@ -325,6 +360,10 @@ var Payment_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetPaymentGateway",
Handler: _Payment_GetPaymentGateway_Handler,
},
{
MethodName: "TriggerStateUpdate",
Handler: _Payment_TriggerStateUpdate_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "vseth/sip/payment/payment.proto",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment