payment_shopping_service.pb.micro.go 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. // Code generated by protoc-gen-micro. DO NOT EDIT.
  2. // source: proto/payment_shopping_service.proto
  3. package shopping_service
  4. import (
  5. fmt "fmt"
  6. proto "google.golang.org/protobuf/proto"
  7. math "math"
  8. )
  9. import (
  10. context "context"
  11. api "go-micro.dev/v4/api"
  12. client "go-micro.dev/v4/client"
  13. server "go-micro.dev/v4/server"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var _ = proto.Marshal
  17. var _ = fmt.Errorf
  18. var _ = math.Inf
  19. // Reference imports to suppress errors if they are not otherwise used.
  20. var _ api.Endpoint
  21. var _ context.Context
  22. var _ client.Option
  23. var _ server.Option
  24. // Api Endpoints for PaymentShoppingService service
  25. func NewPaymentShoppingServiceEndpoints() []*api.Endpoint {
  26. return []*api.Endpoint{}
  27. }
  28. // Client API for PaymentShoppingService service
  29. type PaymentShoppingService interface {
  30. CreatePayment(ctx context.Context, in *CreatePaymentRequest, opts ...client.CallOption) (*CreatePaymentResponse, error)
  31. }
  32. type paymentShoppingService struct {
  33. c client.Client
  34. name string
  35. }
  36. func NewPaymentShoppingService(name string, c client.Client) PaymentShoppingService {
  37. return &paymentShoppingService{
  38. c: c,
  39. name: name,
  40. }
  41. }
  42. func (c *paymentShoppingService) CreatePayment(ctx context.Context, in *CreatePaymentRequest, opts ...client.CallOption) (*CreatePaymentResponse, error) {
  43. req := c.c.NewRequest(c.name, "PaymentShoppingService.CreatePayment", in)
  44. out := new(CreatePaymentResponse)
  45. err := c.c.Call(ctx, req, out, opts...)
  46. if err != nil {
  47. return nil, err
  48. }
  49. return out, nil
  50. }
  51. // Server API for PaymentShoppingService service
  52. type PaymentShoppingServiceHandler interface {
  53. CreatePayment(context.Context, *CreatePaymentRequest, *CreatePaymentResponse) error
  54. }
  55. func RegisterPaymentShoppingServiceHandler(s server.Server, hdlr PaymentShoppingServiceHandler, opts ...server.HandlerOption) error {
  56. type paymentShoppingService interface {
  57. CreatePayment(ctx context.Context, in *CreatePaymentRequest, out *CreatePaymentResponse) error
  58. }
  59. type PaymentShoppingService struct {
  60. paymentShoppingService
  61. }
  62. h := &paymentShoppingServiceHandler{hdlr}
  63. return s.Handle(s.NewHandler(&PaymentShoppingService{h}, opts...))
  64. }
  65. type paymentShoppingServiceHandler struct {
  66. PaymentShoppingServiceHandler
  67. }
  68. func (h *paymentShoppingServiceHandler) CreatePayment(ctx context.Context, in *CreatePaymentRequest, out *CreatePaymentResponse) error {
  69. return h.PaymentShoppingServiceHandler.CreatePayment(ctx, in, out)
  70. }