tianyuan-api-server/apps/sentinel/client/topup/topup.go

77 lines
3.2 KiB
Go

// Code generated by goctl. DO NOT EDIT.
// goctl 1.7.2
// Source: sentinel.proto
package topup
import (
"context"
"tianyuan-api/apps/sentinel/sentinel"
"github.com/zeromicro/go-zero/zrpc"
"google.golang.org/grpc"
)
type (
AliTopUpNotifyRequest = sentinel.AliTopUpNotifyRequest
AliTopUpNotifyResponse = sentinel.AliTopUpNotifyResponse
AliTopUpRequest = sentinel.AliTopUpRequest
AliTopUpResponse = sentinel.AliTopUpResponse
CreateProductRequest = sentinel.CreateProductRequest
CreateSecretRequest = sentinel.CreateSecretRequest
CreateUserProductRequest = sentinel.CreateUserProductRequest
CreateWhitelistRequest = sentinel.CreateWhitelistRequest
DeleteProductRequest = sentinel.DeleteProductRequest
DeleteSecretRequest = sentinel.DeleteSecretRequest
DeleteUserProductRequest = sentinel.DeleteUserProductRequest
DeleteWhitelistRequest = sentinel.DeleteWhitelistRequest
GetRecordByCodeRequest = sentinel.GetRecordByCodeRequest
GetRecordByIdRequest = sentinel.GetRecordByIdRequest
GetSecretBySecretIdRequest = sentinel.GetSecretBySecretIdRequest
MatchResponse = sentinel.MatchResponse
MatchWhitelistByIpRequest = sentinel.MatchWhitelistByIpRequest
MatchingUserIdProductCodeRequest = sentinel.MatchingUserIdProductCodeRequest
PageListRequest = sentinel.PageListRequest
Product = sentinel.Product
ProductResponse = sentinel.ProductResponse
Secret = sentinel.Secret
SecretResponse = sentinel.SecretResponse
UpdateProductRequest = sentinel.UpdateProductRequest
UpdateSecretRequest = sentinel.UpdateSecretRequest
UpdateUserProductRequest = sentinel.UpdateUserProductRequest
UpdateWhitelistRequest = sentinel.UpdateWhitelistRequest
UserProductEmptyResponse = sentinel.UserProductEmptyResponse
UserProductItem = sentinel.UserProductItem
UserProductResponse = sentinel.UserProductResponse
UserProuctPageListRequest = sentinel.UserProuctPageListRequest
WhitePageListRequest = sentinel.WhitePageListRequest
Whitelist = sentinel.Whitelist
WhitelistResponse = sentinel.WhitelistResponse
TopUp interface {
AliTopUp(ctx context.Context, in *AliTopUpRequest, opts ...grpc.CallOption) (*AliTopUpResponse, error)
AliTopUpNotify(ctx context.Context, in *AliTopUpNotifyRequest, opts ...grpc.CallOption) (*AliTopUpNotifyResponse, error)
}
defaultTopUp struct {
cli zrpc.Client
}
)
func NewTopUp(cli zrpc.Client) TopUp {
return &defaultTopUp{
cli: cli,
}
}
func (m *defaultTopUp) AliTopUp(ctx context.Context, in *AliTopUpRequest, opts ...grpc.CallOption) (*AliTopUpResponse, error) {
client := sentinel.NewTopUpClient(m.cli.Conn())
return client.AliTopUp(ctx, in, opts...)
}
func (m *defaultTopUp) AliTopUpNotify(ctx context.Context, in *AliTopUpNotifyRequest, opts ...grpc.CallOption) (*AliTopUpNotifyResponse, error) {
client := sentinel.NewTopUpClient(m.cli.Conn())
return client.AliTopUpNotify(ctx, in, opts...)
}