Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterPayHTTPServer(s *http.Server, srv PayHTTPServer)
- func RegisterPayServer(s grpc.ServiceRegistrar, srv PayServer)
- type GoPayReply
- type GoPayReplyMultiError
- type GoPayReplyValidationError
- type GoPayReq
- func (*GoPayReq) Descriptor() ([]byte, []int)deprecated
- func (x *GoPayReq) GetChannel() string
- func (x *GoPayReq) GetTransactionId() string
- func (*GoPayReq) ProtoMessage()
- func (x *GoPayReq) ProtoReflect() protoreflect.Message
- func (x *GoPayReq) Reset()
- func (x *GoPayReq) String() string
- func (m *GoPayReq) Validate() error
- func (m *GoPayReq) ValidateAll() error
- type GoPayReqMultiError
- type GoPayReqValidationError
- type PayClient
- type PayHTTPClient
- type PayHTTPClientImpl
- func (c *PayHTTPClientImpl) AsyncNotify(ctx context.Context, in *GoPayReq, opts ...http.CallOption) (*GoPayReply, error)
- func (c *PayHTTPClientImpl) GoPay(ctx context.Context, in *GoPayReq, opts ...http.CallOption) (*GoPayReply, error)
- func (c *PayHTTPClientImpl) QueryBill(ctx context.Context, in *GoPayReq, opts ...http.CallOption) (*GoPayReply, error)
- func (c *PayHTTPClientImpl) QueryRefund(ctx context.Context, in *GoPayReq, opts ...http.CallOption) (*GoPayReply, error)
- func (c *PayHTTPClientImpl) QuerySettle(ctx context.Context, in *GoPayReq, opts ...http.CallOption) (*GoPayReply, error)
- func (c *PayHTTPClientImpl) QueryTrade(ctx context.Context, in *GoPayReq, opts ...http.CallOption) (*GoPayReply, error)
- func (c *PayHTTPClientImpl) Refund(ctx context.Context, in *GoPayReq, opts ...http.CallOption) (*GoPayReply, error)
- func (c *PayHTTPClientImpl) SyncNotify(ctx context.Context, in *GoPayReq, opts ...http.CallOption) (*GoPayReply, error)
- type PayHTTPServer
- type PayServer
- type UnimplementedPayServer
- func (UnimplementedPayServer) AsyncNotify(context.Context, *GoPayReq) (*GoPayReply, error)
- func (UnimplementedPayServer) GoPay(context.Context, *GoPayReq) (*GoPayReply, error)
- func (UnimplementedPayServer) QueryBill(context.Context, *GoPayReq) (*GoPayReply, error)
- func (UnimplementedPayServer) QueryRefund(context.Context, *GoPayReq) (*GoPayReply, error)
- func (UnimplementedPayServer) QuerySettle(context.Context, *GoPayReq) (*GoPayReply, error)
- func (UnimplementedPayServer) QueryTrade(context.Context, *GoPayReq) (*GoPayReply, error)
- func (UnimplementedPayServer) Refund(context.Context, *GoPayReq) (*GoPayReply, error)
- func (UnimplementedPayServer) SyncNotify(context.Context, *GoPayReq) (*GoPayReply, error)
- type UnsafePayServer
Constants ¶
const OperationPayAsyncNotify = "/api.pay.service.v1.Pay/AsyncNotify"
const OperationPayGoPay = "/api.pay.service.v1.Pay/GoPay"
const OperationPayQueryBill = "/api.pay.service.v1.Pay/QueryBill"
const OperationPayQueryRefund = "/api.pay.service.v1.Pay/QueryRefund"
const OperationPayQuerySettle = "/api.pay.service.v1.Pay/QuerySettle"
const OperationPayQueryTrade = "/api.pay.service.v1.Pay/QueryTrade"
const OperationPayRefund = "/api.pay.service.v1.Pay/Refund"
const OperationPaySyncNotify = "/api.pay.service.v1.Pay/SyncNotify"
Variables ¶
var File_pay_interface_v1_pay_proto protoreflect.FileDescriptor
var Pay_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.pay.service.v1.Pay", HandlerType: (*PayServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GoPay", Handler: _Pay_GoPay_Handler, }, { MethodName: "Refund", Handler: _Pay_Refund_Handler, }, { MethodName: "AsyncNotify", Handler: _Pay_AsyncNotify_Handler, }, { MethodName: "SyncNotify", Handler: _Pay_SyncNotify_Handler, }, { MethodName: "QueryTrade", Handler: _Pay_QueryTrade_Handler, }, { MethodName: "QueryRefund", Handler: _Pay_QueryRefund_Handler, }, { MethodName: "QueryBill", Handler: _Pay_QueryBill_Handler, }, { MethodName: "QuerySettle", Handler: _Pay_QuerySettle_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pay/interface/v1/pay.proto", }
Pay_ServiceDesc is the grpc.ServiceDesc for Pay service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPayHTTPServer ¶
func RegisterPayHTTPServer(s *http.Server, srv PayHTTPServer)
func RegisterPayServer ¶
func RegisterPayServer(s grpc.ServiceRegistrar, srv PayServer)
Types ¶
type GoPayReply ¶
type GoPayReply struct {
// contains filtered or unexported fields
}
func (*GoPayReply) Descriptor
deprecated
func (*GoPayReply) Descriptor() ([]byte, []int)
Deprecated: Use GoPayReply.ProtoReflect.Descriptor instead.
func (*GoPayReply) ProtoMessage ¶
func (*GoPayReply) ProtoMessage()
func (*GoPayReply) ProtoReflect ¶
func (x *GoPayReply) ProtoReflect() protoreflect.Message
func (*GoPayReply) Reset ¶
func (x *GoPayReply) Reset()
func (*GoPayReply) String ¶
func (x *GoPayReply) String() string
func (*GoPayReply) Validate ¶
func (m *GoPayReply) Validate() error
Validate checks the field values on GoPayReply 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 (*GoPayReply) ValidateAll ¶
func (m *GoPayReply) ValidateAll() error
ValidateAll checks the field values on GoPayReply 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 GoPayReplyMultiError, or nil if none found.
type GoPayReplyMultiError ¶
type GoPayReplyMultiError []error
GoPayReplyMultiError is an error wrapping multiple validation errors returned by GoPayReply.ValidateAll() if the designated constraints aren't met.
func (GoPayReplyMultiError) AllErrors ¶
func (m GoPayReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GoPayReplyMultiError) Error ¶
func (m GoPayReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GoPayReplyValidationError ¶
type GoPayReplyValidationError struct {
// contains filtered or unexported fields
}
GoPayReplyValidationError is the validation error returned by GoPayReply.Validate if the designated constraints aren't met.
func (GoPayReplyValidationError) Cause ¶
func (e GoPayReplyValidationError) Cause() error
Cause function returns cause value.
func (GoPayReplyValidationError) Error ¶
func (e GoPayReplyValidationError) Error() string
Error satisfies the builtin error interface
func (GoPayReplyValidationError) ErrorName ¶
func (e GoPayReplyValidationError) ErrorName() string
ErrorName returns error name.
func (GoPayReplyValidationError) Field ¶
func (e GoPayReplyValidationError) Field() string
Field function returns field value.
func (GoPayReplyValidationError) Key ¶
func (e GoPayReplyValidationError) Key() bool
Key function returns key value.
func (GoPayReplyValidationError) Reason ¶
func (e GoPayReplyValidationError) Reason() string
Reason function returns reason value.
type GoPayReq ¶
type GoPayReq struct { Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"` TransactionId string `protobuf:"bytes,2,opt,name=transactionId,proto3" json:"transactionId,omitempty"` // contains filtered or unexported fields }
func (*GoPayReq) Descriptor
deprecated
func (*GoPayReq) GetChannel ¶
func (*GoPayReq) GetTransactionId ¶
func (*GoPayReq) ProtoMessage ¶
func (*GoPayReq) ProtoMessage()
func (*GoPayReq) ProtoReflect ¶
func (x *GoPayReq) ProtoReflect() protoreflect.Message
func (*GoPayReq) Validate ¶
Validate checks the field values on GoPayReq 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 (*GoPayReq) ValidateAll ¶
ValidateAll checks the field values on GoPayReq 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 GoPayReqMultiError, or nil if none found.
type GoPayReqMultiError ¶
type GoPayReqMultiError []error
GoPayReqMultiError is an error wrapping multiple validation errors returned by GoPayReq.ValidateAll() if the designated constraints aren't met.
func (GoPayReqMultiError) AllErrors ¶
func (m GoPayReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GoPayReqMultiError) Error ¶
func (m GoPayReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GoPayReqValidationError ¶
type GoPayReqValidationError struct {
// contains filtered or unexported fields
}
GoPayReqValidationError is the validation error returned by GoPayReq.Validate if the designated constraints aren't met.
func (GoPayReqValidationError) Cause ¶
func (e GoPayReqValidationError) Cause() error
Cause function returns cause value.
func (GoPayReqValidationError) Error ¶
func (e GoPayReqValidationError) Error() string
Error satisfies the builtin error interface
func (GoPayReqValidationError) ErrorName ¶
func (e GoPayReqValidationError) ErrorName() string
ErrorName returns error name.
func (GoPayReqValidationError) Field ¶
func (e GoPayReqValidationError) Field() string
Field function returns field value.
func (GoPayReqValidationError) Key ¶
func (e GoPayReqValidationError) Key() bool
Key function returns key value.
func (GoPayReqValidationError) Reason ¶
func (e GoPayReqValidationError) Reason() string
Reason function returns reason value.
type PayClient ¶
type PayClient interface { // 发起支付 GoPay(ctx context.Context, in *GoPayReq, opts ...grpc.CallOption) (*GoPayReply, error) // 发起退款 Refund(ctx context.Context, in *GoPayReq, opts ...grpc.CallOption) (*GoPayReply, error) // 接口异步通知 AsyncNotify(ctx context.Context, in *GoPayReq, opts ...grpc.CallOption) (*GoPayReply, error) // 接口同步通知 SyncNotify(ctx context.Context, in *GoPayReq, opts ...grpc.CallOption) (*GoPayReply, error) // 交易查询 QueryTrade(ctx context.Context, in *GoPayReq, opts ...grpc.CallOption) (*GoPayReply, error) // 退款查询 QueryRefund(ctx context.Context, in *GoPayReq, opts ...grpc.CallOption) (*GoPayReply, error) // 账单获取 QueryBill(ctx context.Context, in *GoPayReq, opts ...grpc.CallOption) (*GoPayReply, error) // 结算明细 QuerySettle(ctx context.Context, in *GoPayReq, opts ...grpc.CallOption) (*GoPayReply, error) }
PayClient is the client API for Pay 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 NewPayClient ¶
func NewPayClient(cc grpc.ClientConnInterface) PayClient
type PayHTTPClient ¶
type PayHTTPClient interface { AsyncNotify(ctx context.Context, req *GoPayReq, opts ...http.CallOption) (rsp *GoPayReply, err error) GoPay(ctx context.Context, req *GoPayReq, opts ...http.CallOption) (rsp *GoPayReply, err error) QueryBill(ctx context.Context, req *GoPayReq, opts ...http.CallOption) (rsp *GoPayReply, err error) QueryRefund(ctx context.Context, req *GoPayReq, opts ...http.CallOption) (rsp *GoPayReply, err error) QuerySettle(ctx context.Context, req *GoPayReq, opts ...http.CallOption) (rsp *GoPayReply, err error) QueryTrade(ctx context.Context, req *GoPayReq, opts ...http.CallOption) (rsp *GoPayReply, err error) Refund(ctx context.Context, req *GoPayReq, opts ...http.CallOption) (rsp *GoPayReply, err error) SyncNotify(ctx context.Context, req *GoPayReq, opts ...http.CallOption) (rsp *GoPayReply, err error) }
func NewPayHTTPClient ¶
func NewPayHTTPClient(client *http.Client) PayHTTPClient
type PayHTTPClientImpl ¶
type PayHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*PayHTTPClientImpl) AsyncNotify ¶
func (c *PayHTTPClientImpl) AsyncNotify(ctx context.Context, in *GoPayReq, opts ...http.CallOption) (*GoPayReply, error)
func (*PayHTTPClientImpl) GoPay ¶
func (c *PayHTTPClientImpl) GoPay(ctx context.Context, in *GoPayReq, opts ...http.CallOption) (*GoPayReply, error)
func (*PayHTTPClientImpl) QueryBill ¶
func (c *PayHTTPClientImpl) QueryBill(ctx context.Context, in *GoPayReq, opts ...http.CallOption) (*GoPayReply, error)
func (*PayHTTPClientImpl) QueryRefund ¶
func (c *PayHTTPClientImpl) QueryRefund(ctx context.Context, in *GoPayReq, opts ...http.CallOption) (*GoPayReply, error)
func (*PayHTTPClientImpl) QuerySettle ¶
func (c *PayHTTPClientImpl) QuerySettle(ctx context.Context, in *GoPayReq, opts ...http.CallOption) (*GoPayReply, error)
func (*PayHTTPClientImpl) QueryTrade ¶
func (c *PayHTTPClientImpl) QueryTrade(ctx context.Context, in *GoPayReq, opts ...http.CallOption) (*GoPayReply, error)
func (*PayHTTPClientImpl) Refund ¶
func (c *PayHTTPClientImpl) Refund(ctx context.Context, in *GoPayReq, opts ...http.CallOption) (*GoPayReply, error)
func (*PayHTTPClientImpl) SyncNotify ¶
func (c *PayHTTPClientImpl) SyncNotify(ctx context.Context, in *GoPayReq, opts ...http.CallOption) (*GoPayReply, error)
type PayHTTPServer ¶
type PayHTTPServer interface { // AsyncNotify 接口异步通知 AsyncNotify(context.Context, *GoPayReq) (*GoPayReply, error) // GoPay 发起支付 GoPay(context.Context, *GoPayReq) (*GoPayReply, error) // QueryBill 账单获取 QueryBill(context.Context, *GoPayReq) (*GoPayReply, error) // QueryRefund 退款查询 QueryRefund(context.Context, *GoPayReq) (*GoPayReply, error) // QuerySettle 结算明细 QuerySettle(context.Context, *GoPayReq) (*GoPayReply, error) // QueryTrade 交易查询 QueryTrade(context.Context, *GoPayReq) (*GoPayReply, error) // Refund 发起退款 Refund(context.Context, *GoPayReq) (*GoPayReply, error) // SyncNotify 接口同步通知 SyncNotify(context.Context, *GoPayReq) (*GoPayReply, error) }
type PayServer ¶
type PayServer interface { // 发起支付 GoPay(context.Context, *GoPayReq) (*GoPayReply, error) // 发起退款 Refund(context.Context, *GoPayReq) (*GoPayReply, error) // 接口异步通知 AsyncNotify(context.Context, *GoPayReq) (*GoPayReply, error) // 接口同步通知 SyncNotify(context.Context, *GoPayReq) (*GoPayReply, error) // 交易查询 QueryTrade(context.Context, *GoPayReq) (*GoPayReply, error) // 退款查询 QueryRefund(context.Context, *GoPayReq) (*GoPayReply, error) // 账单获取 QueryBill(context.Context, *GoPayReq) (*GoPayReply, error) // 结算明细 QuerySettle(context.Context, *GoPayReq) (*GoPayReply, error) // contains filtered or unexported methods }
PayServer is the server API for Pay service. All implementations must embed UnimplementedPayServer for forward compatibility
type UnimplementedPayServer ¶
type UnimplementedPayServer struct { }
UnimplementedPayServer must be embedded to have forward compatible implementations.
func (UnimplementedPayServer) AsyncNotify ¶
func (UnimplementedPayServer) AsyncNotify(context.Context, *GoPayReq) (*GoPayReply, error)
func (UnimplementedPayServer) GoPay ¶
func (UnimplementedPayServer) GoPay(context.Context, *GoPayReq) (*GoPayReply, error)
func (UnimplementedPayServer) QueryBill ¶
func (UnimplementedPayServer) QueryBill(context.Context, *GoPayReq) (*GoPayReply, error)
func (UnimplementedPayServer) QueryRefund ¶
func (UnimplementedPayServer) QueryRefund(context.Context, *GoPayReq) (*GoPayReply, error)
func (UnimplementedPayServer) QuerySettle ¶
func (UnimplementedPayServer) QuerySettle(context.Context, *GoPayReq) (*GoPayReply, error)
func (UnimplementedPayServer) QueryTrade ¶
func (UnimplementedPayServer) QueryTrade(context.Context, *GoPayReq) (*GoPayReply, error)
func (UnimplementedPayServer) Refund ¶
func (UnimplementedPayServer) Refund(context.Context, *GoPayReq) (*GoPayReply, error)
func (UnimplementedPayServer) SyncNotify ¶
func (UnimplementedPayServer) SyncNotify(context.Context, *GoPayReq) (*GoPayReply, error)
type UnsafePayServer ¶
type UnsafePayServer interface {
// contains filtered or unexported methods
}
UnsafePayServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PayServer will result in compilation errors.