service/vendor/codecreate/template/controller_center.txt

8 lines
645 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{}), 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)