173 lines
6.0 KiB
Go
173 lines
6.0 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.10.1
|
|
// Source: plant.proto
|
|
|
|
package server
|
|
|
|
import (
|
|
"context"
|
|
|
|
"sundynix-micro-go/app/plant/rpc/internal/logic"
|
|
"sundynix-micro-go/app/plant/rpc/internal/svc"
|
|
"sundynix-micro-go/app/plant/rpc/plant"
|
|
)
|
|
|
|
type PlantServiceServer struct {
|
|
svcCtx *svc.ServiceContext
|
|
plant.UnimplementedPlantServiceServer
|
|
}
|
|
|
|
func NewPlantServiceServer(svcCtx *svc.ServiceContext) *PlantServiceServer {
|
|
return &PlantServiceServer{
|
|
svcCtx: svcCtx,
|
|
}
|
|
}
|
|
|
|
// 用户Profile
|
|
func (s *PlantServiceServer) GetUserProfile(ctx context.Context, in *plant.GetProfileReq) (*plant.PlantUserProfile, error) {
|
|
l := logic.NewGetUserProfileLogic(ctx, s.svcCtx)
|
|
return l.GetUserProfile(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) UpdateUserProfile(ctx context.Context, in *plant.UpdateProfileReq) (*plant.CommonResp, error) {
|
|
l := logic.NewUpdateUserProfileLogic(ctx, s.svcCtx)
|
|
return l.UpdateUserProfile(in)
|
|
}
|
|
|
|
// 我的植物
|
|
func (s *PlantServiceServer) CreatePlant(ctx context.Context, in *plant.CreatePlantReq) (*plant.CommonResp, error) {
|
|
l := logic.NewCreatePlantLogic(ctx, s.svcCtx)
|
|
return l.CreatePlant(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) UpdatePlant(ctx context.Context, in *plant.UpdatePlantReq) (*plant.CommonResp, error) {
|
|
l := logic.NewUpdatePlantLogic(ctx, s.svcCtx)
|
|
return l.UpdatePlant(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) DeletePlant(ctx context.Context, in *plant.IdsReq) (*plant.CommonResp, error) {
|
|
l := logic.NewDeletePlantLogic(ctx, s.svcCtx)
|
|
return l.DeletePlant(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) GetPlantList(ctx context.Context, in *plant.PlantListReq) (*plant.PlantListResp, error) {
|
|
l := logic.NewGetPlantListLogic(ctx, s.svcCtx)
|
|
return l.GetPlantList(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) GetPlantDetail(ctx context.Context, in *plant.IdReq) (*plant.PlantDetailResp, error) {
|
|
l := logic.NewGetPlantDetailLogic(ctx, s.svcCtx)
|
|
return l.GetPlantDetail(in)
|
|
}
|
|
|
|
// 养护
|
|
func (s *PlantServiceServer) AddCarePlan(ctx context.Context, in *plant.AddCarePlanReq) (*plant.CommonResp, error) {
|
|
l := logic.NewAddCarePlanLogic(ctx, s.svcCtx)
|
|
return l.AddCarePlan(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) AddCareRecord(ctx context.Context, in *plant.AddCareRecordReq) (*plant.CommonResp, error) {
|
|
l := logic.NewAddCareRecordLogic(ctx, s.svcCtx)
|
|
return l.AddCareRecord(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) AddGrowthRecord(ctx context.Context, in *plant.AddGrowthRecordReq) (*plant.CommonResp, error) {
|
|
l := logic.NewAddGrowthRecordLogic(ctx, s.svcCtx)
|
|
return l.AddGrowthRecord(in)
|
|
}
|
|
|
|
// 百科
|
|
func (s *PlantServiceServer) GetWikiList(ctx context.Context, in *plant.WikiListReq) (*plant.WikiListResp, error) {
|
|
l := logic.NewGetWikiListLogic(ctx, s.svcCtx)
|
|
return l.GetWikiList(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) GetWikiDetail(ctx context.Context, in *plant.IdReq) (*plant.WikiDetailResp, error) {
|
|
l := logic.NewGetWikiDetailLogic(ctx, s.svcCtx)
|
|
return l.GetWikiDetail(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) GetWikiClassList(ctx context.Context, in *plant.IdReq) (*plant.WikiClassListResp, error) {
|
|
l := logic.NewGetWikiClassListLogic(ctx, s.svcCtx)
|
|
return l.GetWikiClassList(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) CreateWikiClass(ctx context.Context, in *plant.CreateWikiClassReq) (*plant.CommonResp, error) {
|
|
l := logic.NewCreateWikiClassLogic(ctx, s.svcCtx)
|
|
return l.CreateWikiClass(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) ToggleWikiStar(ctx context.Context, in *plant.ToggleStarReq) (*plant.CommonResp, error) {
|
|
l := logic.NewToggleWikiStarLogic(ctx, s.svcCtx)
|
|
return l.ToggleWikiStar(in)
|
|
}
|
|
|
|
// 社区
|
|
func (s *PlantServiceServer) CreatePost(ctx context.Context, in *plant.CreatePostReq) (*plant.CommonResp, error) {
|
|
l := logic.NewCreatePostLogic(ctx, s.svcCtx)
|
|
return l.CreatePost(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) DeletePost(ctx context.Context, in *plant.IdsReq) (*plant.CommonResp, error) {
|
|
l := logic.NewDeletePostLogic(ctx, s.svcCtx)
|
|
return l.DeletePost(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) GetPostList(ctx context.Context, in *plant.PostListReq) (*plant.PostListResp, error) {
|
|
l := logic.NewGetPostListLogic(ctx, s.svcCtx)
|
|
return l.GetPostList(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) GetPostDetail(ctx context.Context, in *plant.IdReq) (*plant.PostDetailResp, error) {
|
|
l := logic.NewGetPostDetailLogic(ctx, s.svcCtx)
|
|
return l.GetPostDetail(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) CommentPost(ctx context.Context, in *plant.CommentPostReq) (*plant.CommonResp, error) {
|
|
l := logic.NewCommentPostLogic(ctx, s.svcCtx)
|
|
return l.CommentPost(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) LikePost(ctx context.Context, in *plant.LikePostReq) (*plant.CommonResp, error) {
|
|
l := logic.NewLikePostLogic(ctx, s.svcCtx)
|
|
return l.LikePost(in)
|
|
}
|
|
|
|
// 话题
|
|
func (s *PlantServiceServer) GetTopicList(ctx context.Context, in *plant.IdReq) (*plant.TopicListResp, error) {
|
|
l := logic.NewGetTopicListLogic(ctx, s.svcCtx)
|
|
return l.GetTopicList(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) CreateTopic(ctx context.Context, in *plant.CreateTopicReq) (*plant.CommonResp, error) {
|
|
l := logic.NewCreateTopicLogic(ctx, s.svcCtx)
|
|
return l.CreateTopic(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) DeleteTopic(ctx context.Context, in *plant.IdsReq) (*plant.CommonResp, error) {
|
|
l := logic.NewDeleteTopicLogic(ctx, s.svcCtx)
|
|
return l.DeleteTopic(in)
|
|
}
|
|
|
|
// 兑换
|
|
func (s *PlantServiceServer) GetExchangeItemList(ctx context.Context, in *plant.ExchangeItemListReq) (*plant.ExchangeItemListResp, error) {
|
|
l := logic.NewGetExchangeItemListLogic(ctx, s.svcCtx)
|
|
return l.GetExchangeItemList(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) CreateExchangeOrder(ctx context.Context, in *plant.CreateExchangeOrderReq) (*plant.CommonResp, error) {
|
|
l := logic.NewCreateExchangeOrderLogic(ctx, s.svcCtx)
|
|
return l.CreateExchangeOrder(in)
|
|
}
|
|
|
|
// 配置
|
|
func (s *PlantServiceServer) GetLevelConfigList(ctx context.Context, in *plant.PageReq) (*plant.LevelConfigListResp, error) {
|
|
l := logic.NewGetLevelConfigListLogic(ctx, s.svcCtx)
|
|
return l.GetLevelConfigList(in)
|
|
}
|
|
|
|
func (s *PlantServiceServer) GetBadgeConfigList(ctx context.Context, in *plant.BadgeConfigListReq) (*plant.BadgeConfigListResp, error) {
|
|
l := logic.NewGetBadgeConfigListLogic(ctx, s.svcCtx)
|
|
return l.GetBadgeConfigList(in)
|
|
}
|