Files
sundynix-micro-be/app/plant/rpc/plantservice/plantService.go
T
2026-04-27 00:02:18 +08:00

288 lines
14 KiB
Go

// Code generated by goctl. DO NOT EDIT.
// goctl 1.10.1
// Source: plant.proto
package plantservice
import (
"context"
"sundynix-micro-go/app/plant/rpc/plant"
"github.com/zeromicro/go-zero/zrpc"
"google.golang.org/grpc"
)
type (
AddCarePlanReq = plant.AddCarePlanReq
AddCarePlanResp = plant.AddCarePlanResp
AddCareRecordReq = plant.AddCareRecordReq
AddCareRecordResp = plant.AddCareRecordResp
AddGrowthRecordReq = plant.AddGrowthRecordReq
AddGrowthRecordResp = plant.AddGrowthRecordResp
BadgeConfigInfo = plant.BadgeConfigInfo
CarePlanInfo = plant.CarePlanInfo
CommentPostReq = plant.CommentPostReq
CommentPostResp = plant.CommentPostResp
CreateExchangeOrderReq = plant.CreateExchangeOrderReq
CreateExchangeOrderResp = plant.CreateExchangeOrderResp
CreatePlantReq = plant.CreatePlantReq
CreatePlantResp = plant.CreatePlantResp
CreatePostReq = plant.CreatePostReq
CreatePostResp = plant.CreatePostResp
CreateTopicReq = plant.CreateTopicReq
CreateTopicResp = plant.CreateTopicResp
CreateWikiClassReq = plant.CreateWikiClassReq
CreateWikiClassResp = plant.CreateWikiClassResp
DeletePlantReq = plant.DeletePlantReq
DeletePlantResp = plant.DeletePlantResp
DeletePostReq = plant.DeletePostReq
DeletePostResp = plant.DeletePostResp
DeleteTopicReq = plant.DeleteTopicReq
DeleteTopicResp = plant.DeleteTopicResp
Empty = plant.Empty
ExchangeItemInfo = plant.ExchangeItemInfo
GetBadgeConfigListReq = plant.GetBadgeConfigListReq
GetBadgeConfigListResp = plant.GetBadgeConfigListResp
GetExchangeItemListReq = plant.GetExchangeItemListReq
GetExchangeItemListResp = plant.GetExchangeItemListResp
GetLevelConfigListReq = plant.GetLevelConfigListReq
GetLevelConfigListResp = plant.GetLevelConfigListResp
GetPlantDetailReq = plant.GetPlantDetailReq
GetPlantDetailResp = plant.GetPlantDetailResp
GetPlantListReq = plant.GetPlantListReq
GetPlantListResp = plant.GetPlantListResp
GetPostDetailReq = plant.GetPostDetailReq
GetPostDetailResp = plant.GetPostDetailResp
GetPostListReq = plant.GetPostListReq
GetPostListResp = plant.GetPostListResp
GetTopicListResp = plant.GetTopicListResp
GetUserProfileReq = plant.GetUserProfileReq
GetUserProfileResp = plant.GetUserProfileResp
GetWikiClassListResp = plant.GetWikiClassListResp
GetWikiDetailReq = plant.GetWikiDetailReq
GetWikiDetailResp = plant.GetWikiDetailResp
GetWikiListReq = plant.GetWikiListReq
GetWikiListResp = plant.GetWikiListResp
IncrUserCounterReq = plant.IncrUserCounterReq
IncrUserCounterResp = plant.IncrUserCounterResp
LevelConfigInfo = plant.LevelConfigInfo
LikePostReq = plant.LikePostReq
LikePostResp = plant.LikePostResp
PlantInfo = plant.PlantInfo
PostInfo = plant.PostInfo
ToggleStarReq = plant.ToggleStarReq
ToggleStarResp = plant.ToggleStarResp
TopicInfo = plant.TopicInfo
UpdatePlantReq = plant.UpdatePlantReq
UpdatePlantResp = plant.UpdatePlantResp
UpdateUserProfileReq = plant.UpdateUserProfileReq
UpdateUserProfileResp = plant.UpdateUserProfileResp
UserProfile = plant.UserProfile
WikiClassInfo = plant.WikiClassInfo
WikiInfo = plant.WikiInfo
PlantService interface {
// 用户Profile
GetUserProfile(ctx context.Context, in *GetUserProfileReq, opts ...grpc.CallOption) (*GetUserProfileResp, error)
UpdateUserProfile(ctx context.Context, in *UpdateUserProfileReq, opts ...grpc.CallOption) (*UpdateUserProfileResp, error)
IncrUserCounter(ctx context.Context, in *IncrUserCounterReq, opts ...grpc.CallOption) (*IncrUserCounterResp, error)
// 植物
CreatePlant(ctx context.Context, in *CreatePlantReq, opts ...grpc.CallOption) (*CreatePlantResp, error)
UpdatePlant(ctx context.Context, in *UpdatePlantReq, opts ...grpc.CallOption) (*UpdatePlantResp, error)
DeletePlant(ctx context.Context, in *DeletePlantReq, opts ...grpc.CallOption) (*DeletePlantResp, error)
GetPlantList(ctx context.Context, in *GetPlantListReq, opts ...grpc.CallOption) (*GetPlantListResp, error)
GetPlantDetail(ctx context.Context, in *GetPlantDetailReq, opts ...grpc.CallOption) (*GetPlantDetailResp, error)
// 养护
AddCarePlan(ctx context.Context, in *AddCarePlanReq, opts ...grpc.CallOption) (*AddCarePlanResp, error)
AddCareRecord(ctx context.Context, in *AddCareRecordReq, opts ...grpc.CallOption) (*AddCareRecordResp, error)
AddGrowthRecord(ctx context.Context, in *AddGrowthRecordReq, opts ...grpc.CallOption) (*AddGrowthRecordResp, error)
// 百科
GetWikiList(ctx context.Context, in *GetWikiListReq, opts ...grpc.CallOption) (*GetWikiListResp, error)
GetWikiDetail(ctx context.Context, in *GetWikiDetailReq, opts ...grpc.CallOption) (*GetWikiDetailResp, error)
GetWikiClassList(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetWikiClassListResp, error)
CreateWikiClass(ctx context.Context, in *CreateWikiClassReq, opts ...grpc.CallOption) (*CreateWikiClassResp, error)
ToggleStar(ctx context.Context, in *ToggleStarReq, opts ...grpc.CallOption) (*ToggleStarResp, error)
// 社区
CreatePost(ctx context.Context, in *CreatePostReq, opts ...grpc.CallOption) (*CreatePostResp, error)
GetPostList(ctx context.Context, in *GetPostListReq, opts ...grpc.CallOption) (*GetPostListResp, error)
GetPostDetail(ctx context.Context, in *GetPostDetailReq, opts ...grpc.CallOption) (*GetPostDetailResp, error)
DeletePost(ctx context.Context, in *DeletePostReq, opts ...grpc.CallOption) (*DeletePostResp, error)
CommentPost(ctx context.Context, in *CommentPostReq, opts ...grpc.CallOption) (*CommentPostResp, error)
LikePost(ctx context.Context, in *LikePostReq, opts ...grpc.CallOption) (*LikePostResp, error)
// 话题
GetTopicList(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetTopicListResp, error)
CreateTopic(ctx context.Context, in *CreateTopicReq, opts ...grpc.CallOption) (*CreateTopicResp, error)
DeleteTopic(ctx context.Context, in *DeleteTopicReq, opts ...grpc.CallOption) (*DeleteTopicResp, error)
// 配置
GetLevelConfigList(ctx context.Context, in *GetLevelConfigListReq, opts ...grpc.CallOption) (*GetLevelConfigListResp, error)
GetBadgeConfigList(ctx context.Context, in *GetBadgeConfigListReq, opts ...grpc.CallOption) (*GetBadgeConfigListResp, error)
// 兑换
GetExchangeItemList(ctx context.Context, in *GetExchangeItemListReq, opts ...grpc.CallOption) (*GetExchangeItemListResp, error)
CreateExchangeOrder(ctx context.Context, in *CreateExchangeOrderReq, opts ...grpc.CallOption) (*CreateExchangeOrderResp, error)
}
defaultPlantService struct {
cli zrpc.Client
}
)
func NewPlantService(cli zrpc.Client) PlantService {
return &defaultPlantService{
cli: cli,
}
}
// 用户Profile
func (m *defaultPlantService) GetUserProfile(ctx context.Context, in *GetUserProfileReq, opts ...grpc.CallOption) (*GetUserProfileResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.GetUserProfile(ctx, in, opts...)
}
func (m *defaultPlantService) UpdateUserProfile(ctx context.Context, in *UpdateUserProfileReq, opts ...grpc.CallOption) (*UpdateUserProfileResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.UpdateUserProfile(ctx, in, opts...)
}
func (m *defaultPlantService) IncrUserCounter(ctx context.Context, in *IncrUserCounterReq, opts ...grpc.CallOption) (*IncrUserCounterResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.IncrUserCounter(ctx, in, opts...)
}
// 植物
func (m *defaultPlantService) CreatePlant(ctx context.Context, in *CreatePlantReq, opts ...grpc.CallOption) (*CreatePlantResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.CreatePlant(ctx, in, opts...)
}
func (m *defaultPlantService) UpdatePlant(ctx context.Context, in *UpdatePlantReq, opts ...grpc.CallOption) (*UpdatePlantResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.UpdatePlant(ctx, in, opts...)
}
func (m *defaultPlantService) DeletePlant(ctx context.Context, in *DeletePlantReq, opts ...grpc.CallOption) (*DeletePlantResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.DeletePlant(ctx, in, opts...)
}
func (m *defaultPlantService) GetPlantList(ctx context.Context, in *GetPlantListReq, opts ...grpc.CallOption) (*GetPlantListResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.GetPlantList(ctx, in, opts...)
}
func (m *defaultPlantService) GetPlantDetail(ctx context.Context, in *GetPlantDetailReq, opts ...grpc.CallOption) (*GetPlantDetailResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.GetPlantDetail(ctx, in, opts...)
}
// 养护
func (m *defaultPlantService) AddCarePlan(ctx context.Context, in *AddCarePlanReq, opts ...grpc.CallOption) (*AddCarePlanResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.AddCarePlan(ctx, in, opts...)
}
func (m *defaultPlantService) AddCareRecord(ctx context.Context, in *AddCareRecordReq, opts ...grpc.CallOption) (*AddCareRecordResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.AddCareRecord(ctx, in, opts...)
}
func (m *defaultPlantService) AddGrowthRecord(ctx context.Context, in *AddGrowthRecordReq, opts ...grpc.CallOption) (*AddGrowthRecordResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.AddGrowthRecord(ctx, in, opts...)
}
// 百科
func (m *defaultPlantService) GetWikiList(ctx context.Context, in *GetWikiListReq, opts ...grpc.CallOption) (*GetWikiListResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.GetWikiList(ctx, in, opts...)
}
func (m *defaultPlantService) GetWikiDetail(ctx context.Context, in *GetWikiDetailReq, opts ...grpc.CallOption) (*GetWikiDetailResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.GetWikiDetail(ctx, in, opts...)
}
func (m *defaultPlantService) GetWikiClassList(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetWikiClassListResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.GetWikiClassList(ctx, in, opts...)
}
func (m *defaultPlantService) CreateWikiClass(ctx context.Context, in *CreateWikiClassReq, opts ...grpc.CallOption) (*CreateWikiClassResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.CreateWikiClass(ctx, in, opts...)
}
func (m *defaultPlantService) ToggleStar(ctx context.Context, in *ToggleStarReq, opts ...grpc.CallOption) (*ToggleStarResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.ToggleStar(ctx, in, opts...)
}
// 社区
func (m *defaultPlantService) CreatePost(ctx context.Context, in *CreatePostReq, opts ...grpc.CallOption) (*CreatePostResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.CreatePost(ctx, in, opts...)
}
func (m *defaultPlantService) GetPostList(ctx context.Context, in *GetPostListReq, opts ...grpc.CallOption) (*GetPostListResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.GetPostList(ctx, in, opts...)
}
func (m *defaultPlantService) GetPostDetail(ctx context.Context, in *GetPostDetailReq, opts ...grpc.CallOption) (*GetPostDetailResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.GetPostDetail(ctx, in, opts...)
}
func (m *defaultPlantService) DeletePost(ctx context.Context, in *DeletePostReq, opts ...grpc.CallOption) (*DeletePostResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.DeletePost(ctx, in, opts...)
}
func (m *defaultPlantService) CommentPost(ctx context.Context, in *CommentPostReq, opts ...grpc.CallOption) (*CommentPostResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.CommentPost(ctx, in, opts...)
}
func (m *defaultPlantService) LikePost(ctx context.Context, in *LikePostReq, opts ...grpc.CallOption) (*LikePostResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.LikePost(ctx, in, opts...)
}
// 话题
func (m *defaultPlantService) GetTopicList(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetTopicListResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.GetTopicList(ctx, in, opts...)
}
func (m *defaultPlantService) CreateTopic(ctx context.Context, in *CreateTopicReq, opts ...grpc.CallOption) (*CreateTopicResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.CreateTopic(ctx, in, opts...)
}
func (m *defaultPlantService) DeleteTopic(ctx context.Context, in *DeleteTopicReq, opts ...grpc.CallOption) (*DeleteTopicResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.DeleteTopic(ctx, in, opts...)
}
// 配置
func (m *defaultPlantService) GetLevelConfigList(ctx context.Context, in *GetLevelConfigListReq, opts ...grpc.CallOption) (*GetLevelConfigListResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.GetLevelConfigList(ctx, in, opts...)
}
func (m *defaultPlantService) GetBadgeConfigList(ctx context.Context, in *GetBadgeConfigListReq, opts ...grpc.CallOption) (*GetBadgeConfigListResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.GetBadgeConfigList(ctx, in, opts...)
}
// 兑换
func (m *defaultPlantService) GetExchangeItemList(ctx context.Context, in *GetExchangeItemListReq, opts ...grpc.CallOption) (*GetExchangeItemListResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.GetExchangeItemList(ctx, in, opts...)
}
func (m *defaultPlantService) CreateExchangeOrder(ctx context.Context, in *CreateExchangeOrderReq, opts ...grpc.CallOption) (*CreateExchangeOrderResp, error) {
client := plant.NewPlantServiceClient(m.cli.Conn())
return client.CreateExchangeOrder(ctx, in, opts...)
}