feat: rbac迁移完成,并已部署至dev服务器
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"sundynix-micro-go/app/file/rpc/fileservice"
|
||||
"sundynix-micro-go/app/plant/api/internal/config"
|
||||
"sundynix-micro-go/app/plant/rpc/plantservice"
|
||||
"sundynix-micro-go/app/user/rpc/userservice"
|
||||
"sundynix-micro-go/app/system/rpc/systemservice"
|
||||
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
)
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
PlantRpc plantservice.PlantService
|
||||
UserRpc userservice.UserService
|
||||
UserRpc systemservice.SystemService
|
||||
FileRpc fileservice.FileService
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
PlantRpc: plantservice.NewPlantService(zrpc.MustNewClient(c.PlantRpc)),
|
||||
UserRpc: userservice.NewUserService(zrpc.MustNewClient(c.UserRpc)),
|
||||
UserRpc: systemservice.NewSystemService(zrpc.MustNewClient(c.UserRpc)),
|
||||
FileRpc: fileservice.NewFileService(zrpc.MustNewClient(c.FileRpc)),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,11 +166,11 @@ service plant-api {
|
||||
|
||||
@doc "更新植物"
|
||||
@handler UpdatePlant
|
||||
put /my/update (UpdatePlantReq)
|
||||
post /my/update (UpdatePlantReq)
|
||||
|
||||
@doc "删除植物"
|
||||
@handler DeletePlant
|
||||
delete /my/delete (IdsReq)
|
||||
post /my/delete (IdsReq)
|
||||
|
||||
@doc "我的植物列表"
|
||||
@handler GetMyPlantList
|
||||
@@ -240,7 +240,7 @@ service plant-api {
|
||||
|
||||
@doc "删除帖子"
|
||||
@handler DeletePost
|
||||
delete /post/delete (IdsReq)
|
||||
post /post/delete (IdsReq)
|
||||
|
||||
@doc "评论帖子"
|
||||
@handler CommentPost
|
||||
@@ -267,7 +267,7 @@ service plant-api {
|
||||
|
||||
@doc "删除话题"
|
||||
@handler DeleteTopic
|
||||
delete /topic/delete (IdsReq)
|
||||
post /topic/delete (IdsReq)
|
||||
}
|
||||
|
||||
@server (
|
||||
@@ -323,7 +323,7 @@ service plant-api {
|
||||
|
||||
@doc "更新用户资料"
|
||||
@handler UpdateUserProfile
|
||||
put /profile/update (UpdateProfileReq)
|
||||
post /profile/update (UpdateProfileReq)
|
||||
}
|
||||
|
||||
@server (
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
"sundynix-micro-go/app/plant/api/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/conf"
|
||||
"github.com/zeromicro/go-zero/core/stat"
|
||||
"github.com/zeromicro/go-zero/rest"
|
||||
)
|
||||
|
||||
@@ -19,6 +20,7 @@ var configFile = flag.String("f", "etc/plant-api.yaml", "the config file")
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
stat.DisableLog()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
"github.com/zeromicro/go-zero/core/conf"
|
||||
"github.com/zeromicro/go-zero/core/service"
|
||||
"github.com/zeromicro/go-zero/core/stat"
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/reflection"
|
||||
@@ -20,6 +21,7 @@ var configFile = flag.String("f", "etc/plant.yaml", "the config file")
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
stat.DisableLog()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
|
||||
Reference in New Issue
Block a user