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

181 lines
7.9 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Code generated by goctl. DO NOT EDIT.
// goctl 1.8.1
// Source: product.proto
package product
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
CreateTagsReq = product.CreateTagsReq
FindKYCByIDReq = product.FindKYCByIDReq
FindLatestKYCByUIDReq = product.FindLatestKYCByUIDReq
KYC = product.KYC
ListCategoryReq = product.ListCategoryReq
ListCategoryResp = product.ListCategoryResp
ListKYCReq = product.ListKYCReq
ListKYCResp = product.ListKYCResp
ListTagsReq = product.ListTagsReq
ListTagsResp = product.ListTagsResp
ModifyCategoryReq = product.ModifyCategoryReq
ModifyTagsReq = product.ModifyTagsReq
NoneReq = product.NoneReq
OKResp = product.OKResp
Tags = product.Tags
TagsReq = product.TagsReq
UpdateKYCInfoReq = product.UpdateKYCInfoReq
UpdateKYCStatusReq = product.UpdateKYCStatusReq
Product interface {
// ====================== Category Service Start ======================
CreateCategory(ctx context.Context, in *CreateCategoryReq, opts ...grpc.CallOption) (*OKResp, error)
// ModifyCategory 修改 product 分類名稱
ModifyCategory(ctx context.Context, in *ModifyCategoryReq, opts ...grpc.CallOption) (*OKResp, error)
// DeleteCategory 刪除 product 分類
DeleteCategory(ctx context.Context, in *CategoryReq, opts ...grpc.CallOption) (*OKResp, error)
// GetCategory 取得 product 分類
GetCategory(ctx context.Context, in *CategoryReq, opts ...grpc.CallOption) (*Category, error)
// ListCategory 建立 product 分類
ListCategory(ctx context.Context, in *ListCategoryReq, opts ...grpc.CallOption) (*ListCategoryResp, error)
// ====================== Category Service End ======================
CreateTags(ctx context.Context, in *CreateTagsReq, opts ...grpc.CallOption) (*OKResp, error)
// ModifyTags 修改 tags
ModifyTags(ctx context.Context, in *ModifyTagsReq, opts ...grpc.CallOption) (*OKResp, error)
// DeleteTags 刪除tags
DeleteTags(ctx context.Context, in *TagsReq, opts ...grpc.CallOption) (*OKResp, error)
// GetTags 取得 tags
GetTags(ctx context.Context, in *TagsReq, opts ...grpc.CallOption) (*Tags, error)
// ListTags 建立 tags
ListTags(ctx context.Context, in *ListTagsReq, opts ...grpc.CallOption) (*ListTagsResp, error)
// ====================== Tags Service End ======================
CreateKYC(ctx context.Context, in *CreateKYCReq, opts ...grpc.CallOption) (*OKResp, error)
// FindLatestKYCByUID 根據使用者 UID 查詢最新 KYC 紀錄
FindLatestKYCByUID(ctx context.Context, in *FindLatestKYCByUIDReq, opts ...grpc.CallOption) (*KYC, error)
// FindKYCByID 根據 KYC ID 查詢
FindKYCByID(ctx context.Context, in *FindKYCByIDReq, opts ...grpc.CallOption) (*KYC, error)
// ListKYC 分頁查詢 KYC 清單(後台審核用)
ListKYC(ctx context.Context, in *ListKYCReq, opts ...grpc.CallOption) (*ListKYCResp, error)
// UpdateKYCStatus 更新 KYC 審核狀態與原因
UpdateKYCStatus(ctx context.Context, in *UpdateKYCStatusReq, opts ...grpc.CallOption) (*OKResp, error)
// UpdateKYCInfo 更新使用者的 KYC尚未審核
UpdateKYCInfo(ctx context.Context, in *UpdateKYCInfoReq, opts ...grpc.CallOption) (*OKResp, error)
}
defaultProduct struct {
cli zrpc.Client
}
)
func NewProduct(cli zrpc.Client) Product {
return &defaultProduct{
cli: cli,
}
}
// ====================== Category Service Start ======================
func (m *defaultProduct) CreateCategory(ctx context.Context, in *CreateCategoryReq, opts ...grpc.CallOption) (*OKResp, error) {
client := product.NewProductClient(m.cli.Conn())
return client.CreateCategory(ctx, in, opts...)
}
// ModifyCategory 修改 product 分類名稱
func (m *defaultProduct) ModifyCategory(ctx context.Context, in *ModifyCategoryReq, opts ...grpc.CallOption) (*OKResp, error) {
client := product.NewProductClient(m.cli.Conn())
return client.ModifyCategory(ctx, in, opts...)
}
// DeleteCategory 刪除 product 分類
func (m *defaultProduct) DeleteCategory(ctx context.Context, in *CategoryReq, opts ...grpc.CallOption) (*OKResp, error) {
client := product.NewProductClient(m.cli.Conn())
return client.DeleteCategory(ctx, in, opts...)
}
// GetCategory 取得 product 分類
func (m *defaultProduct) GetCategory(ctx context.Context, in *CategoryReq, opts ...grpc.CallOption) (*Category, error) {
client := product.NewProductClient(m.cli.Conn())
return client.GetCategory(ctx, in, opts...)
}
// ListCategory 建立 product 分類
func (m *defaultProduct) ListCategory(ctx context.Context, in *ListCategoryReq, opts ...grpc.CallOption) (*ListCategoryResp, error) {
client := product.NewProductClient(m.cli.Conn())
return client.ListCategory(ctx, in, opts...)
}
// ====================== Category Service End ======================
func (m *defaultProduct) CreateTags(ctx context.Context, in *CreateTagsReq, opts ...grpc.CallOption) (*OKResp, error) {
client := product.NewProductClient(m.cli.Conn())
return client.CreateTags(ctx, in, opts...)
}
// ModifyTags 修改 tags
func (m *defaultProduct) ModifyTags(ctx context.Context, in *ModifyTagsReq, opts ...grpc.CallOption) (*OKResp, error) {
client := product.NewProductClient(m.cli.Conn())
return client.ModifyTags(ctx, in, opts...)
}
// DeleteTags 刪除tags
func (m *defaultProduct) DeleteTags(ctx context.Context, in *TagsReq, opts ...grpc.CallOption) (*OKResp, error) {
client := product.NewProductClient(m.cli.Conn())
return client.DeleteTags(ctx, in, opts...)
}
// GetTags 取得 tags
func (m *defaultProduct) GetTags(ctx context.Context, in *TagsReq, opts ...grpc.CallOption) (*Tags, error) {
client := product.NewProductClient(m.cli.Conn())
return client.GetTags(ctx, in, opts...)
}
// ListTags 建立 tags
func (m *defaultProduct) ListTags(ctx context.Context, in *ListTagsReq, opts ...grpc.CallOption) (*ListTagsResp, error) {
client := product.NewProductClient(m.cli.Conn())
return client.ListTags(ctx, in, opts...)
}
// ====================== Tags Service End ======================
func (m *defaultProduct) CreateKYC(ctx context.Context, in *CreateKYCReq, opts ...grpc.CallOption) (*OKResp, error) {
client := product.NewProductClient(m.cli.Conn())
return client.CreateKYC(ctx, in, opts...)
}
// FindLatestKYCByUID 根據使用者 UID 查詢最新 KYC 紀錄
func (m *defaultProduct) FindLatestKYCByUID(ctx context.Context, in *FindLatestKYCByUIDReq, opts ...grpc.CallOption) (*KYC, error) {
client := product.NewProductClient(m.cli.Conn())
return client.FindLatestKYCByUID(ctx, in, opts...)
}
// FindKYCByID 根據 KYC ID 查詢
func (m *defaultProduct) FindKYCByID(ctx context.Context, in *FindKYCByIDReq, opts ...grpc.CallOption) (*KYC, error) {
client := product.NewProductClient(m.cli.Conn())
return client.FindKYCByID(ctx, in, opts...)
}
// ListKYC 分頁查詢 KYC 清單(後台審核用)
func (m *defaultProduct) ListKYC(ctx context.Context, in *ListKYCReq, opts ...grpc.CallOption) (*ListKYCResp, error) {
client := product.NewProductClient(m.cli.Conn())
return client.ListKYC(ctx, in, opts...)
}
// UpdateKYCStatus 更新 KYC 審核狀態與原因
func (m *defaultProduct) UpdateKYCStatus(ctx context.Context, in *UpdateKYCStatusReq, opts ...grpc.CallOption) (*OKResp, error) {
client := product.NewProductClient(m.cli.Conn())
return client.UpdateKYCStatus(ctx, in, opts...)
}
// UpdateKYCInfo 更新使用者的 KYC尚未審核
func (m *defaultProduct) UpdateKYCInfo(ctx context.Context, in *UpdateKYCInfoReq, opts ...grpc.CallOption) (*OKResp, error) {
client := product.NewProductClient(m.cli.Conn())
return client.UpdateKYCInfo(ctx, in, opts...)
}