feat: 初次启动
This commit is contained in:
@@ -14,112 +14,90 @@ import (
|
||||
)
|
||||
|
||||
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
|
||||
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 *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)
|
||||
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) (*AddCarePlanResp, error)
|
||||
AddCareRecord(ctx context.Context, in *AddCareRecordReq, opts ...grpc.CallOption) (*AddCareRecordResp, error)
|
||||
AddGrowthRecord(ctx context.Context, in *AddGrowthRecordReq, opts ...grpc.CallOption) (*AddGrowthRecordResp, 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 *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)
|
||||
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) (*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)
|
||||
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 *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)
|
||||
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 *GetExchangeItemListReq, opts ...grpc.CallOption) (*GetExchangeItemListResp, error)
|
||||
CreateExchangeOrder(ctx context.Context, in *CreateExchangeOrderReq, opts ...grpc.CallOption) (*CreateExchangeOrderResp, 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 {
|
||||
@@ -134,154 +112,149 @@ func NewPlantService(cli zrpc.Client) PlantService {
|
||||
}
|
||||
|
||||
// 用户Profile
|
||||
func (m *defaultPlantService) GetUserProfile(ctx context.Context, in *GetUserProfileReq, opts ...grpc.CallOption) (*GetUserProfileResp, error) {
|
||||
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 *UpdateUserProfileReq, opts ...grpc.CallOption) (*UpdateUserProfileResp, error) {
|
||||
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) 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) {
|
||||
// 我的植物
|
||||
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) (*UpdatePlantResp, error) {
|
||||
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 *DeletePlantReq, opts ...grpc.CallOption) (*DeletePlantResp, error) {
|
||||
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 *GetPlantListReq, opts ...grpc.CallOption) (*GetPlantListResp, error) {
|
||||
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 *GetPlantDetailReq, opts ...grpc.CallOption) (*GetPlantDetailResp, error) {
|
||||
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) (*AddCarePlanResp, error) {
|
||||
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) (*AddCareRecordResp, error) {
|
||||
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) (*AddGrowthRecordResp, error) {
|
||||
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 *GetWikiListReq, opts ...grpc.CallOption) (*GetWikiListResp, error) {
|
||||
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 *GetWikiDetailReq, opts ...grpc.CallOption) (*GetWikiDetailResp, error) {
|
||||
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 *Empty, opts ...grpc.CallOption) (*GetWikiClassListResp, error) {
|
||||
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) (*CreateWikiClassResp, error) {
|
||||
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) ToggleStar(ctx context.Context, in *ToggleStarReq, opts ...grpc.CallOption) (*ToggleStarResp, error) {
|
||||
func (m *defaultPlantService) ToggleWikiStar(ctx context.Context, in *ToggleStarReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := plant.NewPlantServiceClient(m.cli.Conn())
|
||||
return client.ToggleStar(ctx, in, opts...)
|
||||
return client.ToggleWikiStar(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 社区
|
||||
func (m *defaultPlantService) CreatePost(ctx context.Context, in *CreatePostReq, opts ...grpc.CallOption) (*CreatePostResp, error) {
|
||||
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) 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) {
|
||||
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) CommentPost(ctx context.Context, in *CommentPostReq, opts ...grpc.CallOption) (*CommentPostResp, error) {
|
||||
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) (*LikePostResp, error) {
|
||||
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 *Empty, opts ...grpc.CallOption) (*GetTopicListResp, error) {
|
||||
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) (*CreateTopicResp, error) {
|
||||
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 *DeleteTopicReq, opts ...grpc.CallOption) (*DeleteTopicResp, error) {
|
||||
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) 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) {
|
||||
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) (*CreateExchangeOrderResp, error) {
|
||||
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...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user