v1

package
v0.0.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const OperationPayAddMerchantPaymentConfig = "/api.pay.v1.Pay/AddMerchantPaymentConfig"
View Source
const OperationPayDeleteMerchantPaymentConfig = "/api.pay.v1.Pay/DeleteMerchantPaymentConfig"
View Source
const OperationPayGetMerchantPaymentConfig = "/api.pay.v1.Pay/GetMerchantPaymentConfig"

Variables

View Source
var File_pay_v1_common_proto protoreflect.FileDescriptor
View Source
var File_pay_v1_pay_proto protoreflect.FileDescriptor
View Source
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 (*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 (*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 (*AddMerchantPaymentConfigRequest) Reset

func (*AddMerchantPaymentConfigRequest) 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 (*DeleteMerchantPaymentConfigRequest) ProtoMessage

func (*DeleteMerchantPaymentConfigRequest) ProtoMessage()

func (*DeleteMerchantPaymentConfigRequest) ProtoReflect

func (*DeleteMerchantPaymentConfigRequest) Reset

func (*DeleteMerchantPaymentConfigRequest) String

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

空消息

func (*Empty) Descriptor deprecated

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

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 (*GetMerchantPaymentConfigRequest) ProtoMessage

func (*GetMerchantPaymentConfigRequest) ProtoMessage()

func (*GetMerchantPaymentConfigRequest) ProtoReflect

func (*GetMerchantPaymentConfigRequest) Reset

func (*GetMerchantPaymentConfigRequest) 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) Descriptor() ([]byte, []int)

Deprecated: Use Reply.ProtoReflect.Descriptor instead.

func (*Reply) GetData

func (x *Reply) GetData() string

func (*Reply) GetMessage

func (x *Reply) GetMessage() string

func (*Reply) GetStatusCode

func (x *Reply) GetStatusCode() int32

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) ProtoReflect

func (x *Reply) ProtoReflect() protoreflect.Message

func (*Reply) Reset

func (x *Reply) Reset()

func (*Reply) String

func (x *Reply) String() string

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) DeleteMerchantPaymentConfig

func (UnimplementedPayServer) GetMerchantPaymentConfig

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL