Refine the directory structure of this project.
This commit is contained in:
@ -11,6 +11,7 @@ import (
|
||||
"os"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"tank/rest/result"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -226,7 +227,7 @@ func (this *InstallController) validateTableMetaList(tableInfoList []*InstallTab
|
||||
}
|
||||
|
||||
//验证数据库连接
|
||||
func (this *InstallController) Verify(writer http.ResponseWriter, request *http.Request) *WebResult {
|
||||
func (this *InstallController) Verify(writer http.ResponseWriter, request *http.Request) *result.WebResult {
|
||||
|
||||
db := this.openDbConnection(writer, request)
|
||||
defer this.closeDbConnection(db)
|
||||
@ -239,7 +240,7 @@ func (this *InstallController) Verify(writer http.ResponseWriter, request *http.
|
||||
}
|
||||
|
||||
//获取需要安装的数据库表
|
||||
func (this *InstallController) TableInfoList(writer http.ResponseWriter, request *http.Request) *WebResult {
|
||||
func (this *InstallController) TableInfoList(writer http.ResponseWriter, request *http.Request) *result.WebResult {
|
||||
|
||||
db := this.openDbConnection(writer, request)
|
||||
defer this.closeDbConnection(db)
|
||||
@ -248,7 +249,7 @@ func (this *InstallController) TableInfoList(writer http.ResponseWriter, request
|
||||
}
|
||||
|
||||
//创建缺失数据库和表
|
||||
func (this *InstallController) CreateTable(writer http.ResponseWriter, request *http.Request) *WebResult {
|
||||
func (this *InstallController) CreateTable(writer http.ResponseWriter, request *http.Request) *result.WebResult {
|
||||
|
||||
var tableNames = []IBase{&Dashboard{}, &DownloadToken{}, &Footprint{}, &ImageCache{}, &Matter{}, &Preference{}, &Session{}, &UploadToken{}, &User{}}
|
||||
var installTableInfos []*InstallTableInfo
|
||||
@ -277,7 +278,7 @@ func (this *InstallController) CreateTable(writer http.ResponseWriter, request *
|
||||
}
|
||||
|
||||
//获取管理员列表(10条记录)
|
||||
func (this *InstallController) AdminList(writer http.ResponseWriter, request *http.Request) *WebResult {
|
||||
func (this *InstallController) AdminList(writer http.ResponseWriter, request *http.Request) *result.WebResult {
|
||||
|
||||
db := this.openDbConnection(writer, request)
|
||||
defer this.closeDbConnection(db)
|
||||
@ -295,7 +296,7 @@ func (this *InstallController) AdminList(writer http.ResponseWriter, request *ht
|
||||
}
|
||||
|
||||
//创建管理员
|
||||
func (this *InstallController) CreateAdmin(writer http.ResponseWriter, request *http.Request) *WebResult {
|
||||
func (this *InstallController) CreateAdmin(writer http.ResponseWriter, request *http.Request) *result.WebResult {
|
||||
|
||||
db := this.openDbConnection(writer, request)
|
||||
defer this.closeDbConnection(db)
|
||||
@ -356,7 +357,7 @@ func (this *InstallController) CreateAdmin(writer http.ResponseWriter, request *
|
||||
}
|
||||
|
||||
//(如果数据库中本身存在管理员了)验证管理员
|
||||
func (this *InstallController) ValidateAdmin(writer http.ResponseWriter, request *http.Request) *WebResult {
|
||||
func (this *InstallController) ValidateAdmin(writer http.ResponseWriter, request *http.Request) *result.WebResult {
|
||||
|
||||
db := this.openDbConnection(writer, request)
|
||||
defer this.closeDbConnection(db)
|
||||
@ -391,7 +392,7 @@ func (this *InstallController) ValidateAdmin(writer http.ResponseWriter, request
|
||||
}
|
||||
|
||||
//完成系统安装
|
||||
func (this *InstallController) Finish(writer http.ResponseWriter, request *http.Request) *WebResult {
|
||||
func (this *InstallController) Finish(writer http.ResponseWriter, request *http.Request) *result.WebResult {
|
||||
|
||||
mysqlPortStr := request.FormValue("mysqlPort")
|
||||
mysqlHost := request.FormValue("mysqlHost")
|
||||
|
Reference in New Issue
Block a user