INNER CODE UNIT · Go
func
donknap/dpanel · app/common/provider.go:29
func (provider *Provider) Register(httpServer *httpserver.Server) {
httpServer.RegisterRouters(func(engine *gin.Engine) {
cors := engine.Group(function.RouterRootApi(), common.CorsMiddleware{}.Process)
cors.POST("/common/attach/upload", controller.Attach{}.Upload)
cors.POST("/common/attach/delete", controller.Attach{}.Delete)
cors.GET("/common/attach/download", controller.Attach{}.Download)
// 仓库相关
cors.POST("/common/registry/create", controller.Registry{}.Create)
cors.POST("/common/registry/get-list", controller.Registry{}.GetList)
cors.POST("/common/registry/get-detail", controller.Registry{}.GetDetail)
cors.POST("/common/registry/delete", controller.Registry{}.Delete)
// 全局
cors.POST("/common/event/get-list", controller.Event{}.GetList)
cors.POST("/common/event/prune", controller.Event{}.Prune)