app-cloudep-product-service/client/kyc_service/kyc_service.go

113 lines
4.9 KiB
Go
Raw Permalink Normal View History

2025-04-09 14:46:53 +00:00
// Code generated by goctl. DO NOT EDIT.
// goctl 1.8.1
// Source: product.proto
package kyc_service
import (
"context"
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
"github.com/zeromicro/go-zero/zrpc"
"google.golang.org/grpc"
)
type (
Category = product.Category
CategoryReq = product.CategoryReq
CreateCategoryReq = product.CreateCategoryReq
CreateKycReq = product.CreateKycReq
CreateProductItemRequest = product.CreateProductItemRequest
CreateTagsReq = product.CreateTagsReq
CustomField = product.CustomField
DeleteProductItemRequest = product.DeleteProductItemRequest
DeleteProductItemsByReferenceIDReq = product.DeleteProductItemsByReferenceIDReq
FindKycByIDReq = product.FindKycByIDReq
FindLatestKycByUIDReq = product.FindLatestKycByUIDReq
GetProductItemRequest = product.GetProductItemRequest
IncDecSalesCountRequest = product.IncDecSalesCountRequest
Kyc = product.Kyc
ListCategoryReq = product.ListCategoryReq
ListCategoryResp = product.ListCategoryResp
ListKycReq = product.ListKycReq
ListKycResp = product.ListKycResp
ListProductItemRequest = product.ListProductItemRequest
ListProductItemResponse = product.ListProductItemResponse
ListTagsReq = product.ListTagsReq
ListTagsResp = product.ListTagsResp
Media = product.Media
ModifyCategoryReq = product.ModifyCategoryReq
ModifyTagsReq = product.ModifyTagsReq
NoneReq = product.NoneReq
OKResp = product.OKResp
ProductItem = product.ProductItem
Tags = product.Tags
TagsReq = product.TagsReq
UpdateKycInfoReq = product.UpdateKycInfoReq
UpdateKycStatusReq = product.UpdateKycStatusReq
UpdateProductItemRequest = product.UpdateProductItemRequest
UpdateStatusRequest = product.UpdateStatusRequest
KycService interface {
// Create 建立 KYC 資料
Create(ctx context.Context, in *CreateKycReq, opts ...grpc.CallOption) (*OKResp, error)
// FindLatestByUID 根據使用者 UID 查詢最新 KYC 紀錄
FindLatestByUid(ctx context.Context, in *FindLatestKycByUIDReq, opts ...grpc.CallOption) (*Kyc, error)
// FindByID 根據 KYC ID 查詢
FindById(ctx context.Context, in *FindKycByIDReq, opts ...grpc.CallOption) (*Kyc, error)
// List 分頁查詢 Kyc 清單(後台審核用)
List(ctx context.Context, in *ListKycReq, opts ...grpc.CallOption) (*ListKycResp, error)
// UpdateStatus 更新 Kyc 審核狀態與原因
UpdateStatus(ctx context.Context, in *UpdateKycStatusReq, opts ...grpc.CallOption) (*OKResp, error)
// Update 更新使用者的 Kyc尚未審核
Update(ctx context.Context, in *UpdateKycInfoReq, opts ...grpc.CallOption) (*OKResp, error)
}
defaultKycService struct {
cli zrpc.Client
}
)
func NewKycService(cli zrpc.Client) KycService {
return &defaultKycService{
cli: cli,
}
}
// Create 建立 KYC 資料
func (m *defaultKycService) Create(ctx context.Context, in *CreateKycReq, opts ...grpc.CallOption) (*OKResp, error) {
client := product.NewKyc_ServiceClient(m.cli.Conn())
return client.Create(ctx, in, opts...)
}
// FindLatestByUID 根據使用者 UID 查詢最新 KYC 紀錄
func (m *defaultKycService) FindLatestByUid(ctx context.Context, in *FindLatestKycByUIDReq, opts ...grpc.CallOption) (*Kyc, error) {
client := product.NewKyc_ServiceClient(m.cli.Conn())
return client.FindLatestByUid(ctx, in, opts...)
}
// FindByID 根據 KYC ID 查詢
func (m *defaultKycService) FindById(ctx context.Context, in *FindKycByIDReq, opts ...grpc.CallOption) (*Kyc, error) {
client := product.NewKyc_ServiceClient(m.cli.Conn())
return client.FindById(ctx, in, opts...)
}
// List 分頁查詢 Kyc 清單(後台審核用)
func (m *defaultKycService) List(ctx context.Context, in *ListKycReq, opts ...grpc.CallOption) (*ListKycResp, error) {
client := product.NewKyc_ServiceClient(m.cli.Conn())
return client.List(ctx, in, opts...)
}
// UpdateStatus 更新 Kyc 審核狀態與原因
func (m *defaultKycService) UpdateStatus(ctx context.Context, in *UpdateKycStatusReq, opts ...grpc.CallOption) (*OKResp, error) {
client := product.NewKyc_ServiceClient(m.cli.Conn())
return client.UpdateStatus(ctx, in, opts...)
}
// Update 更新使用者的 Kyc尚未審核
func (m *defaultKycService) Update(ctx context.Context, in *UpdateKycInfoReq, opts ...grpc.CallOption) (*OKResp, error) {
client := product.NewKyc_ServiceClient(m.cli.Conn())
return client.Update(ctx, in, opts...)
}