261 lines
12 KiB
Go
261 lines
12 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
|
|
AddCareRecordReq = plant.AddCareRecordReq
|
|
AddGrowthRecordReq = plant.AddGrowthRecordReq
|
|
BadgeConfigInfo = plant.BadgeConfigInfo
|
|
BadgeConfigListReq = plant.BadgeConfigListReq
|
|
BadgeConfigListResp = plant.BadgeConfigListResp
|
|
CarePlanInfo = plant.CarePlanInfo
|
|
CommentPostReq = plant.CommentPostReq
|
|
CommonResp = plant.CommonResp
|
|
CreateExchangeOrderReq = plant.CreateExchangeOrderReq
|
|
CreatePlantReq = plant.CreatePlantReq
|
|
CreatePostReq = plant.CreatePostReq
|
|
CreateTopicReq = plant.CreateTopicReq
|
|
CreateWikiClassReq = plant.CreateWikiClassReq
|
|
ExchangeItemInfo = plant.ExchangeItemInfo
|
|
ExchangeItemListReq = plant.ExchangeItemListReq
|
|
ExchangeItemListResp = plant.ExchangeItemListResp
|
|
GetProfileReq = plant.GetProfileReq
|
|
GrowthRecordInfo = plant.GrowthRecordInfo
|
|
IdReq = plant.IdReq
|
|
IdsReq = plant.IdsReq
|
|
LevelConfigInfo = plant.LevelConfigInfo
|
|
LevelConfigListResp = plant.LevelConfigListResp
|
|
LikePostReq = plant.LikePostReq
|
|
PageReq = plant.PageReq
|
|
PlantDetailResp = plant.PlantDetailResp
|
|
PlantInfo = plant.PlantInfo
|
|
PlantListReq = plant.PlantListReq
|
|
PlantListResp = plant.PlantListResp
|
|
PlantUserProfile = plant.PlantUserProfile
|
|
PostCommentInfo = plant.PostCommentInfo
|
|
PostDetailResp = plant.PostDetailResp
|
|
PostInfo = plant.PostInfo
|
|
PostListReq = plant.PostListReq
|
|
PostListResp = plant.PostListResp
|
|
ToggleStarReq = plant.ToggleStarReq
|
|
TopicInfo = plant.TopicInfo
|
|
TopicListResp = plant.TopicListResp
|
|
UpdatePlantReq = plant.UpdatePlantReq
|
|
UpdateProfileReq = plant.UpdateProfileReq
|
|
WikiClassInfo = plant.WikiClassInfo
|
|
WikiClassListResp = plant.WikiClassListResp
|
|
WikiDetailResp = plant.WikiDetailResp
|
|
WikiInfo = plant.WikiInfo
|
|
WikiListReq = plant.WikiListReq
|
|
WikiListResp = plant.WikiListResp
|
|
|
|
PlantService interface {
|
|
// 用户Profile
|
|
GetUserProfile(ctx context.Context, in *GetProfileReq, opts ...grpc.CallOption) (*PlantUserProfile, error)
|
|
UpdateUserProfile(ctx context.Context, in *UpdateProfileReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
// 我的植物
|
|
CreatePlant(ctx context.Context, in *CreatePlantReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
UpdatePlant(ctx context.Context, in *UpdatePlantReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
DeletePlant(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
GetPlantList(ctx context.Context, in *PlantListReq, opts ...grpc.CallOption) (*PlantListResp, error)
|
|
GetPlantDetail(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*PlantDetailResp, error)
|
|
// 养护
|
|
AddCarePlan(ctx context.Context, in *AddCarePlanReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
AddCareRecord(ctx context.Context, in *AddCareRecordReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
AddGrowthRecord(ctx context.Context, in *AddGrowthRecordReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
// 百科
|
|
GetWikiList(ctx context.Context, in *WikiListReq, opts ...grpc.CallOption) (*WikiListResp, error)
|
|
GetWikiDetail(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*WikiDetailResp, error)
|
|
GetWikiClassList(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*WikiClassListResp, error)
|
|
CreateWikiClass(ctx context.Context, in *CreateWikiClassReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
ToggleWikiStar(ctx context.Context, in *ToggleStarReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
// 社区
|
|
CreatePost(ctx context.Context, in *CreatePostReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
DeletePost(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
GetPostList(ctx context.Context, in *PostListReq, opts ...grpc.CallOption) (*PostListResp, error)
|
|
GetPostDetail(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*PostDetailResp, error)
|
|
CommentPost(ctx context.Context, in *CommentPostReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
LikePost(ctx context.Context, in *LikePostReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
// 话题
|
|
GetTopicList(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*TopicListResp, error)
|
|
CreateTopic(ctx context.Context, in *CreateTopicReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
DeleteTopic(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
// 兑换
|
|
GetExchangeItemList(ctx context.Context, in *ExchangeItemListReq, opts ...grpc.CallOption) (*ExchangeItemListResp, error)
|
|
CreateExchangeOrder(ctx context.Context, in *CreateExchangeOrderReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
// 配置
|
|
GetLevelConfigList(ctx context.Context, in *PageReq, opts ...grpc.CallOption) (*LevelConfigListResp, error)
|
|
GetBadgeConfigList(ctx context.Context, in *BadgeConfigListReq, opts ...grpc.CallOption) (*BadgeConfigListResp, 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 *GetProfileReq, opts ...grpc.CallOption) (*PlantUserProfile, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.GetUserProfile(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultPlantService) UpdateUserProfile(ctx context.Context, in *UpdateProfileReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.UpdateUserProfile(ctx, in, opts...)
|
|
}
|
|
|
|
// 我的植物
|
|
func (m *defaultPlantService) CreatePlant(ctx context.Context, in *CreatePlantReq, opts ...grpc.CallOption) (*CommonResp, 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) (*CommonResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.UpdatePlant(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultPlantService) DeletePlant(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.DeletePlant(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultPlantService) GetPlantList(ctx context.Context, in *PlantListReq, opts ...grpc.CallOption) (*PlantListResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.GetPlantList(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultPlantService) GetPlantDetail(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*PlantDetailResp, 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) (*CommonResp, 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) (*CommonResp, 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) (*CommonResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.AddGrowthRecord(ctx, in, opts...)
|
|
}
|
|
|
|
// 百科
|
|
func (m *defaultPlantService) GetWikiList(ctx context.Context, in *WikiListReq, opts ...grpc.CallOption) (*WikiListResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.GetWikiList(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultPlantService) GetWikiDetail(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*WikiDetailResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.GetWikiDetail(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultPlantService) GetWikiClassList(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*WikiClassListResp, 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) (*CommonResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.CreateWikiClass(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultPlantService) ToggleWikiStar(ctx context.Context, in *ToggleStarReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.ToggleWikiStar(ctx, in, opts...)
|
|
}
|
|
|
|
// 社区
|
|
func (m *defaultPlantService) CreatePost(ctx context.Context, in *CreatePostReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.CreatePost(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultPlantService) DeletePost(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.DeletePost(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultPlantService) GetPostList(ctx context.Context, in *PostListReq, opts ...grpc.CallOption) (*PostListResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.GetPostList(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultPlantService) GetPostDetail(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*PostDetailResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.GetPostDetail(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultPlantService) CommentPost(ctx context.Context, in *CommentPostReq, opts ...grpc.CallOption) (*CommonResp, 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) (*CommonResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.LikePost(ctx, in, opts...)
|
|
}
|
|
|
|
// 话题
|
|
func (m *defaultPlantService) GetTopicList(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*TopicListResp, 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) (*CommonResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.CreateTopic(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultPlantService) DeleteTopic(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.DeleteTopic(ctx, in, opts...)
|
|
}
|
|
|
|
// 兑换
|
|
func (m *defaultPlantService) GetExchangeItemList(ctx context.Context, in *ExchangeItemListReq, opts ...grpc.CallOption) (*ExchangeItemListResp, 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) (*CommonResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.CreateExchangeOrder(ctx, in, opts...)
|
|
}
|
|
|
|
// 配置
|
|
func (m *defaultPlantService) GetLevelConfigList(ctx context.Context, in *PageReq, opts ...grpc.CallOption) (*LevelConfigListResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.GetLevelConfigList(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultPlantService) GetBadgeConfigList(ctx context.Context, in *BadgeConfigListReq, opts ...grpc.CallOption) (*BadgeConfigListResp, error) {
|
|
client := plant.NewPlantServiceClient(m.cli.Conn())
|
|
return client.GetBadgeConfigList(ctx, in, opts...)
|
|
}
|