Documentation
¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterPaymentServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPaymentServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PaymentServiceClient) error
- func RegisterPaymentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPaymentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PaymentServiceServer) error
- func RegisterPaymentServiceServer(s grpc.ServiceRegistrar, srv PaymentServiceServer)
- type GetPaymentRequest
- func (*GetPaymentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetPaymentRequest) GetId() int64
- func (*GetPaymentRequest) ProtoMessage()
- func (x *GetPaymentRequest) ProtoReflect() protoreflect.Message
- func (x *GetPaymentRequest) Reset()
- func (x *GetPaymentRequest) String() string
- func (m *GetPaymentRequest) Validate() error
- func (m *GetPaymentRequest) ValidateAll() error
- type GetPaymentRequestMultiError
- type GetPaymentRequestValidationError
- func (e GetPaymentRequestValidationError) Cause() error
- func (e GetPaymentRequestValidationError) Error() string
- func (e GetPaymentRequestValidationError) ErrorName() string
- func (e GetPaymentRequestValidationError) Field() string
- func (e GetPaymentRequestValidationError) Key() bool
- func (e GetPaymentRequestValidationError) Reason() string
- type GetPaymentResponse
- func (*GetPaymentResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetPaymentResponse) GetPayment() *Payment
- func (*GetPaymentResponse) ProtoMessage()
- func (x *GetPaymentResponse) ProtoReflect() protoreflect.Message
- func (x *GetPaymentResponse) Reset()
- func (x *GetPaymentResponse) String() string
- func (m *GetPaymentResponse) Validate() error
- func (m *GetPaymentResponse) ValidateAll() error
- type GetPaymentResponseMultiError
- type GetPaymentResponseValidationError
- func (e GetPaymentResponseValidationError) Cause() error
- func (e GetPaymentResponseValidationError) Error() string
- func (e GetPaymentResponseValidationError) ErrorName() string
- func (e GetPaymentResponseValidationError) Field() string
- func (e GetPaymentResponseValidationError) Key() bool
- func (e GetPaymentResponseValidationError) Reason() string
- type Payment
- func (*Payment) Descriptor() ([]byte, []int)deprecated
- func (x *Payment) GetAmount() float64
- func (x *Payment) GetCreatedAt() string
- func (x *Payment) GetCurrency() string
- func (x *Payment) GetId() int64
- func (x *Payment) GetOrderId() int64
- func (x *Payment) GetPaymentMethod() string
- func (x *Payment) GetStatus() PaymentStatus
- func (x *Payment) GetTransactionId() string
- func (x *Payment) GetUpdatedAt() string
- func (x *Payment) GetUserId() int64
- func (*Payment) ProtoMessage()
- func (x *Payment) ProtoReflect() protoreflect.Message
- func (x *Payment) Reset()
- func (x *Payment) String() string
- func (m *Payment) Validate() error
- func (m *Payment) ValidateAll() error
- type PaymentMultiError
- type PaymentServiceClient
- type PaymentServiceServer
- type PaymentStatus
- func (PaymentStatus) Descriptor() protoreflect.EnumDescriptor
- func (x PaymentStatus) Enum() *PaymentStatus
- func (PaymentStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x PaymentStatus) Number() protoreflect.EnumNumber
- func (x PaymentStatus) String() string
- func (PaymentStatus) Type() protoreflect.EnumType
- type PaymentValidationError
- type ProcessPaymentRequest
- func (*ProcessPaymentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessPaymentRequest) GetAmount() float64
- func (x *ProcessPaymentRequest) GetCurrency() string
- func (x *ProcessPaymentRequest) GetOrderId() int64
- func (x *ProcessPaymentRequest) GetPaymentMethod() string
- func (x *ProcessPaymentRequest) GetUserId() int64
- func (*ProcessPaymentRequest) ProtoMessage()
- func (x *ProcessPaymentRequest) ProtoReflect() protoreflect.Message
- func (x *ProcessPaymentRequest) Reset()
- func (x *ProcessPaymentRequest) String() string
- func (m *ProcessPaymentRequest) Validate() error
- func (m *ProcessPaymentRequest) ValidateAll() error
- type ProcessPaymentRequestMultiError
- type ProcessPaymentRequestValidationError
- func (e ProcessPaymentRequestValidationError) Cause() error
- func (e ProcessPaymentRequestValidationError) Error() string
- func (e ProcessPaymentRequestValidationError) ErrorName() string
- func (e ProcessPaymentRequestValidationError) Field() string
- func (e ProcessPaymentRequestValidationError) Key() bool
- func (e ProcessPaymentRequestValidationError) Reason() string
- type ProcessPaymentResponse
- func (*ProcessPaymentResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessPaymentResponse) GetPayment() *Payment
- func (*ProcessPaymentResponse) ProtoMessage()
- func (x *ProcessPaymentResponse) ProtoReflect() protoreflect.Message
- func (x *ProcessPaymentResponse) Reset()
- func (x *ProcessPaymentResponse) String() string
- func (m *ProcessPaymentResponse) Validate() error
- func (m *ProcessPaymentResponse) ValidateAll() error
- type ProcessPaymentResponseMultiError
- type ProcessPaymentResponseValidationError
- func (e ProcessPaymentResponseValidationError) Cause() error
- func (e ProcessPaymentResponseValidationError) Error() string
- func (e ProcessPaymentResponseValidationError) ErrorName() string
- func (e ProcessPaymentResponseValidationError) Field() string
- func (e ProcessPaymentResponseValidationError) Key() bool
- func (e ProcessPaymentResponseValidationError) Reason() string
- type UnimplementedPaymentServiceServer
- type UnsafePaymentServiceServer
Constants ¶
const ( PaymentService_ProcessPayment_FullMethodName = "/payment.v1.PaymentService/ProcessPayment" PaymentService_GetPayment_FullMethodName = "/payment.v1.PaymentService/GetPayment" )
Variables ¶
var ( PaymentStatus_name = map[int32]string{ 0: "PAYMENT_STATUS_UNSPECIFIED", 1: "PAYMENT_STATUS_PENDING", 2: "PAYMENT_STATUS_SUCCESS", 3: "PAYMENT_STATUS_FAILED", } PaymentStatus_value = map[string]int32{ "PAYMENT_STATUS_UNSPECIFIED": 0, "PAYMENT_STATUS_PENDING": 1, "PAYMENT_STATUS_SUCCESS": 2, "PAYMENT_STATUS_FAILED": 3, } )
Enum value maps for PaymentStatus.
var File_payment_v1_payment_proto protoreflect.FileDescriptor
var PaymentService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "payment.v1.PaymentService", HandlerType: (*PaymentServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ProcessPayment", Handler: _PaymentService_ProcessPayment_Handler, }, { MethodName: "GetPayment", Handler: _PaymentService_GetPayment_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "payment/v1/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 RegisterPaymentServiceHandler ¶ added in v1.2.0
func RegisterPaymentServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterPaymentServiceHandler registers the http handlers for service PaymentService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPaymentServiceHandlerClient ¶ added in v1.2.0
func RegisterPaymentServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PaymentServiceClient) error
RegisterPaymentServiceHandlerClient registers the http handlers for service PaymentService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PaymentServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PaymentServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PaymentServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterPaymentServiceHandlerFromEndpoint ¶ added in v1.2.0
func RegisterPaymentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPaymentServiceHandlerFromEndpoint is same as RegisterPaymentServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPaymentServiceHandlerServer ¶ added in v1.2.0
func RegisterPaymentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PaymentServiceServer) error
RegisterPaymentServiceHandlerServer registers the http handlers for service PaymentService to "mux". UnaryRPC :call PaymentServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPaymentServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterPaymentServiceServer ¶
func RegisterPaymentServiceServer(s grpc.ServiceRegistrar, srv PaymentServiceServer)
Types ¶
type GetPaymentRequest ¶
type GetPaymentRequest struct {
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
Request to get details of a specific payment transaction.
func (*GetPaymentRequest) Descriptor
deprecated
func (*GetPaymentRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPaymentRequest.ProtoReflect.Descriptor instead.
func (*GetPaymentRequest) GetId ¶
func (x *GetPaymentRequest) GetId() int64
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
func (*GetPaymentRequest) Validate ¶
func (m *GetPaymentRequest) Validate() error
Validate checks the field values on GetPaymentRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetPaymentRequest) ValidateAll ¶
func (m *GetPaymentRequest) ValidateAll() error
ValidateAll checks the field values on GetPaymentRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetPaymentRequestMultiError, or nil if none found.
type GetPaymentRequestMultiError ¶
type GetPaymentRequestMultiError []error
GetPaymentRequestMultiError is an error wrapping multiple validation errors returned by GetPaymentRequest.ValidateAll() if the designated constraints aren't met.
func (GetPaymentRequestMultiError) AllErrors ¶
func (m GetPaymentRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetPaymentRequestMultiError) Error ¶
func (m GetPaymentRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetPaymentRequestValidationError ¶
type GetPaymentRequestValidationError struct {
// contains filtered or unexported fields
}
GetPaymentRequestValidationError is the validation error returned by GetPaymentRequest.Validate if the designated constraints aren't met.
func (GetPaymentRequestValidationError) Cause ¶
func (e GetPaymentRequestValidationError) Cause() error
Cause function returns cause value.
func (GetPaymentRequestValidationError) Error ¶
func (e GetPaymentRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetPaymentRequestValidationError) ErrorName ¶
func (e GetPaymentRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetPaymentRequestValidationError) Field ¶
func (e GetPaymentRequestValidationError) Field() string
Field function returns field value.
func (GetPaymentRequestValidationError) Key ¶
func (e GetPaymentRequestValidationError) Key() bool
Key function returns key value.
func (GetPaymentRequestValidationError) Reason ¶
func (e GetPaymentRequestValidationError) Reason() string
Reason function returns reason value.
type GetPaymentResponse ¶
type GetPaymentResponse struct {
Payment *Payment `protobuf:"bytes,1,opt,name=payment,proto3" json:"payment,omitempty"`
// contains filtered or unexported fields
}
Response returning the requested Payment record.
func (*GetPaymentResponse) Descriptor
deprecated
func (*GetPaymentResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetPaymentResponse.ProtoReflect.Descriptor instead.
func (*GetPaymentResponse) GetPayment ¶
func (x *GetPaymentResponse) GetPayment() *Payment
func (*GetPaymentResponse) ProtoMessage ¶
func (*GetPaymentResponse) ProtoMessage()
func (*GetPaymentResponse) ProtoReflect ¶
func (x *GetPaymentResponse) ProtoReflect() protoreflect.Message
func (*GetPaymentResponse) Reset ¶
func (x *GetPaymentResponse) Reset()
func (*GetPaymentResponse) String ¶
func (x *GetPaymentResponse) String() string
func (*GetPaymentResponse) Validate ¶
func (m *GetPaymentResponse) Validate() error
Validate checks the field values on GetPaymentResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetPaymentResponse) ValidateAll ¶
func (m *GetPaymentResponse) ValidateAll() error
ValidateAll checks the field values on GetPaymentResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetPaymentResponseMultiError, or nil if none found.
type GetPaymentResponseMultiError ¶
type GetPaymentResponseMultiError []error
GetPaymentResponseMultiError is an error wrapping multiple validation errors returned by GetPaymentResponse.ValidateAll() if the designated constraints aren't met.
func (GetPaymentResponseMultiError) AllErrors ¶
func (m GetPaymentResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetPaymentResponseMultiError) Error ¶
func (m GetPaymentResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetPaymentResponseValidationError ¶
type GetPaymentResponseValidationError struct {
// contains filtered or unexported fields
}
GetPaymentResponseValidationError is the validation error returned by GetPaymentResponse.Validate if the designated constraints aren't met.
func (GetPaymentResponseValidationError) Cause ¶
func (e GetPaymentResponseValidationError) Cause() error
Cause function returns cause value.
func (GetPaymentResponseValidationError) Error ¶
func (e GetPaymentResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetPaymentResponseValidationError) ErrorName ¶
func (e GetPaymentResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetPaymentResponseValidationError) Field ¶
func (e GetPaymentResponseValidationError) Field() string
Field function returns field value.
func (GetPaymentResponseValidationError) Key ¶
func (e GetPaymentResponseValidationError) Key() bool
Key function returns key value.
func (GetPaymentResponseValidationError) Reason ¶
func (e GetPaymentResponseValidationError) Reason() string
Reason function returns reason value.
type Payment ¶
type Payment struct {
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
OrderId int64 `protobuf:"varint,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Amount float64 `protobuf:"fixed64,4,opt,name=amount,proto3" json:"amount,omitempty"`
Currency string `protobuf:"bytes,5,opt,name=currency,proto3" json:"currency,omitempty"` // e.g. USD, EUR
Status PaymentStatus `protobuf:"varint,6,opt,name=status,proto3,enum=payment.v1.PaymentStatus" json:"status,omitempty"`
PaymentMethod string `protobuf:"bytes,7,opt,name=payment_method,json=paymentMethod,proto3" json:"payment_method,omitempty"` // e.g., "stripe", "credit_card"
TransactionId string `protobuf:"bytes,8,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // External gateway ID. Empty if pending/failed.
CreatedAt string `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
UpdatedAt string `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
Payment represents an attempt to charge a user for an order.
func (*Payment) Descriptor
deprecated
func (*Payment) GetCreatedAt ¶
func (*Payment) GetCurrency ¶
func (*Payment) GetOrderId ¶
func (*Payment) GetPaymentMethod ¶
func (*Payment) GetStatus ¶
func (x *Payment) GetStatus() PaymentStatus
func (*Payment) GetTransactionId ¶
func (*Payment) GetUpdatedAt ¶
func (*Payment) ProtoMessage ¶
func (*Payment) ProtoMessage()
func (*Payment) ProtoReflect ¶
func (x *Payment) ProtoReflect() protoreflect.Message
func (*Payment) Validate ¶
Validate checks the field values on Payment with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Payment) ValidateAll ¶
ValidateAll checks the field values on Payment with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PaymentMultiError, or nil if none found.
type PaymentMultiError ¶
type PaymentMultiError []error
PaymentMultiError is an error wrapping multiple validation errors returned by Payment.ValidateAll() if the designated constraints aren't met.
func (PaymentMultiError) AllErrors ¶
func (m PaymentMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PaymentMultiError) Error ¶
func (m PaymentMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PaymentServiceClient ¶
type PaymentServiceClient interface {
ProcessPayment(ctx context.Context, in *ProcessPaymentRequest, opts ...grpc.CallOption) (*ProcessPaymentResponse, error)
GetPayment(ctx context.Context, in *GetPaymentRequest, opts ...grpc.CallOption) (*GetPaymentResponse, 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.
PaymentService provides operations to process and retrieve financial transactions.
func NewPaymentServiceClient ¶
func NewPaymentServiceClient(cc grpc.ClientConnInterface) PaymentServiceClient
type PaymentServiceServer ¶
type PaymentServiceServer interface {
ProcessPayment(context.Context, *ProcessPaymentRequest) (*ProcessPaymentResponse, error)
GetPayment(context.Context, *GetPaymentRequest) (*GetPaymentResponse, error)
// contains filtered or unexported methods
}
PaymentServiceServer is the server API for PaymentService service. All implementations must embed UnimplementedPaymentServiceServer for forward compatibility.
PaymentService provides operations to process and retrieve financial transactions.
type PaymentStatus ¶
type PaymentStatus int32
Status of the payment transaction.
const ( PaymentStatus_PAYMENT_STATUS_UNSPECIFIED PaymentStatus = 0 PaymentStatus_PAYMENT_STATUS_PENDING PaymentStatus = 1 PaymentStatus_PAYMENT_STATUS_SUCCESS PaymentStatus = 2 PaymentStatus_PAYMENT_STATUS_FAILED PaymentStatus = 3 )
func (PaymentStatus) Descriptor ¶
func (PaymentStatus) Descriptor() protoreflect.EnumDescriptor
func (PaymentStatus) Enum ¶
func (x PaymentStatus) Enum() *PaymentStatus
func (PaymentStatus) EnumDescriptor
deprecated
func (PaymentStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use PaymentStatus.Descriptor instead.
func (PaymentStatus) Number ¶
func (x PaymentStatus) Number() protoreflect.EnumNumber
func (PaymentStatus) String ¶
func (x PaymentStatus) String() string
func (PaymentStatus) Type ¶
func (PaymentStatus) Type() protoreflect.EnumType
type PaymentValidationError ¶
type PaymentValidationError struct {
// contains filtered or unexported fields
}
PaymentValidationError is the validation error returned by Payment.Validate if the designated constraints aren't met.
func (PaymentValidationError) Cause ¶
func (e PaymentValidationError) Cause() error
Cause function returns cause value.
func (PaymentValidationError) Error ¶
func (e PaymentValidationError) Error() string
Error satisfies the builtin error interface
func (PaymentValidationError) ErrorName ¶
func (e PaymentValidationError) ErrorName() string
ErrorName returns error name.
func (PaymentValidationError) Field ¶
func (e PaymentValidationError) Field() string
Field function returns field value.
func (PaymentValidationError) Key ¶
func (e PaymentValidationError) Key() bool
Key function returns key value.
func (PaymentValidationError) Reason ¶
func (e PaymentValidationError) Reason() string
Reason function returns reason value.
type ProcessPaymentRequest ¶
type ProcessPaymentRequest struct {
OrderId int64 `protobuf:"varint,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Amount float64 `protobuf:"fixed64,3,opt,name=amount,proto3" json:"amount,omitempty"`
Currency string `protobuf:"bytes,4,opt,name=currency,proto3" json:"currency,omitempty"`
PaymentMethod string `protobuf:"bytes,5,opt,name=payment_method,json=paymentMethod,proto3" json:"payment_method,omitempty"`
// contains filtered or unexported fields
}
Request to charge a payment method for an order.
func (*ProcessPaymentRequest) Descriptor
deprecated
func (*ProcessPaymentRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProcessPaymentRequest.ProtoReflect.Descriptor instead.
func (*ProcessPaymentRequest) GetAmount ¶
func (x *ProcessPaymentRequest) GetAmount() float64
func (*ProcessPaymentRequest) GetCurrency ¶
func (x *ProcessPaymentRequest) GetCurrency() string
func (*ProcessPaymentRequest) GetOrderId ¶
func (x *ProcessPaymentRequest) GetOrderId() int64
func (*ProcessPaymentRequest) GetPaymentMethod ¶
func (x *ProcessPaymentRequest) GetPaymentMethod() string
func (*ProcessPaymentRequest) GetUserId ¶
func (x *ProcessPaymentRequest) GetUserId() int64
func (*ProcessPaymentRequest) ProtoMessage ¶
func (*ProcessPaymentRequest) ProtoMessage()
func (*ProcessPaymentRequest) ProtoReflect ¶
func (x *ProcessPaymentRequest) ProtoReflect() protoreflect.Message
func (*ProcessPaymentRequest) Reset ¶
func (x *ProcessPaymentRequest) Reset()
func (*ProcessPaymentRequest) String ¶
func (x *ProcessPaymentRequest) String() string
func (*ProcessPaymentRequest) Validate ¶
func (m *ProcessPaymentRequest) Validate() error
Validate checks the field values on ProcessPaymentRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ProcessPaymentRequest) ValidateAll ¶
func (m *ProcessPaymentRequest) ValidateAll() error
ValidateAll checks the field values on ProcessPaymentRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ProcessPaymentRequestMultiError, or nil if none found.
type ProcessPaymentRequestMultiError ¶
type ProcessPaymentRequestMultiError []error
ProcessPaymentRequestMultiError is an error wrapping multiple validation errors returned by ProcessPaymentRequest.ValidateAll() if the designated constraints aren't met.
func (ProcessPaymentRequestMultiError) AllErrors ¶
func (m ProcessPaymentRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ProcessPaymentRequestMultiError) Error ¶
func (m ProcessPaymentRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ProcessPaymentRequestValidationError ¶
type ProcessPaymentRequestValidationError struct {
// contains filtered or unexported fields
}
ProcessPaymentRequestValidationError is the validation error returned by ProcessPaymentRequest.Validate if the designated constraints aren't met.
func (ProcessPaymentRequestValidationError) Cause ¶
func (e ProcessPaymentRequestValidationError) Cause() error
Cause function returns cause value.
func (ProcessPaymentRequestValidationError) Error ¶
func (e ProcessPaymentRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ProcessPaymentRequestValidationError) ErrorName ¶
func (e ProcessPaymentRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ProcessPaymentRequestValidationError) Field ¶
func (e ProcessPaymentRequestValidationError) Field() string
Field function returns field value.
func (ProcessPaymentRequestValidationError) Key ¶
func (e ProcessPaymentRequestValidationError) Key() bool
Key function returns key value.
func (ProcessPaymentRequestValidationError) Reason ¶
func (e ProcessPaymentRequestValidationError) Reason() string
Reason function returns reason value.
type ProcessPaymentResponse ¶
type ProcessPaymentResponse struct {
Payment *Payment `protobuf:"bytes,1,opt,name=payment,proto3" json:"payment,omitempty"`
// contains filtered or unexported fields
}
Response mapping the newly created/processed Payment record.
func (*ProcessPaymentResponse) Descriptor
deprecated
func (*ProcessPaymentResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProcessPaymentResponse.ProtoReflect.Descriptor instead.
func (*ProcessPaymentResponse) GetPayment ¶
func (x *ProcessPaymentResponse) GetPayment() *Payment
func (*ProcessPaymentResponse) ProtoMessage ¶
func (*ProcessPaymentResponse) ProtoMessage()
func (*ProcessPaymentResponse) ProtoReflect ¶
func (x *ProcessPaymentResponse) ProtoReflect() protoreflect.Message
func (*ProcessPaymentResponse) Reset ¶
func (x *ProcessPaymentResponse) Reset()
func (*ProcessPaymentResponse) String ¶
func (x *ProcessPaymentResponse) String() string
func (*ProcessPaymentResponse) Validate ¶
func (m *ProcessPaymentResponse) Validate() error
Validate checks the field values on ProcessPaymentResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ProcessPaymentResponse) ValidateAll ¶
func (m *ProcessPaymentResponse) ValidateAll() error
ValidateAll checks the field values on ProcessPaymentResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ProcessPaymentResponseMultiError, or nil if none found.
type ProcessPaymentResponseMultiError ¶
type ProcessPaymentResponseMultiError []error
ProcessPaymentResponseMultiError is an error wrapping multiple validation errors returned by ProcessPaymentResponse.ValidateAll() if the designated constraints aren't met.
func (ProcessPaymentResponseMultiError) AllErrors ¶
func (m ProcessPaymentResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ProcessPaymentResponseMultiError) Error ¶
func (m ProcessPaymentResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ProcessPaymentResponseValidationError ¶
type ProcessPaymentResponseValidationError struct {
// contains filtered or unexported fields
}
ProcessPaymentResponseValidationError is the validation error returned by ProcessPaymentResponse.Validate if the designated constraints aren't met.
func (ProcessPaymentResponseValidationError) Cause ¶
func (e ProcessPaymentResponseValidationError) Cause() error
Cause function returns cause value.
func (ProcessPaymentResponseValidationError) Error ¶
func (e ProcessPaymentResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ProcessPaymentResponseValidationError) ErrorName ¶
func (e ProcessPaymentResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ProcessPaymentResponseValidationError) Field ¶
func (e ProcessPaymentResponseValidationError) Field() string
Field function returns field value.
func (ProcessPaymentResponseValidationError) Key ¶
func (e ProcessPaymentResponseValidationError) Key() bool
Key function returns key value.
func (ProcessPaymentResponseValidationError) Reason ¶
func (e ProcessPaymentResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedPaymentServiceServer ¶
type UnimplementedPaymentServiceServer struct{}
UnimplementedPaymentServiceServer must 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) GetPayment ¶
func (UnimplementedPaymentServiceServer) GetPayment(context.Context, *GetPaymentRequest) (*GetPaymentResponse, error)
func (UnimplementedPaymentServiceServer) ProcessPayment ¶
func (UnimplementedPaymentServiceServer) ProcessPayment(context.Context, *ProcessPaymentRequest) (*ProcessPaymentResponse, 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.