Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterPayHTTPServer(s *http.Server, srv PayHTTPServer)
- func RegisterPayServer(s grpc.ServiceRegistrar, srv PayServer)
- type AddMerchantPaymentConfigRequest
- func (*AddMerchantPaymentConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddMerchantPaymentConfigRequest) GetApiKey() string
- func (x *AddMerchantPaymentConfigRequest) GetAppId() string
- func (x *AddMerchantPaymentConfigRequest) GetCertPath() string
- func (x *AddMerchantPaymentConfigRequest) GetCompanyId() int64
- func (x *AddMerchantPaymentConfigRequest) GetDescription() string
- func (x *AddMerchantPaymentConfigRequest) GetMchId() string
- func (x *AddMerchantPaymentConfigRequest) GetMerchantId() int64
- func (x *AddMerchantPaymentConfigRequest) GetNotifyUrl() string
- func (x *AddMerchantPaymentConfigRequest) GetStatus() int32
- func (*AddMerchantPaymentConfigRequest) ProtoMessage()
- func (x *AddMerchantPaymentConfigRequest) ProtoReflect() protoreflect.Message
- func (x *AddMerchantPaymentConfigRequest) Reset()
- func (x *AddMerchantPaymentConfigRequest) String() string
- type DeleteMerchantPaymentConfigRequest
- func (*DeleteMerchantPaymentConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteMerchantPaymentConfigRequest) GetId() int64
- func (*DeleteMerchantPaymentConfigRequest) ProtoMessage()
- func (x *DeleteMerchantPaymentConfigRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteMerchantPaymentConfigRequest) Reset()
- func (x *DeleteMerchantPaymentConfigRequest) String() string
- type Empty
- type GetMerchantPaymentConfigRequest
- func (*GetMerchantPaymentConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetMerchantPaymentConfigRequest) GetId() int64
- func (*GetMerchantPaymentConfigRequest) ProtoMessage()
- func (x *GetMerchantPaymentConfigRequest) ProtoReflect() protoreflect.Message
- func (x *GetMerchantPaymentConfigRequest) Reset()
- func (x *GetMerchantPaymentConfigRequest) String() string
- type PayClient
- type PayHTTPClient
- type PayHTTPClientImpl
- func (c *PayHTTPClientImpl) AddMerchantPaymentConfig(ctx context.Context, in *AddMerchantPaymentConfigRequest, ...) (*Reply, error)
- func (c *PayHTTPClientImpl) DeleteMerchantPaymentConfig(ctx context.Context, in *DeleteMerchantPaymentConfigRequest, ...) (*Reply, error)
- func (c *PayHTTPClientImpl) GetMerchantPaymentConfig(ctx context.Context, in *GetMerchantPaymentConfigRequest, ...) (*Reply, error)
- type PayHTTPServer
- type PayServer
- type Reply
- type UnimplementedPayServer
- func (UnimplementedPayServer) AddMerchantPaymentConfig(context.Context, *AddMerchantPaymentConfigRequest) (*Reply, error)
- func (UnimplementedPayServer) DeleteMerchantPaymentConfig(context.Context, *DeleteMerchantPaymentConfigRequest) (*Reply, error)
- func (UnimplementedPayServer) GetMerchantPaymentConfig(context.Context, *GetMerchantPaymentConfigRequest) (*Reply, error)
- type UnsafePayServer
Constants ¶
const ( Pay_AddMerchantPaymentConfig_FullMethodName = "/api.pay.v1.Pay/AddMerchantPaymentConfig" Pay_GetMerchantPaymentConfig_FullMethodName = "/api.pay.v1.Pay/GetMerchantPaymentConfig" Pay_DeleteMerchantPaymentConfig_FullMethodName = "/api.pay.v1.Pay/DeleteMerchantPaymentConfig" )
const OperationPayAddMerchantPaymentConfig = "/api.pay.v1.Pay/AddMerchantPaymentConfig"
const OperationPayDeleteMerchantPaymentConfig = "/api.pay.v1.Pay/DeleteMerchantPaymentConfig"
const OperationPayGetMerchantPaymentConfig = "/api.pay.v1.Pay/GetMerchantPaymentConfig"
Variables ¶
var File_pay_v1_common_proto protoreflect.FileDescriptor
var File_pay_v1_pay_proto protoreflect.FileDescriptor
var Pay_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.pay.v1.Pay", HandlerType: (*PayServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddMerchantPaymentConfig", Handler: _Pay_AddMerchantPaymentConfig_Handler, }, { MethodName: "GetMerchantPaymentConfig", Handler: _Pay_GetMerchantPaymentConfig_Handler, }, { MethodName: "DeleteMerchantPaymentConfig", Handler: _Pay_DeleteMerchantPaymentConfig_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pay/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 AddMerchantPaymentConfigRequest ¶
type AddMerchantPaymentConfigRequest struct { MerchantId int64 `protobuf:"varint,1,opt,name=merchant_id,json=merchantId,proto3" json:"merchant_id,omitempty"` // 商户唯一标识 CompanyId int64 `protobuf:"varint,2,opt,name=company_id,json=companyId,proto3" json:"company_id,omitempty"` // 所属公司ID AppId string `protobuf:"bytes,3,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // 微信支付应用ID MchId string `protobuf:"bytes,4,opt,name=mch_id,json=mchId,proto3" json:"mch_id,omitempty"` // 微信支付商户号 ApiKey string `protobuf:"bytes,5,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` // 微信支付API密钥 CertPath string `protobuf:"bytes,6,opt,name=cert_path,json=certPath,proto3" json:"cert_path,omitempty"` // 微信支付证书路径 NotifyUrl string `protobuf:"bytes,7,opt,name=notify_url,json=notifyUrl,proto3" json:"notify_url,omitempty"` // 支付回调通知URL Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` // 支付参数描述 Status int32 `protobuf:"varint,9,opt,name=status,proto3" json:"status,omitempty"` // 状态: 1-启用, 0-禁用 // contains filtered or unexported fields }
请求添加支付配置的消息
func (*AddMerchantPaymentConfigRequest) Descriptor
deprecated
func (*AddMerchantPaymentConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddMerchantPaymentConfigRequest.ProtoReflect.Descriptor instead.
func (*AddMerchantPaymentConfigRequest) GetApiKey ¶
func (x *AddMerchantPaymentConfigRequest) GetApiKey() string
func (*AddMerchantPaymentConfigRequest) GetAppId ¶
func (x *AddMerchantPaymentConfigRequest) GetAppId() string
func (*AddMerchantPaymentConfigRequest) GetCertPath ¶
func (x *AddMerchantPaymentConfigRequest) GetCertPath() string
func (*AddMerchantPaymentConfigRequest) GetCompanyId ¶
func (x *AddMerchantPaymentConfigRequest) GetCompanyId() int64
func (*AddMerchantPaymentConfigRequest) GetDescription ¶
func (x *AddMerchantPaymentConfigRequest) GetDescription() string
func (*AddMerchantPaymentConfigRequest) GetMchId ¶
func (x *AddMerchantPaymentConfigRequest) GetMchId() string
func (*AddMerchantPaymentConfigRequest) GetMerchantId ¶
func (x *AddMerchantPaymentConfigRequest) GetMerchantId() int64
func (*AddMerchantPaymentConfigRequest) GetNotifyUrl ¶
func (x *AddMerchantPaymentConfigRequest) GetNotifyUrl() string
func (*AddMerchantPaymentConfigRequest) GetStatus ¶
func (x *AddMerchantPaymentConfigRequest) GetStatus() int32
func (*AddMerchantPaymentConfigRequest) ProtoMessage ¶
func (*AddMerchantPaymentConfigRequest) ProtoMessage()
func (*AddMerchantPaymentConfigRequest) ProtoReflect ¶
func (x *AddMerchantPaymentConfigRequest) ProtoReflect() protoreflect.Message
func (*AddMerchantPaymentConfigRequest) Reset ¶
func (x *AddMerchantPaymentConfigRequest) Reset()
func (*AddMerchantPaymentConfigRequest) String ¶
func (x *AddMerchantPaymentConfigRequest) String() string
type DeleteMerchantPaymentConfigRequest ¶
type DeleteMerchantPaymentConfigRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 配置ID // contains filtered or unexported fields }
请求删除支付配置的消息
func (*DeleteMerchantPaymentConfigRequest) Descriptor
deprecated
func (*DeleteMerchantPaymentConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteMerchantPaymentConfigRequest.ProtoReflect.Descriptor instead.
func (*DeleteMerchantPaymentConfigRequest) GetId ¶
func (x *DeleteMerchantPaymentConfigRequest) GetId() int64
func (*DeleteMerchantPaymentConfigRequest) ProtoMessage ¶
func (*DeleteMerchantPaymentConfigRequest) ProtoMessage()
func (*DeleteMerchantPaymentConfigRequest) ProtoReflect ¶
func (x *DeleteMerchantPaymentConfigRequest) ProtoReflect() protoreflect.Message
func (*DeleteMerchantPaymentConfigRequest) Reset ¶
func (x *DeleteMerchantPaymentConfigRequest) Reset()
func (*DeleteMerchantPaymentConfigRequest) String ¶
func (x *DeleteMerchantPaymentConfigRequest) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
空消息
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type GetMerchantPaymentConfigRequest ¶
type GetMerchantPaymentConfigRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 配置ID // contains filtered or unexported fields }
请求查询支付配置的消息
func (*GetMerchantPaymentConfigRequest) Descriptor
deprecated
func (*GetMerchantPaymentConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetMerchantPaymentConfigRequest.ProtoReflect.Descriptor instead.
func (*GetMerchantPaymentConfigRequest) GetId ¶
func (x *GetMerchantPaymentConfigRequest) GetId() int64
func (*GetMerchantPaymentConfigRequest) ProtoMessage ¶
func (*GetMerchantPaymentConfigRequest) ProtoMessage()
func (*GetMerchantPaymentConfigRequest) ProtoReflect ¶
func (x *GetMerchantPaymentConfigRequest) ProtoReflect() protoreflect.Message
func (*GetMerchantPaymentConfigRequest) Reset ¶
func (x *GetMerchantPaymentConfigRequest) Reset()
func (*GetMerchantPaymentConfigRequest) String ¶
func (x *GetMerchantPaymentConfigRequest) String() string
type PayClient ¶
type PayClient interface { AddMerchantPaymentConfig(ctx context.Context, in *AddMerchantPaymentConfigRequest, opts ...grpc.CallOption) (*Reply, error) GetMerchantPaymentConfig(ctx context.Context, in *GetMerchantPaymentConfigRequest, opts ...grpc.CallOption) (*Reply, error) DeleteMerchantPaymentConfig(ctx context.Context, in *DeleteMerchantPaymentConfigRequest, opts ...grpc.CallOption) (*Reply, 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 { AddMerchantPaymentConfig(ctx context.Context, req *AddMerchantPaymentConfigRequest, opts ...http.CallOption) (rsp *Reply, err error) DeleteMerchantPaymentConfig(ctx context.Context, req *DeleteMerchantPaymentConfigRequest, opts ...http.CallOption) (rsp *Reply, err error) GetMerchantPaymentConfig(ctx context.Context, req *GetMerchantPaymentConfigRequest, opts ...http.CallOption) (rsp *Reply, err error) }
func NewPayHTTPClient ¶
func NewPayHTTPClient(client *http.Client) PayHTTPClient
type PayHTTPClientImpl ¶
type PayHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*PayHTTPClientImpl) AddMerchantPaymentConfig ¶
func (c *PayHTTPClientImpl) AddMerchantPaymentConfig(ctx context.Context, in *AddMerchantPaymentConfigRequest, opts ...http.CallOption) (*Reply, error)
func (*PayHTTPClientImpl) DeleteMerchantPaymentConfig ¶
func (c *PayHTTPClientImpl) DeleteMerchantPaymentConfig(ctx context.Context, in *DeleteMerchantPaymentConfigRequest, opts ...http.CallOption) (*Reply, error)
func (*PayHTTPClientImpl) GetMerchantPaymentConfig ¶
func (c *PayHTTPClientImpl) GetMerchantPaymentConfig(ctx context.Context, in *GetMerchantPaymentConfigRequest, opts ...http.CallOption) (*Reply, error)
type PayHTTPServer ¶
type PayHTTPServer interface { AddMerchantPaymentConfig(context.Context, *AddMerchantPaymentConfigRequest) (*Reply, error) DeleteMerchantPaymentConfig(context.Context, *DeleteMerchantPaymentConfigRequest) (*Reply, error) GetMerchantPaymentConfig(context.Context, *GetMerchantPaymentConfigRequest) (*Reply, error) }
type PayServer ¶
type PayServer interface { AddMerchantPaymentConfig(context.Context, *AddMerchantPaymentConfigRequest) (*Reply, error) GetMerchantPaymentConfig(context.Context, *GetMerchantPaymentConfigRequest) (*Reply, error) DeleteMerchantPaymentConfig(context.Context, *DeleteMerchantPaymentConfigRequest) (*Reply, error) // contains filtered or unexported methods }
PayServer is the server API for Pay service. All implementations must embed UnimplementedPayServer for forward compatibility.
type Reply ¶
type Reply struct { StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` // 状态码 Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // 提示信息 Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // json字符串 // contains filtered or unexported fields }
func (*Reply) Descriptor
deprecated
func (*Reply) GetMessage ¶
func (*Reply) GetStatusCode ¶
func (*Reply) ProtoMessage ¶
func (*Reply) ProtoMessage()
func (*Reply) ProtoReflect ¶
func (x *Reply) ProtoReflect() protoreflect.Message
type UnimplementedPayServer ¶
type UnimplementedPayServer struct{}
UnimplementedPayServer 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 (UnimplementedPayServer) AddMerchantPaymentConfig ¶
func (UnimplementedPayServer) AddMerchantPaymentConfig(context.Context, *AddMerchantPaymentConfigRequest) (*Reply, error)
func (UnimplementedPayServer) DeleteMerchantPaymentConfig ¶
func (UnimplementedPayServer) DeleteMerchantPaymentConfig(context.Context, *DeleteMerchantPaymentConfigRequest) (*Reply, error)
func (UnimplementedPayServer) GetMerchantPaymentConfig ¶
func (UnimplementedPayServer) GetMerchantPaymentConfig(context.Context, *GetMerchantPaymentConfigRequest) (*Reply, 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.