Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterPaymentServiceServer(s grpc.ServiceRegistrar, srv PaymentServiceServer)
- type CreatePaymentRequest
- func (*CreatePaymentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreatePaymentRequest) GetAmount() *model.PaymentAmount
- func (x *CreatePaymentRequest) GetOrderId() int64
- func (*CreatePaymentRequest) ProtoMessage()
- func (x *CreatePaymentRequest) ProtoReflect() protoreflect.Message
- func (x *CreatePaymentRequest) Reset()
- func (x *CreatePaymentRequest) String() string
- type GetPaymentRequest
- type ListPaymentsRequest
- func (*ListPaymentsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListPaymentsRequest) GetPage() int64
- func (x *ListPaymentsRequest) GetPageSize() int64
- func (*ListPaymentsRequest) ProtoMessage()
- func (x *ListPaymentsRequest) ProtoReflect() protoreflect.Message
- func (x *ListPaymentsRequest) Reset()
- func (x *ListPaymentsRequest) String() string
- type ListPaymentsResponse
- func (*ListPaymentsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListPaymentsResponse) GetPayments() []*model.Payment
- func (x *ListPaymentsResponse) GetTotal() int64
- func (*ListPaymentsResponse) ProtoMessage()
- func (x *ListPaymentsResponse) ProtoReflect() protoreflect.Message
- func (x *ListPaymentsResponse) Reset()
- func (x *ListPaymentsResponse) String() string
- type MockPaymentServiceClient
- func (m *MockPaymentServiceClient) CreatePayment(ctx context.Context, in *CreatePaymentRequest, opts ...grpc.CallOption) (*model.Payment, error)
- func (m *MockPaymentServiceClient) EXPECT() *MockPaymentServiceClientMockRecorder
- func (m *MockPaymentServiceClient) GetPayment(ctx context.Context, in *GetPaymentRequest, opts ...grpc.CallOption) (*model.Payment, error)
- func (m *MockPaymentServiceClient) ListPayments(ctx context.Context, in *ListPaymentsRequest, opts ...grpc.CallOption) (*ListPaymentsResponse, error)
- type MockPaymentServiceClientMockRecorder
- func (mr *MockPaymentServiceClientMockRecorder) CreatePayment(ctx, in interface{}, opts ...interface{}) *gomock.Call
- func (mr *MockPaymentServiceClientMockRecorder) GetPayment(ctx, in interface{}, opts ...interface{}) *gomock.Call
- func (mr *MockPaymentServiceClientMockRecorder) ListPayments(ctx, in interface{}, opts ...interface{}) *gomock.Call
- type MockPaymentServiceServer
- func (m *MockPaymentServiceServer) CreatePayment(ctx context.Context, in *CreatePaymentRequest) (*model.Payment, error)
- func (m *MockPaymentServiceServer) EXPECT() *MockPaymentServiceServerMockRecorder
- func (m *MockPaymentServiceServer) GetPayment(ctx context.Context, in *GetPaymentRequest) (*model.Payment, error)
- func (m *MockPaymentServiceServer) ListPayments(ctx context.Context, in *ListPaymentsRequest) (*ListPaymentsResponse, error)
- type MockPaymentServiceServerMockRecorder
- type PaymentServiceClient
- type PaymentServiceServer
- type UnimplementedPaymentServiceServer
- func (UnimplementedPaymentServiceServer) CreatePayment(context.Context, *CreatePaymentRequest) (*model.Payment, error)
- func (UnimplementedPaymentServiceServer) GetPayment(context.Context, *GetPaymentRequest) (*model.Payment, error)
- func (UnimplementedPaymentServiceServer) ListPayments(context.Context, *ListPaymentsRequest) (*ListPaymentsResponse, error)
- type UnsafePaymentServiceServer
Constants ¶
const ( PaymentService_CreatePayment_FullMethodName = "/payment.PaymentService/CreatePayment" PaymentService_GetPayment_FullMethodName = "/payment.PaymentService/GetPayment" PaymentService_ListPayments_FullMethodName = "/payment.PaymentService/ListPayments" )
Variables ¶
var File_domain_payment_biz_payment_proto protoreflect.FileDescriptor
var PaymentService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "payment.PaymentService", HandlerType: (*PaymentServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreatePayment", Handler: _PaymentService_CreatePayment_Handler, }, { MethodName: "GetPayment", Handler: _PaymentService_GetPayment_Handler, }, { MethodName: "ListPayments", Handler: _PaymentService_ListPayments_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "domain/payment/biz/payment.proto", }
PaymentService_ServiceDesc is the grpc.ServiceDesc for PaymentService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPaymentServiceServer ¶
func RegisterPaymentServiceServer(s grpc.ServiceRegistrar, srv PaymentServiceServer)
Types ¶
type CreatePaymentRequest ¶
type CreatePaymentRequest struct { OrderId int64 `protobuf:"varint,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` Amount *model.PaymentAmount `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*CreatePaymentRequest) Descriptor
deprecated
func (*CreatePaymentRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreatePaymentRequest.ProtoReflect.Descriptor instead.
func (*CreatePaymentRequest) GetAmount ¶
func (x *CreatePaymentRequest) GetAmount() *model.PaymentAmount
func (*CreatePaymentRequest) GetOrderId ¶
func (x *CreatePaymentRequest) GetOrderId() int64
func (*CreatePaymentRequest) ProtoMessage ¶
func (*CreatePaymentRequest) ProtoMessage()
func (*CreatePaymentRequest) ProtoReflect ¶
func (x *CreatePaymentRequest) ProtoReflect() protoreflect.Message
func (*CreatePaymentRequest) Reset ¶
func (x *CreatePaymentRequest) Reset()
func (*CreatePaymentRequest) String ¶
func (x *CreatePaymentRequest) String() string
type GetPaymentRequest ¶
type GetPaymentRequest struct { PaymentId string `protobuf:"bytes,1,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` // contains filtered or unexported fields }
func (*GetPaymentRequest) Descriptor
deprecated
func (*GetPaymentRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPaymentRequest.ProtoReflect.Descriptor instead.
func (*GetPaymentRequest) GetPaymentId ¶
func (x *GetPaymentRequest) GetPaymentId() string
func (*GetPaymentRequest) ProtoMessage ¶
func (*GetPaymentRequest) ProtoMessage()
func (*GetPaymentRequest) ProtoReflect ¶
func (x *GetPaymentRequest) ProtoReflect() protoreflect.Message
func (*GetPaymentRequest) Reset ¶
func (x *GetPaymentRequest) Reset()
func (*GetPaymentRequest) String ¶
func (x *GetPaymentRequest) String() string
type ListPaymentsRequest ¶
type ListPaymentsRequest struct { Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // contains filtered or unexported fields }
func (*ListPaymentsRequest) Descriptor
deprecated
func (*ListPaymentsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListPaymentsRequest.ProtoReflect.Descriptor instead.
func (*ListPaymentsRequest) GetPage ¶
func (x *ListPaymentsRequest) GetPage() int64
func (*ListPaymentsRequest) GetPageSize ¶
func (x *ListPaymentsRequest) GetPageSize() int64
func (*ListPaymentsRequest) ProtoMessage ¶
func (*ListPaymentsRequest) ProtoMessage()
func (*ListPaymentsRequest) ProtoReflect ¶
func (x *ListPaymentsRequest) ProtoReflect() protoreflect.Message
func (*ListPaymentsRequest) Reset ¶
func (x *ListPaymentsRequest) Reset()
func (*ListPaymentsRequest) String ¶
func (x *ListPaymentsRequest) String() string
type ListPaymentsResponse ¶
type ListPaymentsResponse struct { Payments []*model.Payment `protobuf:"bytes,1,rep,name=payments,proto3" json:"payments,omitempty"` Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*ListPaymentsResponse) Descriptor
deprecated
func (*ListPaymentsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListPaymentsResponse.ProtoReflect.Descriptor instead.
func (*ListPaymentsResponse) GetPayments ¶
func (x *ListPaymentsResponse) GetPayments() []*model.Payment
func (*ListPaymentsResponse) GetTotal ¶
func (x *ListPaymentsResponse) GetTotal() int64
func (*ListPaymentsResponse) ProtoMessage ¶
func (*ListPaymentsResponse) ProtoMessage()
func (*ListPaymentsResponse) ProtoReflect ¶
func (x *ListPaymentsResponse) ProtoReflect() protoreflect.Message
func (*ListPaymentsResponse) Reset ¶
func (x *ListPaymentsResponse) Reset()
func (*ListPaymentsResponse) String ¶
func (x *ListPaymentsResponse) String() string
type MockPaymentServiceClient ¶
type MockPaymentServiceClient struct {
// contains filtered or unexported fields
}
MockPaymentServiceClient is a mock of PaymentServiceClient interface.
func NewMockPaymentServiceClient ¶
func NewMockPaymentServiceClient(ctrl *gomock.Controller) *MockPaymentServiceClient
NewMockPaymentServiceClient creates a new mock instance.
func (*MockPaymentServiceClient) CreatePayment ¶
func (m *MockPaymentServiceClient) CreatePayment(ctx context.Context, in *CreatePaymentRequest, opts ...grpc.CallOption) (*model.Payment, error)
CreatePayment mocks base method.
func (*MockPaymentServiceClient) EXPECT ¶
func (m *MockPaymentServiceClient) EXPECT() *MockPaymentServiceClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPaymentServiceClient) GetPayment ¶
func (m *MockPaymentServiceClient) GetPayment(ctx context.Context, in *GetPaymentRequest, opts ...grpc.CallOption) (*model.Payment, error)
GetPayment mocks base method.
func (*MockPaymentServiceClient) ListPayments ¶
func (m *MockPaymentServiceClient) ListPayments(ctx context.Context, in *ListPaymentsRequest, opts ...grpc.CallOption) (*ListPaymentsResponse, error)
ListPayments mocks base method.
type MockPaymentServiceClientMockRecorder ¶
type MockPaymentServiceClientMockRecorder struct {
// contains filtered or unexported fields
}
MockPaymentServiceClientMockRecorder is the mock recorder for MockPaymentServiceClient.
func (*MockPaymentServiceClientMockRecorder) CreatePayment ¶
func (mr *MockPaymentServiceClientMockRecorder) CreatePayment(ctx, in interface{}, opts ...interface{}) *gomock.Call
CreatePayment indicates an expected call of CreatePayment.
func (*MockPaymentServiceClientMockRecorder) GetPayment ¶
func (mr *MockPaymentServiceClientMockRecorder) GetPayment(ctx, in interface{}, opts ...interface{}) *gomock.Call
GetPayment indicates an expected call of GetPayment.
func (*MockPaymentServiceClientMockRecorder) ListPayments ¶
func (mr *MockPaymentServiceClientMockRecorder) ListPayments(ctx, in interface{}, opts ...interface{}) *gomock.Call
ListPayments indicates an expected call of ListPayments.
type MockPaymentServiceServer ¶
type MockPaymentServiceServer struct {
// contains filtered or unexported fields
}
MockPaymentServiceServer is a mock of PaymentServiceServer interface.
func NewMockPaymentServiceServer ¶
func NewMockPaymentServiceServer(ctrl *gomock.Controller) *MockPaymentServiceServer
NewMockPaymentServiceServer creates a new mock instance.
func (*MockPaymentServiceServer) CreatePayment ¶
func (m *MockPaymentServiceServer) CreatePayment(ctx context.Context, in *CreatePaymentRequest) (*model.Payment, error)
CreatePayment mocks base method.
func (*MockPaymentServiceServer) EXPECT ¶
func (m *MockPaymentServiceServer) EXPECT() *MockPaymentServiceServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPaymentServiceServer) GetPayment ¶
func (m *MockPaymentServiceServer) GetPayment(ctx context.Context, in *GetPaymentRequest) (*model.Payment, error)
GetPayment mocks base method.
func (*MockPaymentServiceServer) ListPayments ¶
func (m *MockPaymentServiceServer) ListPayments(ctx context.Context, in *ListPaymentsRequest) (*ListPaymentsResponse, error)
ListPayments mocks base method.
type MockPaymentServiceServerMockRecorder ¶
type MockPaymentServiceServerMockRecorder struct {
// contains filtered or unexported fields
}
MockPaymentServiceServerMockRecorder is the mock recorder for MockPaymentServiceServer.
func (*MockPaymentServiceServerMockRecorder) CreatePayment ¶
func (mr *MockPaymentServiceServerMockRecorder) CreatePayment(ctx, in interface{}) *gomock.Call
CreatePayment indicates an expected call of CreatePayment.
func (*MockPaymentServiceServerMockRecorder) GetPayment ¶
func (mr *MockPaymentServiceServerMockRecorder) GetPayment(ctx, in interface{}) *gomock.Call
GetPayment indicates an expected call of GetPayment.
func (*MockPaymentServiceServerMockRecorder) ListPayments ¶
func (mr *MockPaymentServiceServerMockRecorder) ListPayments(ctx, in interface{}) *gomock.Call
ListPayments indicates an expected call of ListPayments.
type PaymentServiceClient ¶
type PaymentServiceClient interface { CreatePayment(ctx context.Context, in *CreatePaymentRequest, opts ...grpc.CallOption) (*model.Payment, error) GetPayment(ctx context.Context, in *GetPaymentRequest, opts ...grpc.CallOption) (*model.Payment, error) ListPayments(ctx context.Context, in *ListPaymentsRequest, opts ...grpc.CallOption) (*ListPaymentsResponse, error) }
PaymentServiceClient is the client API for PaymentService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewPaymentServiceClient ¶
func NewPaymentServiceClient(cc grpc.ClientConnInterface) PaymentServiceClient
type PaymentServiceServer ¶
type PaymentServiceServer interface { CreatePayment(context.Context, *CreatePaymentRequest) (*model.Payment, error) GetPayment(context.Context, *GetPaymentRequest) (*model.Payment, error) ListPayments(context.Context, *ListPaymentsRequest) (*ListPaymentsResponse, error) }
PaymentServiceServer is the server API for PaymentService service. All implementations should embed UnimplementedPaymentServiceServer for forward compatibility.
type UnimplementedPaymentServiceServer ¶
type UnimplementedPaymentServiceServer struct{}
UnimplementedPaymentServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedPaymentServiceServer) CreatePayment ¶
func (UnimplementedPaymentServiceServer) CreatePayment(context.Context, *CreatePaymentRequest) (*model.Payment, error)
func (UnimplementedPaymentServiceServer) GetPayment ¶
func (UnimplementedPaymentServiceServer) GetPayment(context.Context, *GetPaymentRequest) (*model.Payment, error)
func (UnimplementedPaymentServiceServer) ListPayments ¶
func (UnimplementedPaymentServiceServer) ListPayments(context.Context, *ListPaymentsRequest) (*ListPaymentsResponse, error)
type UnsafePaymentServiceServer ¶
type UnsafePaymentServiceServer interface {
// contains filtered or unexported methods
}
UnsafePaymentServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PaymentServiceServer will result in compilation errors.