refactor: structure of api-router directory

This commit is contained in:
0xJacky 2023-11-27 23:53:23 +08:00
parent d272f7900f
commit 50b4fbcda4
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0
38 changed files with 610 additions and 524 deletions

18
api/nginx/router.go Normal file
View file

@ -0,0 +1,18 @@
package nginx
import "github.com/gin-gonic/gin"
func InitRouter(r *gin.RouterGroup) {
r.POST("ngx/build_config", BuildNginxConfig)
r.POST("ngx/tokenize_config", TokenizeNginxConfig)
r.POST("ngx/format_code", FormatNginxConfig)
r.POST("nginx/reload", Reload)
r.POST("nginx/restart", Restart)
r.POST("nginx/test", Test)
r.GET("nginx/status", Status)
r.POST("nginx_log", GetNginxLogPage)
}
func InitNginxLogRouter(r *gin.RouterGroup) {
r.GET("nginx_log", NginxLog)
}