Refine the directory structure of this project.

This commit is contained in:
zicla
2019-04-24 19:36:10 +08:00
parent a353ff1303
commit daa5847859
22 changed files with 517 additions and 415 deletions

View File

@ -3,6 +3,7 @@ package rest
import (
"net/http"
"strconv"
"tank/rest/result"
)
type DashboardController struct {
@ -41,14 +42,14 @@ func (this *DashboardController) RegisterRoutes() map[string]func(writer http.Re
}
//过去七天分时调用量
func (this *DashboardController) InvokeList(writer http.ResponseWriter, request *http.Request) *WebResult {
func (this *DashboardController) InvokeList(writer http.ResponseWriter, request *http.Request) *result.WebResult {
return this.Success("")
}
//按照分页的方式获取某个图片缓存夹下图片缓存和子图片缓存夹的列表,通常情况下只有一页。
func (this *DashboardController) Page(writer http.ResponseWriter, request *http.Request) *WebResult {
func (this *DashboardController) Page(writer http.ResponseWriter, request *http.Request) *result.WebResult {
//如果是根目录那么就传入root.
pageStr := request.FormValue("page")
@ -96,7 +97,7 @@ func (this *DashboardController) Page(writer http.ResponseWriter, request *http.
}
func (this *DashboardController) ActiveIpTop10(writer http.ResponseWriter, request *http.Request) *WebResult {
func (this *DashboardController) ActiveIpTop10(writer http.ResponseWriter, request *http.Request) *result.WebResult {
list := this.dashboardDao.ActiveIpTop10()
return this.Success(list)
}