47 lines
867 B
Go
47 lines
867 B
Go
package main
|
|
|
|
import (
|
|
"cs"
|
|
"f5"
|
|
"mt"
|
|
"q5"
|
|
"ss"
|
|
)
|
|
|
|
type App struct {
|
|
}
|
|
|
|
func (this *App) GetPkgName() string {
|
|
return "adminserver"
|
|
}
|
|
|
|
func (this *App) Init() {
|
|
f5.LoadMetaTable(mt.Table)
|
|
this.registerDataSources()
|
|
}
|
|
|
|
func (this *App) UnInit() {
|
|
}
|
|
|
|
func (this *App) Update() {
|
|
}
|
|
|
|
func (this *App) registerDataSources() {
|
|
f5.GetJsStyleDb().RegisterDataSource(
|
|
GAME_DB,
|
|
mt.Table.GameDb.GetById(0).GetHost(),
|
|
mt.Table.GameDb.GetById(0).GetPort(),
|
|
mt.Table.GameDb.GetById(0).GetUser(),
|
|
mt.Table.GameDb.GetById(0).GetPasswd(),
|
|
mt.Table.GameDb.GetById(0).GetDatabase(),
|
|
30)
|
|
f5.GetJsStyleDb().RegisterDataSource(
|
|
FRIEND_DB,
|
|
mt.Table.FriendDb.GetById(0).GetHost(),
|
|
mt.Table.FriendDb.GetById(0).GetPort(),
|
|
mt.Table.FriendDb.GetById(0).GetUser(),
|
|
mt.Table.FriendDb.GetById(0).GetPasswd(),
|
|
mt.Table.FriendDb.GetById(0).GetDatabase(),
|
|
30)
|
|
}
|