service/codecreate/template/controller_center.txt

8 lines
645 B
Plaintext
Raw Normal View History

2023-12-21 22:17:40 +08:00
#{moduleName}proto "service/api/proto/#{moduleName}/proto"
// #{EntityCNName}
op#{EntityName}Group := r.Group("/api/#{moduleName}", PrepareToC())
op#{EntityName}Group.POST("create", middleware.JSONParamValidator(#{moduleName}proto.OpCreateReq{}), OpCreate#{EntityName})
op#{EntityName}Group.POST("update", middleware.JSONParamValidator(#{moduleName}proto.OpUpdateReq{}), OpUpdate#{EntityName})
op#{EntityName}Group.POST("delete", middleware.JSONParamValidator(#{moduleName}proto.OpDeleteReq{}), OpDelete#{EntityName})
op#{EntityName}Group.POST("list", middleware.JSONParamValidator(#{moduleName}proto.OpListReq{}), OpGet#{EntityName}List)