service/codecreate/template/controller_center.txt

8 lines
769 B
Plaintext

#{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{}), middleware.JwtAuthenticator(), OpCreate#{EntityName})
op#{EntityName}Group.POST("update", middleware.JSONParamValidator(#{moduleName}proto.OpUpdateReq{}), middleware.JwtAuthenticator(), OpUpdate#{EntityName})
op#{EntityName}Group.POST("delete", middleware.JSONParamValidator(#{moduleName}proto.OpDeleteReq{}), middleware.JwtAuthenticator(), OpDelete#{EntityName})
op#{EntityName}Group.POST("list", middleware.JSONParamValidator(#{moduleName}proto.OpListReq{}), middleware.JwtAuthenticator(), OpGet#{EntityName}List)