123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- // Code generated by protoc-gen-micro. DO NOT EDIT.
- // source: proto/payment_shopping_service.proto
- package shopping_service
- import (
- fmt "fmt"
- proto "google.golang.org/protobuf/proto"
- math "math"
- )
- import (
- context "context"
- api "go-micro.dev/v4/api"
- client "go-micro.dev/v4/client"
- server "go-micro.dev/v4/server"
- )
- // Reference imports to suppress errors if they are not otherwise used.
- var _ = proto.Marshal
- var _ = fmt.Errorf
- var _ = math.Inf
- // Reference imports to suppress errors if they are not otherwise used.
- var _ api.Endpoint
- var _ context.Context
- var _ client.Option
- var _ server.Option
- // Api Endpoints for PaymentShoppingService service
- func NewPaymentShoppingServiceEndpoints() []*api.Endpoint {
- return []*api.Endpoint{}
- }
- // Client API for PaymentShoppingService service
- type PaymentShoppingService interface {
- CreatePayment(ctx context.Context, in *CreatePaymentRequest, opts ...client.CallOption) (*CreatePaymentResponse, error)
- }
- type paymentShoppingService struct {
- c client.Client
- name string
- }
- func NewPaymentShoppingService(name string, c client.Client) PaymentShoppingService {
- return &paymentShoppingService{
- c: c,
- name: name,
- }
- }
- func (c *paymentShoppingService) CreatePayment(ctx context.Context, in *CreatePaymentRequest, opts ...client.CallOption) (*CreatePaymentResponse, error) {
- req := c.c.NewRequest(c.name, "PaymentShoppingService.CreatePayment", in)
- out := new(CreatePaymentResponse)
- err := c.c.Call(ctx, req, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // Server API for PaymentShoppingService service
- type PaymentShoppingServiceHandler interface {
- CreatePayment(context.Context, *CreatePaymentRequest, *CreatePaymentResponse) error
- }
- func RegisterPaymentShoppingServiceHandler(s server.Server, hdlr PaymentShoppingServiceHandler, opts ...server.HandlerOption) error {
- type paymentShoppingService interface {
- CreatePayment(ctx context.Context, in *CreatePaymentRequest, out *CreatePaymentResponse) error
- }
- type PaymentShoppingService struct {
- paymentShoppingService
- }
- h := &paymentShoppingServiceHandler{hdlr}
- return s.Handle(s.NewHandler(&PaymentShoppingService{h}, opts...))
- }
- type paymentShoppingServiceHandler struct {
- PaymentShoppingServiceHandler
- }
- func (h *paymentShoppingServiceHandler) CreatePayment(ctx context.Context, in *CreatePaymentRequest, out *CreatePaymentResponse) error {
- return h.PaymentShoppingServiceHandler.CreatePayment(ctx, in, out)
- }
|