first commit

master
hwf452 1 year ago
parent 9f807b3a94
commit 6eab664b31

2
.gitignore vendored

@ -20,4 +20,6 @@
# Go workspace file
go.work
/weather/.idea
/weather/.idea/*

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/weather_go.iml" filepath="$PROJECT_DIR$/.idea/weather_go.iml" />
</modules>
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="Go" enabled="true" />
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="ALL" />
</component>
<component name="ChangeListManager">
<list default="true" id="1a45f57a-0fb3-419b-a062-e8f781e0dc0d" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="GOROOT" url="file://$USER_HOME$/sdk_go/go1.21.3" />
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="GoLibraries">
<option name="indexEntireGoPath" value="false" />
</component>
<component name="ProjectId" id="2thGS1XBiDc9NRPaoTyJhacjN2a" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="go.formatter.settings.were.checked" value="true" />
<property name="go.import.settings.migrated" value="true" />
<property name="go.modules.go.list.on.any.changes.was.set" value="true" />
<property name="go.sdk.automatically.set" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
<component name="VgoProject">
<integration-enabled>true</integration-enabled>
</component>
</project>

Binary file not shown.

BIN
weather/.DS_Store vendored

Binary file not shown.

@ -0,0 +1,119 @@
package apps
import (
"fmt"
"os"
"time"
"weather/models"
"weather/service"
"github.com/robfig/cron"
"github.com/astaxie/beego"
"github.com/astaxie/beego/logs"
"github.com/astaxie/beego/orm"
_ "github.com/astaxie/beego/session/mysql"
_ "github.com/go-sql-driver/mysql"
)
func init() {
initLogs()
initDatabase()
initSession()
initCron()
initCronWeather()
}
func initLogs() {
if beego.BConfig.RunMode == beego.DEV {
logs.SetLogger(logs.AdapterConsole, `{"level":7}`)
} else if beego.BConfig.RunMode == beego.PROD {
wd, _ := os.Getwd()
//dir := wd + "/logs/"
dir := wd + "\\logs\\"
_, err := os.Stat(dir)
if os.IsNotExist(err) {
os.Mkdir(dir, os.ModePerm)
}
conf := `{"filename": "` + dir + `sesame.log", "level":6, "maxdays":90, "separate":["emergency", "alert", "critical", "error", "warning", "notice", "info"]}`
fmt.Println(conf)
logs.SetLogger(logs.AdapterMultiFile, conf)
logs.EnableFuncCallDepth(true)
logs.Async()
}
}
func initDatabase() {
user := beego.AppConfig.String("mysqluser")
pw := beego.AppConfig.String("mysqlpass")
url := beego.AppConfig.String("mysqlurls")
db := beego.AppConfig.String("mysqldb")
params := beego.AppConfig.String("mysqlparams")
dataSource := fmt.Sprintf("%s:%s@tcp(%s)/%s?%s", user, pw, url, db, params)
maxIdle, _ := beego.AppConfig.Int("mysqlmaxIdle")
maxConn, _ := beego.AppConfig.Int("mysqlmaxConn")
logs.Debug(dataSource)
err := orm.RegisterDriver("mysql", orm.DRMySQL)
if err != nil {
logs.Error("注册数据库驱动失败!%v", err)
}
orm.RegisterModel(new(models.Account))
orm.RegisterModel(new(models.User), new(models.Post), new(models.Profile), new(models.Tag))
orm.RegisterModel(new(models.TyhoonActivity))
orm.RegisterModel(new(models.TyhoonListItem))
orm.RegisterModel(new(models.TyphoonInfo))
err = orm.RegisterDataBase("default", "mysql", dataSource, maxIdle, maxConn)
if err != nil {
logs.Error("注册数据库失败! %v", err)
}
orm.RunSyncdb("default", false, true)
orm.DefaultTimeLoc = time.UTC
logs.Notice("数据库注册成功: %s@%s", db, url)
if beego.AppConfig.String("runmode") == "dev" {
orm.Debug = true
}
orm.RunCommand()
}
func initSession() {
user := beego.AppConfig.String("mysqluser")
pw := beego.AppConfig.String("mysqlpass")
url := beego.AppConfig.String("mysqlurls")
db := beego.AppConfig.String("mysqldb")
params := beego.AppConfig.String("mysqlparams")
dataSource := fmt.Sprintf("%s:%s@tcp(%s)/%s?%s", user, pw, url, db, params)
beego.BConfig.WebConfig.Session.SessionOn = true
beego.BConfig.WebConfig.Session.SessionProvider = "mysql"
beego.BConfig.WebConfig.Session.SessionProviderConfig = dataSource
beego.BConfig.WebConfig.Session.SessionName = beego.AppConfig.String("SessionName")
beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 3600 * 24 * 7
beego.BConfig.WebConfig.Session.SessionCookieLifeTime = 3600 * 24 * 7
}
func initCron() {
c := cron.New()
spec := beego.AppConfig.String("syncFrequency")
c.AddFunc(spec, func() {
httpService := new(service.HttpService)
httpService.GetActivityTyhoon()
})
c.Start()
}
func initCronWeather() {
c := cron.New()
spec := beego.AppConfig.String("syncFrequencyWeather")
c.AddFunc(spec, func() {
httpWeatherService := new(service.HttpWeatherService)
httpWeatherService.GetNmcNowWeather()
})
c.Start()
}

@ -0,0 +1,119 @@
package apps
import (
"fmt"
"os"
"time"
"weather/models"
"weather/service"
"github.com/robfig/cron"
"github.com/astaxie/beego"
"github.com/astaxie/beego/logs"
"github.com/astaxie/beego/orm"
_ "github.com/astaxie/beego/session/mysql"
_ "github.com/go-sql-driver/mysql"
)
func init() {
//initLogs_oracle()
//initDatabase_oracle()
//initSession_oracle()
//initCron_oracle()
//initCronWeather_oracle()
}
func initLogs_oracle() {
if beego.BConfig.RunMode == beego.DEV {
logs.SetLogger(logs.AdapterConsole, `{"level":7}`)
} else if beego.BConfig.RunMode == beego.PROD {
wd, _ := os.Getwd()
dir := wd + "/logs/"
_, err := os.Stat(dir)
if os.IsNotExist(err) {
os.Mkdir(dir, os.ModePerm)
}
conf := `{"filename": "` + dir + `sesame.log", "level":6, "maxdays":90, "separate":["emergency", "alert", "critical", "error", "warning", "notice", "info"]}`
fmt.Println(conf)
logs.SetLogger(logs.AdapterMultiFile, conf)
logs.EnableFuncCallDepth(true)
logs.Async()
}
}
func initDatabase_oracle() {
user := beego.AppConfig.String("mysqluser")
pw := beego.AppConfig.String("mysqlpass")
url := beego.AppConfig.String("mysqlurls")
db := beego.AppConfig.String("mysqldb")
params := beego.AppConfig.String("mysqlparams")
dataSource := fmt.Sprintf("%s:%s@tcp(%s)/%s?%s", user, pw, url, db, params)
maxIdle, _ := beego.AppConfig.Int("mysqlmaxIdle")
maxConn, _ := beego.AppConfig.Int("mysqlmaxConn")
logs.Debug(dataSource)
err := orm.RegisterDriver("mysql", orm.DRMySQL)
if err != nil {
logs.Error("注册数据库驱动失败!%v", err)
}
orm.RegisterModel(new(models.Account))
orm.RegisterModel(new(models.User), new(models.Post), new(models.Profile), new(models.Tag))
orm.RegisterModel(new(models.TyhoonActivity))
orm.RegisterModel(new(models.TyhoonListItem))
orm.RegisterModel(new(models.TyphoonInfo))
err = orm.RegisterDataBase("default", "mysql", dataSource, maxIdle, maxConn)
if err != nil {
logs.Error("注册数据库失败! %v", err)
}
orm.RunSyncdb("default", false, true)
orm.DefaultTimeLoc = time.UTC
logs.Notice("数据库注册成功: %s@%s", db, url)
if beego.AppConfig.String("runmode") == "dev" {
orm.Debug = true
}
orm.RunCommand()
}
func initSession_oracle() {
user := beego.AppConfig.String("mysqluser")
pw := beego.AppConfig.String("mysqlpass")
url := beego.AppConfig.String("mysqlurls")
db := beego.AppConfig.String("mysqldb")
params := beego.AppConfig.String("mysqlparams")
dataSource := fmt.Sprintf("%s:%s@tcp(%s)/%s?%s", user, pw, url, db, params)
beego.BConfig.WebConfig.Session.SessionOn = true
beego.BConfig.WebConfig.Session.SessionProvider = "mysql"
beego.BConfig.WebConfig.Session.SessionProviderConfig = dataSource
beego.BConfig.WebConfig.Session.SessionName = beego.AppConfig.String("SessionName")
beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 3600 * 24 * 7
beego.BConfig.WebConfig.Session.SessionCookieLifeTime = 3600 * 24 * 7
}
func initCron_oracle() {
c := cron.New()
spec := beego.AppConfig.String("syncFrequency")
c.AddFunc(spec, func() {
httpService := new(service.HttpService)
httpService.GetActivityTyhoon()
})
c.Start()
}
func initCronWeather_oracle() {
c := cron.New()
spec := beego.AppConfig.String("syncFrequencyWeather")
c.AddFunc(spec, func() {
httpWeatherService := new(service.HttpWeatherService)
httpWeatherService.GetNmcNowWeather()
})
c.Start()
}

@ -0,0 +1,11 @@
#交叉编译打包不同平台的安装包
#linux
bee pack -be GOOSlinux GOARCH=amd64
bee pack -be GOOS=linux GOARCH=amd64
#windows
bee pack -be GOOSwindows GOARCH=amd64
bee pack -be GOOS=windows GOARCH=amd64

@ -0,0 +1,32 @@
appname = weather
ServerName = "beego"
#runmode = dev
runmode = prod
httpport = 8082
#mysqluser = "root"
#mysqlpass = "Skyinno251,"
#mysqlurls = "192.168.5.21:3306"
#mysqldb = "weather"
#mysqlparams = "charset=utf8&loc=Asia%2FShanghai"
#连接池空闲
#mysqlmaxIdle = 50
#连接池最大连接数 数据库默认链接数一般为512
#mysqlmaxConn = 300
SessionName = "beegosessionID"
syncFrequency = "0 */10 * * * *"
syncFrequencyWeather = "0 16 * * * *"
mysqluser = "root"
mysqlpass = "Skyinno251,"
mysqlurls = "192.168.2.18:3306"
mysqldb = "weather"
mysqlparams = "charset=utf8mb4&parseTime=True&loc=Local"
#连接池空闲
mysqlmaxIdle = 10
#连接池最大连接数 数据库默认链接数一般为512
mysqlmaxConn = 50

@ -0,0 +1,18 @@
package controllers
import (
"github.com/astaxie/beego"
)
type AdminController struct {
beego.Controller
}
func (this *AdminController) ShowAPIVersion() {
jsoninfo := this.GetString("id")
if jsoninfo == "" {
this.Ctx.WriteString("jsoninfo is empty")
return
}
this.Ctx.Output.Body([]byte("weather world"))
}

@ -0,0 +1,32 @@
package controllers
import (
"fmt"
"weather/models"
"github.com/astaxie/beego"
_ "github.com/astaxie/beego/session/mysql"
)
type CMSController struct {
beego.Controller
}
func (c *CMSController) Get() {
c.TplName = "form.tpl"
}
func (c *CMSController) Post() {
u := models.User{}
if err := c.ParseForm(&u); err != nil {
c.Ctx.WriteString("jsoninfo is empty")
return
}
fmt.Println(u.Name)
fmt.Println(u.Age)
fmt.Println(u.Email)
c.Ctx.Output.Body([]byte("heleo"))
}

@ -0,0 +1,21 @@
package controllers
import (
"fmt"
"weather/utils"
"github.com/astaxie/beego/context"
)
// 函数功能当访问的url不是login 时就跳转到/login这个url
func FilterUser(ctx *context.Context) {
ok := ctx.Input.Session(utils.GetSessName())
if ok == nil {
ctx.Redirect(302, "/")
fmt.Println("nil")
fmt.Println("未登录或Session已失效")
} else {
fmt.Println("已登录")
}
}

@ -0,0 +1,139 @@
package controllers
import (
"fmt"
"weather/models"
"weather/service"
"weather/utils"
"github.com/astaxie/beego"
_ "github.com/astaxie/beego/session/mysql"
"github.com/astaxie/beego/validation"
"github.com/prometheus/common/log"
)
type LoginController struct {
beego.Controller
}
func (c *LoginController) Get() {
c.TplName = "login.tpl"
}
func (c *LoginController) Regist() {
c.TplName = "regist.tpl"
}
func (c *LoginController) RegistSubmit() {
u := models.Account{}
if err := c.ParseForm(&u); err != nil {
c.Ctx.WriteString("jsoninfo is empty")
return
}
valid := validation.Validation{}
valid.Required(u.Username, "username")
valid.Required(u.Password, "password")
valid.MaxSize(u.Username, 35, "username")
valid.MinSize(u.Username, 5, "username")
valid.MaxSize(u.Password, 35, "password")
valid.MinSize(u.Password, 5, "password")
if valid.HasErrors() {
// 如果有错误信息,证明验证没通过
//c.TplName = "login.tpl"
log.Info("登录校验失败")
c.Redirect("/", 302)
return
}
fmt.Println(u.Username)
fmt.Println(u.Password)
accountService := new(service.AccountService)
loginSuccess := accountService.RegistAccount(u)
fmt.Println(loginSuccess)
//c.Ctx.Output.Cookie("uid", "235812")
//c.SetSession("uid", "235812")
//c.Ctx.Redirect(301, "/v1/main")
c.TplName = "login.tpl"
}
func (c *LoginController) SetSess(session int64) {
c.SetSession(getSessName(), session)
}
// GetSess 获取session返回userID和是否成功获取。若失败则表示需要重新登录
func (c *LoginController) GetSess() (int64, bool) {
if session := c.getSess(); session != nil {
if data, ok := session.(int64); ok {
return data, true
}
}
return 0, false
}
func (c *LoginController) DelSess() {
c.DelSession(getSessName())
c.DestroySession()
}
func (c *LoginController) ValidSessionUserID() (int64, error) {
if session := c.getSess(); session != nil {
if data, ok := session.(int64); ok {
return data, nil
}
}
return 0, utils.NewError(10000, "未登录")
}
func (c *LoginController) getSess() interface{} {
return c.GetSession(getSessName())
}
func getSessName() string {
return utils.GetSessName()
}
func (c *LoginController) Post() {
u := models.Account{}
if err := c.ParseForm(&u); err != nil {
c.Ctx.WriteString("jsoninfo is empty")
return
}
valid := validation.Validation{}
valid.Required(u.Username, "username")
valid.Required(u.Password, "password")
valid.MaxSize(u.Username, 35, "username")
valid.MinSize(u.Username, 5, "username")
valid.MaxSize(u.Password, 35, "password")
valid.MinSize(u.Password, 5, "password")
if valid.HasErrors() {
// 如果有错误信息,证明验证没通过
//c.TplName = "login.tpl"
log.Info("登录校验失败")
c.Redirect("/", 302)
return
}
fmt.Println(u.Username)
fmt.Println(u.Password)
accountService := new(service.AccountService)
accountResult := accountService.LoginAccount(u)
fmt.Println(accountResult)
if accountResult != nil {
fmt.Println("登录成功")
} else {
fmt.Println("登录失败")
c.Redirect("/", 302)
return
}
c.SetSess(int64(accountResult.Id))
fmt.Println(c.getSess())
//c.Ctx.Output.Cookie("uid", "235812")
//c.SetSession("uid", "235812")
//c.Ctx.Redirect(301, "/v1/main")
c.TplName = "success.tpl"
}

@ -0,0 +1,22 @@
package controllers
import (
"github.com/astaxie/beego"
)
type MainController struct {
beego.Controller
}
func (c *MainController) Get() {
c.Data["Website"] = "beego.me"
c.Data["Email"] = "astaxie@gmail.com"
c.TplName = "index.tpl"
}
//jQuery18309141550713421596
//jQuery1830003007103246306375
//1664035488620
//1664035488818
//1664037019973366000

@ -0,0 +1,14 @@
module weather
go 1.16
require github.com/astaxie/beego v1.12.3
require (
github.com/denisenkom/go-mssqldb v0.12.3 // indirect
github.com/go-sql-driver/mysql v1.6.0
github.com/prometheus/common v0.10.0
github.com/robfig/cron v1.2.0
github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 // indirect
github.com/smartystreets/goconvey v1.6.4
)

@ -0,0 +1,249 @@
github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0=
github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/OwnLocal/goes v1.0.0/go.mod h1:8rIFjBGTue3lCU0wplczcUgt9Gxgrkkrw7etMIcn8TM=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 h1:Hs82Z41s6SdL1CELW+XaDYmOH4hkBN4/N9og/AsOv7E=
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk=
github.com/astaxie/beego v1.12.1 h1:dfpuoxpzLVgclveAXe4PyNKqkzgm5zF4tgF2B3kkM2I=
github.com/astaxie/beego v1.12.1/go.mod h1:kPBWpSANNbSdIqOc8SUL9h+1oyBMZhROeYsXQDbidWQ=
github.com/astaxie/beego v1.12.3 h1:SAQkdD2ePye+v8Gn1r4X6IKZM1wd28EyUOVQ3PDSOOQ=
github.com/astaxie/beego v1.12.3/go.mod h1:p3qIm0Ryx7zeBHLljmd7omloyca1s4yu1a8kM1FkpIA=
github.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd/go.mod h1:1b+Y/CofkYwXMUU0OhQqGvsY2Bvgr4j6jfT699wyZKQ=
github.com/beego/x2j v0.0.0-20131220205130-a0352aadc542/go.mod h1:kSeGC/p1AbBiEp5kat81+DSQrZenVBZXklMLaELspWU=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60=
github.com/casbin/casbin v1.7.0/go.mod h1:c67qKN6Oum3UF5Q1+BByfFxkwKvhwW57ITjqwtzR1KE=
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80=
github.com/couchbase/go-couchbase v0.0.0-20181122212707-3e9b6e1258bb/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U=
github.com/couchbase/go-couchbase v0.0.0-20200519150804-63f3cdb75e0d/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U=
github.com/couchbase/gomemcached v0.0.0-20181122193126-5125a94a666c/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c=
github.com/couchbase/gomemcached v0.0.0-20200526233749-ec430f949808/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c=
github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs=
github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/denisenkom/go-mssqldb v0.12.3 h1:pBSGx9Tq67pBOTLmxNuirNTeB8Vjmf886Kx+8Y+8shw=
github.com/denisenkom/go-mssqldb v0.12.3/go.mod h1:k0mtMFOnU+AihqFxPMiF05rtiDrorD1Vrm1KEz5hxDo=
github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ=
github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
github.com/elastic/go-elasticsearch/v6 v6.8.5/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI=
github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c/go.mod h1:Gja1A+xZ9BoviGJNA2E9vFkPjjsl+CoJxSXiQM1UXtw=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-redis/redis v6.14.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A=
github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/ledisdb/ledisdb v0.0.0-20200510135210-d35789ec47e6/go.mod h1:n931TsDuKuq+uX4v1fulaMbA/7ZLLhjc85h7chZGBCQ=
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/peterh/liner v1.0.1-0.20171122030339-3681c2a91233/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc=
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.7.0 h1:wCi7urQOGBsYcQROHqpUUX4ct84xp40t9R9JX0FuA/U=
github.com/prometheus/client_golang v1.7.0/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc=
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8=
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg=
github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 h1:DAYUYH5869yV94zvCES9F51oYtN5oGlwjxJJz7ZCnik=
github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg=
github.com/siddontang/go v0.0.0-20170517070808-cb568a3e5cc0/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw=
github.com/siddontang/go v0.0.0-20180604090527-bdc77568d726/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw=
github.com/siddontang/goredis v0.0.0-20150324035039-760763f78400/go.mod h1:DDcKzU3qCuvj/tPnimWSsZZzvk9qvkvrIL5naVBPh5s=
github.com/siddontang/ledisdb v0.0.0-20181029004158-becf5f38d373/go.mod h1:mF1DpOSOUiJRMR+FDqaqu3EBqrybQtrDDszLUZ6oxPg=
github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec/go.mod h1:QBvMkMya+gXctz3kmljlUCu/yB3GZ6oee+dUozsezQE=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80=
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k=
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200117065230-39095c1d176c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

@ -0,0 +1 @@
{"/Users/wenfeihuang/go/src/weather/controllers":1664101902922601692}

@ -0,0 +1,60 @@
2025/02/28 21:22:03.460 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:22:03.466 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:30:41.603 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:30:41.608 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:31:34.013 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:31:34.019 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:31:34.719 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:31:34.725 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:31:35.529 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:31:35.535 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:31:36.345 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:31:36.350 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:31:37.094 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:31:37.100 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:31:37.811 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:31:37.817 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:31:38.609 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:31:38.613 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:32:10.278 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:32:10.282 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:32:56.975 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:32:56.980 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:33:35.070 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:33:35.077 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:33:35.817 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:33:35.823 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:33:36.610 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:33:36.618 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:33:37.330 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:33:37.336 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:33:38.062 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:33:38.067 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:34:43.092 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:34:43.101 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:34:43.922 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:34:43.927 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:34:47.018 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:34:47.023 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:34:52.752 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:34:52.758 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:34:53.492 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:34:53.497 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:34:54.287 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:34:54.294 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:35:13.567 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:35:13.572 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:35:20.124 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:35:20.131 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:35:20.899 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:35:20.904 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:36:47.607 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:36:47.613 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:37:06.642 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:37:06.647 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:37:52.159 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:37:52.164 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:39:15.939 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:39:15.944 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:41:32.423 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:41:32.427 [I] [asm_amd64.s:1650] http server Running on http://:8082

@ -0,0 +1,30 @@
2025/02/28 21:22:03.466 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:30:41.608 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:31:34.019 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:31:34.725 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:31:35.535 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:31:36.350 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:31:37.100 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:31:37.817 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:31:38.613 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:32:10.282 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:32:56.980 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:33:35.077 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:33:35.823 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:33:36.618 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:33:37.336 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:33:38.067 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:34:43.101 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:34:43.927 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:34:47.023 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:34:52.758 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:34:53.497 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:34:54.294 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:35:13.572 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:35:20.131 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:35:20.904 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:36:47.613 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:37:06.647 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:37:52.164 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:39:15.944 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/02/28 21:41:32.427 [I] [asm_amd64.s:1650] http server Running on http://:8082

@ -0,0 +1,2 @@
2025/03/01 09:16:03.273 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/03/01 09:16:19.037 [I] [asm_amd64.s:1650] http server Running on http://:8082

@ -0,0 +1,4 @@
2025/03/01 09:16:03.266 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/03/01 09:16:03.273 [I] [asm_amd64.s:1650] http server Running on http://:8082
2025/03/01 09:16:19.032 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/03/01 09:16:19.037 [I] [asm_amd64.s:1650] http server Running on http://:8082

@ -0,0 +1,30 @@
2025/02/28 21:22:03.460 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:30:41.603 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:31:34.013 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:31:34.719 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:31:35.529 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:31:36.345 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:31:37.094 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:31:37.811 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:31:38.609 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:32:10.278 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:32:56.975 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:33:35.070 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:33:35.817 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:33:36.610 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:33:37.330 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:33:38.062 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:34:43.092 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:34:43.922 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:34:47.018 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:34:52.752 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:34:53.492 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:34:54.287 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:35:13.567 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:35:20.124 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:35:20.899 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:36:47.607 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:37:06.642 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:37:52.159 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:39:15.939 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/02/28 21:41:32.423 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306

@ -0,0 +1,2 @@
2025/03/01 09:16:03.266 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306
2025/03/01 09:16:19.032 [N] [initialize.go:21] 数据库注册成功: weather@192.168.2.18:3306

@ -0,0 +1,16 @@
package main
import (
_ "weather/apps"
_ "weather/routers"
"github.com/astaxie/beego"
)
func main() {
//开启Session 用memory保存
//beego.BConfig.WebConfig.Session.SessionOn = true
//beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 60
//beego.BConfig.WebConfig.Session.SessionCookieLifeTime = 60
beego.Run()
}

@ -0,0 +1,26 @@
package models
import (
"github.com/astaxie/beego/orm"
"time"
)
type NmcCity struct {
Code string `json:"code" orm:"pk;column(code);size(255)"`
City string `json:"city" orm:"column(city);size(255)"`
Province string `json:"province" orm:"column(province);size(255)"`
Url string `json:"url" orm:"column(url);size(255)"`
CreateDate time.Time `json:"createDate" orm:"column(create_date);auto_now_add;type(datetime)"`
LastUpdateDate time.Time `json:"lastUpdateDate" orm:"column(last_update_date);auto_now;type(datetime)"`
}
func init() {
orm.RegisterModel(new(NmcCity))
}
func GetNmcCityList() []*NmcCity {
items := make([]*NmcCity, 0)
orm.NewOrm().QueryTable(new(NmcCity)).All(&items)
return items
}

@ -0,0 +1,29 @@
package models
import (
"github.com/astaxie/beego/orm"
"time"
)
type NmcNowWeather struct {
Id int64 `json:"id" orm:"pk;auto;column(id);size(20)"`
Code string `json:"code" orm:"column(code);size(255)"`
Weather string `json:"weather" orm:"column(weather);type(text)"`
WeatherDate string `json:"weatherDate" orm:"column(weather_date);size(255)"`
CreateDate time.Time `json:"createDate" orm:"column(create_date);auto_now_add;type(datetime)"`
LastUpdateDate time.Time `json:"lastUpdateDate" orm:"column(last_update_date);auto_now;type(datetime)"`
}
func init() {
orm.RegisterModel(new(NmcNowWeather))
}
func AddNmcNowWeather(item *NmcNowWeather) (int64, error) {
return orm.NewOrm().Insert(item)
}
func GetNmcNowWeatherList() []*NmcNowWeather {
items := make([]*NmcNowWeather, 0)
orm.NewOrm().QueryTable(new(NmcNowWeather)).All(&items)
return items
}

@ -0,0 +1,47 @@
package models
import (
"github.com/astaxie/beego/orm"
)
type TyhoonActivity struct {
Enname string `json:"enname" orm:"size(20)"`
Lat string `json:"lat" orm:"size(20)"`
Lng string `json:"lng" orm:"size(20)"`
Movedirection string `json:"movedirection" orm:"size(20)"`
Name string `json:"name" orm:"size(20)"`
Power string `json:"power" orm:"size(20)"`
Pressure string `json:"pressure" orm:"size(20)"`
Radius7 string `json:"radius7" orm:"size(20)"`
Radius10 string `json:"radius10" orm:"size(20)"`
Radius12 string `json:"radius12" orm:"size(20)"`
Speed string `json:"speed" orm:"size(20)"`
Strong string `json:"strong" orm:"size(20)"`
Time string `json:"time" orm:"size(20)"`
Timeformate string `json:"timeformate" orm:"size(20)"`
Tfid string `json:"tfid" orm:"pk;size(20)"`
}
func TyhoonActivityAdd(item *TyhoonActivity) (int64, error) {
return orm.NewOrm().Insert(item)
}
func TyhoonActivityDel(item *TyhoonActivity) (int64, error) {
return orm.NewOrm().Delete(item)
}
func GetTyhoonActivity(item *TyhoonActivity) bool {
var tyhoonActivityTemp TyhoonActivity
o := orm.NewOrm()
err := o.QueryTable(new(TyhoonActivity)).Filter("tfid",item.Tfid).One(&tyhoonActivityTemp)
if err == nil {
return true
}
return false
}
func GetTyhoonActivityList() []*TyhoonActivity {
items := make([]*TyhoonActivity, 0)
orm.NewOrm().QueryTable(new(TyhoonActivity)).All(&items)
return items
}

@ -0,0 +1,49 @@
package models
import (
"fmt"
"github.com/astaxie/beego/orm"
)
type TyhoonListItem struct {
Enname string `json:"enname" orm:"size(20)"`
Isactive string `json:"isactive" orm:"size(20)"`
Name string `json:"name" orm:"size(20)"`
Warnlevel string `json:"warnlevel" orm:"size(20)"`
Endtime string `json:"endtime" orm:"size(20)"`
Starttime string `json:"starttime" orm:"size(20)"`
Tfid string `json:"tfid" orm:"pk;size(20)"`
}
func TyhoonListItemAdd(item *TyhoonListItem) (int64, error) {
return orm.NewOrm().Insert(item)
}
func TyhoonListItemUpdate(item *TyhoonListItem) bool {
o := orm.NewOrm()
if num, err := o.Update(item); err == nil {
fmt.Println(num)
return true
}
return false
}
func TyhoonListItemDel(item *TyhoonListItem) (int64, error) {
return orm.NewOrm().Delete(item)
}
func GetTyhoonListItem(item *TyhoonListItem) *TyhoonListItem {
var tyhoonListItem TyhoonListItem
o := orm.NewOrm()
err := o.QueryTable(new(TyhoonListItem)).Filter("tfid",item.Tfid).One(&tyhoonListItem)
if err == nil {
return &tyhoonListItem
}
return nil
}
func GetTyhoonListItemList() []*TyhoonListItem {
items := make([]*TyhoonListItem, 0)
orm.NewOrm().QueryTable(new(TyhoonListItem)).All(&items)
return items
}

@ -0,0 +1,34 @@
package models
import (
"fmt"
"github.com/astaxie/beego/orm"
)
type TyphoonInfo struct {
Typhoon string `json:"typhoon" orm:"type(text)"`
Tfid string `json:"tfid" orm:"pk;size(20)"`
}
func TyphoonInfoAdd(item *TyphoonInfo) (int64, error) {
return orm.NewOrm().Insert(item)
}
func TyphoonInfoUpdate(item *TyphoonInfo) bool {
o := orm.NewOrm()
if num, err := o.Update(item); err == nil {
fmt.Println(num)
return true
}
return false
}
func GetTyphoonInfo(item *TyphoonInfo) *TyphoonInfo {
var typhoonInfoItem TyphoonInfo
o := orm.NewOrm()
err := o.QueryTable(new(TyphoonInfo)).Filter("tfid",item.Tfid).One(&typhoonInfoItem)
if err == nil {
return &typhoonInfoItem
}
return nil
}

@ -0,0 +1,14 @@
package models
type Account struct {
Id int `form:"-"`
Username string `form:"username"`
Password string `form:"password"`
}
// func init() {
// // 需要在init中注册定义的model
// orm.RegisterModel(new(Account))
// // create table
// orm.RunSyncdb("default", false, true)
// }

@ -0,0 +1,42 @@
package models
// type User struct {
// Id int `form:"-"`
// Name interface{} `form:"username"`
// Age int `form:"age"`
// Email string `form:"email"`
// }
type User struct {
Id int
Name string
Age int `form:"age"`
Email string `form:"email"`
Profile *Profile `orm:"rel(one)"` // OneToOne relation
Post []*Post `orm:"reverse(many)"` // 设置一对多的反向关系
}
type Profile struct {
Id int
Age int16
User *User `orm:"reverse(one)"` // 设置一对一反向关系(可选)
}
type Post struct {
Id int
Title string
User *User `orm:"rel(fk)"` //设置一对多关系
Tags []*Tag `orm:"rel(m2m)"`
}
type Tag struct {
Id int
Name string
Posts []*Post `orm:"reverse(many)"` //设置多对多反向关系
}
// func init() {
// // 需要在init中注册定义的model
// orm.RegisterModel(new(User), new(Post), new(Profile), new(Tag))
// orm.RunSyncdb("default", false, true)
// }

@ -0,0 +1,39 @@
package response
import (
"fmt"
)
type RespError struct {
code int
message string
detail string
}
func (re *RespError) Error() string {
return fmt.Sprintf("code:%d,message: %s,detail: %s", re.code, re.message, re.detail)
}
func RespErr(code int, message string) *RespError {
if code == 0 {
return nil
}
err := &RespError{code: code, message: message}
return err
}
func RespErr2(code int, message, detail string) *RespError {
if code == 0 {
return nil
}
err := &RespError{code: code, message: message, detail: detail}
return err
}
func (re *RespError) GetCode() int {
return re.code
}
func (re *RespError) GetMessage() string {
return re.message
}

@ -0,0 +1,311 @@
package response
// error code
const (
//Success 请求成功
Success = 0
//UnknownError 未知错误
UnknownError = -1
//SystemError 系统错误
SystemError = -2
//DatabaseError 数据库错误
DatabaseError = -3
//ParamsFewError 缺少参数
ParamsFewError = -5
//ParamsTypeError 参数类型不正确
ParamsTypeError = -6
//EmptyResult 根据给定条件查无数据,无法进一步操作。在允许出现空结果的场景不应该返回此错误码。
EmptyResult = -7
//ParamsTypeError 参数校验失败
ParamsTypeCheckError = -8
//account 账号相关错误在下面列出以10000开始
//AccountNeedLogin 需要登录
AccountNeedLogin = 10000
//AccountUsernameError 用户名不正确
AccountUsernameError = 10001
//AccountPasswordError 密码不正确
AccountPasswordError = 10002
AccountError = 10003 // 账号不存在或者密码错误
AccountPasswordNil = 10004 // 密码不能为空
AccountExist = 10005 // 账号已存在
//user 用户模块相关错误在下面列出以11000开始
UserNameError = 11001
UserCodeError = 11002
UserEmailError = 11003
NotFindUids = 11004 // 没收到uids
UserExist = 11005 // 用户已存在
UserNotExist = 11006 // 用户bu存在
UserAvatarSaveFail = 11007 // 头像存储失败
UserUpdateInfoFail = 11008 // 修改个人资料失败
UserUpdateMsgFail = 11009 // 修改个人信息失败
//org 组织模块相关错误在下面列出, 以12000开始
//OrgIdNotNull 组织id不能为空
OrgIdNotNull = 12000
//OrgNameNotNull 组织名称不能为空
OrgNameNotNull = 12001
//OrgCodeNotNull 组织编码不能为空
OrgCodeNotNull = 12002
//OrgCreateFail 组织创建失败
OrgCreateFail = 12003
//GetOrgsListFail 获取组织列表数据失败
GetOrgsListFail = 12004
//OrgNotExist 组织不存在
OrgNotExist = 12005
//OrgIsDeletedState 组织为删除状态
OrgIsDeletedState = 12006
//OrgDeletionFail 组织删除失败
OrgDeletionFail = 12007
//OrgDeletionSuccess 组织删除成功
OrgDeletionSuccess = 12008
//OrgUpdateFail 组织更新失败
OrgUpdateFail = 12009
//OrgSortUpdateFail 组织排序更新失败
OrgsSortUpdateFail = 12010
//SubOrgNameEquere 同一个组织下不能有相同的组织名称
SubOrgNameEquere = 12011
//RepairOrgAndUserDataNotMatchNoModule 不是admin用户无权限
RepairOrgAndUserDataNotMatchNoModule = 12012
//RoleIdNotNull 角色id不能为空
RoleIdNotNull = 12100
//RoleNameNotNull 角色名称不能为空
RoleNameNotNull = 12101
//RoleCodeNotNull 角色编码不能为空
RoleCodeNotNull = 12102
//CreateIdNotNull createId不能为空
CreateIdNotNull = 12103
//CreateRoleFail 角色创建失败
CreateRoleFail = 12104
//OrgRelRoleFail 组织关联角色失败
OrgRelRoleFail = 12105
//RoleNotExist 角色不存在
RoleNotExist = 12150
//RoleIsDeletedState 角色为删除状态
RoleIsDeletedState = 12151
//RoleDeletionFail 角色删除失败
RoleDeletionFail = 12152
//RoleUpdateFail 角色更新失败
RoleUpdateFail = 12153
//GetRoleListFail 获取角色列表数据失败
GetRoleListFail = 12154
//RoleListSortUpdateFail 角色排序更新失败
RoleListSortUpdateFail = 12155
//UserChangeRoleFail 成员更改角色失败
UserChangeRoleFail = 12156
//RoleIdFineAuthorListFail 根据角色id获取当前角色已授权的权限列表失败
RoleIdFineAuthorListFail = 12157
//RoleIdChangeModuleFail 角色更改权限失败
RoleIdChangeModuleFail = 12158
//DBTablehasDataInitFail 数据库表有数据存在,无法完成初始化
DBTablehasDataInitFail = 12200
//UsersOrgInitFail 组织人员数据初始化失败
UsersOrgInitFail = 12201
//UsersOrgNotAllowRepeatInit 组织人员数据不能重复初始化
UsersOrgNotAllowRepeatInit = 12202
//PleaseUploadXlsxTypeFile 请上传excel文件
PleaseUploadXlsxTypeFile = 12203
//UploadXlsxTFileNotMatch 上传的excel文件不符合要求
UploadXlsxTFileNotMatch = 12204
//SyncFileReconizeFail excel文件解析失败
SyncFileReconizeFail = 12205
//SyncFileFail 同步失败
SyncFileFail = 12206
//SyncFileNotExsxt 同步文件不存在
SyncFileNotExsxt = 12207
//UserRoleUserIdNoNull uid不能为空
UserRoleUserIdNoNull = 12250
//TaskNotFound excel导出任务不存在
TaskNotFound = 12350
//TaskIdNotFound excel导出任务id不能为空
TaskIdNotFound = 12351
//PreSaleWeekReportNoExcelData 售前周报excel无数据
PreSaleWeekReportNoExcelData = 12400
//PreSaleWeekReportNeedWrite 本周工作和工作量统计为必填项
PreSaleWeekReportNeedWrite = 12401
//PreSaleWeekReportWorkCountNotRight 工作量统计这一项填写的数据不符合要求
PreSaleWeekReportWorkCountNotRight = 12402
//PreSaleWeekReportPjCodeOrNameNeedInputOne 项目编号和项目名称必须致少填写其中一项
PreSaleWeekReportPjCodeOrNameNeedInputOne = 12403
//PreSaleWeekReportRishLevelNeedInput 当项目风险这一项填入数据时,风险级别这一项也必须填入
PreSaleWeekReportRishLevelNeedInput = 12404
//PreSaleWeekReportExcelNoFormat 售前周报excel格式不符合要求excel行数据不允许合并单元格无法解析数据
PreSaleWeekReportExcelNoFormat = 12405
//CurrentLoginUserNoPreSaleDeparment 当前登录用户不是售前市场部成员,不允许导入售前周报
CurrentLoginUserNoPreSaleDeparment = 12406
//ThisPreSaleWeeklyIsExists 本周售前周报已存在,不允许重复导入
ThisPreSaleWeeklyIsExists = 12407
//PreSaleProjectNameNoMatch 项目数据只存在项目名称时,项目名称格式不符合要求,必须用:隔开,并且:前面不能只有一个空字符串
PreSaleProjectNameNoMatch = 12408
//PreSaleProjectNameTypeNoMatch 项目数据只存在项目名称时,项目名称格式不符合要求,必须用:隔开,并且:前面不能只有一个空字符串
PreSaleProjectNameTypeNoMatch = 12409
//PreSaleProjectFirstWriteNoName 项目数据校验失败,项目编号和项目名称不匹配
PreSaleProjectFirstWriteNoName = 12410
//NoPreSaleWeeklyMemberNoWeekly 当前登录用户不是售前市场部成员,无售前周报
NoPreSaleWeeklyMemberNoWeekly = 12411
//NoPreSaleWeeklyMemberOrNotAddLookup 当前登录用户不是售前市场部成员,或未添加观察者
NoPreSaleWeeklyMemberOrNotAddLookup = 12412
//VerifyProjectCodeFailProjectCodeFindPjNoExists 项目编号验证失败,请检查填写的项目编号是否正确
VerifyProjectCodeFailProjectCodeFindPjNoExists = 12413
//PreSaleWeeklyThirdTypeNoMoreOne 总经办交办未立项项目,未立项项目产品线内部协同,未立项项目产品线外部协同 这三种类型的项目在同一张excel里同一种无编号类型只能存在一个
PreSaleWeeklyThirdTypeNoMoreOne = 12414
//
// TaskIdNotFound = 12407
//project 项目模块相关错误在下面列出以13000开始
//plan 计划模块相关错误在下面列出以14000开始
//PlanAccessForbidden 没有操作权限
PlanAccessForbidden = 14000
//PlanModifyCalculateData 修改计算结果。某些数据是计算出来的,不能直接修改。比如计划日期可能是根据子计划的日期计算出来的,这种情况下是不能修改计划日期的,只能修改子计划日期
PlanModifyCalculateData = 14001
//PlanEndTooEarly 计划结束时间在开始时间之前
PlanEndTooEarly = 14002
//PlanIndexTooSmall 计划排序错误:已至最前
PlanIndexTooSmall = 14003
//PlanIndexTooBig 计划排序错误:已至最后
PlanIndexTooBig = 14004
//calendar 日历模块相关错误在下面列出以15000开始
TemplateIdNotNull = 15001 // 模板ID不能为空
DateTypeErr = 15002 // 日期格式错误
TemplateIdTypeErr = 15003 // 模板ID格式错误
ProjectIdTypeErr = 15004 // 项目ID格式错误
EndDateErr = 15005 // 开始日期大于结束日期
TemplateNotExist = 15006 // 日历模板不存在
TemplateNameNotNull = 15007 // 模板名称不能为空
TemplateNameExist = 15008 // 模板名称已经存在
YearTypeErr = 15009 // 年份格式不正确
TemplateProjectIdNotNull = 15011 // 项目ID不能为空
TemplateDateNotNull = 15012 // 日期不能为空
TemplateStatusNotNull = 15013 // 模板状态不能为空
// 流程相关错误码
FlowNameNotNull = 16001 //流程名称不能为空
FlowTypeNotNull = 16002 // 流程类型不能为空
CreatorIdNotNull = 16003 // 流程创建者ID不能为空
FlowIdNotNull = 16004 // 流程ID不能为空
FlowStatusNotNull = 16005 // 流程状态不能为空
FlowRoleNotNull = 16006 // 流程角色ID不能为空
// 周报相关错误码 ==> 17开头
WkInfoLack = 17001 //无相关数据
WkNoThatWKR = 17002 //周报不存在
WkRefuseEdit = 17003 //该周报已提交,不可编辑
WkProgressError = 17004 //进度错误
WkProjectLack = 17008 //该任务不存在
WkProjectIdsErr = 17009 //获取项目id列表失败
WkHasNoSubmit = 17010 //有未提交的其他周报
WKDataError = 17999 //数据错误
// 字典相关错误
DictTypeErr = 18001 // 字典类型错误
DictCommonErr = 18002 // 系统错误
DictParamErr = 18003 //参数错误
DictIdErr = 18004 //参数错误
// 文档模板、权限,文件库相关错误码
DocFileFormatError = 19000 // 文件格式错误
DocFileNameFormatError = 19001 // 文件名格式错误
DocDirIdNotExist = 19002 // 文档目录不存在
DocFileIdNotExist = 19003 // 文档不存在
DocProjTempFileNotExist = 19004 // 项目模板文件不存在
DocNoDeleteAccessOrExpire = 19005 // 没有文档删除权限或已失效
DocNoDirOfCreatProject = 19006 // 没有立项目录请创建
DocRepeatDirName = 19007 // 该目录已存在
DocNoFileInfo = 19008 // 文件信息已不存在
DocConvertPDFError = 19009 // 文件转换成PDF失败请检查文件重新上传
DocFileNoPreviewOrExpire = 19010 // 文件没有预览权限或者权限过期
DocNOAccessDownload = 19011 // 没有权限下载
// 资源统计相关错误码
StatisticsParamsError = 191000 // 参数有误
StatisticsNoOrgFound = 191001 // 未找到组织相关信息
StatisticsOrgNotExist = 191002 // 所选组织不存在
StatisticsAlreadyExist = 191003 // 所选人员已存在
// SeaweedFS相关错误码
SeaweedGetFidError = 192000 // 获取fid失败
// excel导出相关错误码
ProjectNotExist = 20000 // 项目不存在
ProjedrPlanNotExist = 20001 // 计划不存在
PreSaleNoRowData = 20002 //售前项目信息没有查询到相关数据
NoProjectData = 20003 //无项目数据
ExcelArchiveFail = 20004 //excel文件压缩失败
ProjectPlanExcelFileNotExist = 20005 //项目计划文件不存在
// 客户相关错误码
ClienteleNameNotNull = 21000 //客户名称不能为空
ClienteleProvinceIdNotNull = 21001 //客户所在省市id不能为空
ClienteleNatureIdNotNull = 21002 //客户性质id不能为空
ClienteleAddressNotNull = 21003 //客户地址不能为空
ClienteleContactsNotNull = 22004 //供应商联系人不能为空
ClientelePhoneIdNotNull = 22005 //供应商联系人电话不能为空
ClienteleIdNotNull = 21006 //客户id不能为空
ClienteleContactsIdNotNull = 21007 //客户联系人id不能为空
ClienteleNoPermission = 21008 //没有权限
// 供应商相关错误码
SupplierNameNotNull = 22000 //供应商名称不能为空
SupplierProvinceIdNotNull = 22001 //所在省市id不能为空
SupplierContactsNotNull = 22002 //供应商联系人不能为空
SupplierPhoneIdNotNull = 22003 //供应商联系人电话不能为空
SupplierIdNotNull = 22004 //供应商id不能为空
SupplierProjectNotFind = 22005 //没有查询到项目
SupplierProjectIdNotNull = 22006 //供应商参与项目id不能为空
SupplierQualificationIdNotNull = 22007 //供应商资质id不能为空
// 售前人员相关错误码
PreSalePersonnelIdNotNull = 23000 //售前人员id不能为空
// 基于菜单权限的接口权限检查
NotModuleReadMenu = 30000 //当前用户无菜单访问权限
//项目沟通
ProjectRecordDataError = 24000 //数据错误
ProjectRecordPramaError = 24001 //参数错误
ProjectRecordFileError = 24002 //文件错误
//项目提醒
NoticeConfigOpenError = 30000 // 配置已打开
NoticeConfigCloseError = 30001 // 配置已关闭
NoticeConfigIdError = 30002 // id错误
NoticeProjectInited = 30003 // 项目通知配置已经初始化过了
NoticeProjectConfigNotAble = 30004 // 此条提醒开关目前不能在项目中进行配置
NoticeSendFailed = 30005 // 提醒发送失败
NoticeRightawayNotAvailable = 30006 // 该通知不能立即提醒
//意见反馈
FeedBackReplyNoPermission = 25000 // 没有回复意见权限
FeedBackSuggestTitleNotNull = 25001 // 意见标题不能为空
FeedBackSuggestContentNotNull = 25002 // 意见内容不能为空
FeedBackReplyContentNotNull = 25002 // 回复内容不能为空
//售前周报
PreSaleWeekReportNOPminfo = 26000 // 没有项目信息
PreSaleWeekReportWkIDErr = 26001 // 请检查售前周报Id
PreSaleWeekReportWkPidEr = 26002 // 请检查售前周报项目wkPid
PreSaleWeekReportWkRIdEr = 26003 // 请检查售前周报项目风险id
PreSaleWeekReportParamEr = 26004 // 请检查传入参数
)
//Response 处理返回结果
type Response struct {
Code int `json:"code"`
Message string `json:"message"`
Data interface{} `json:"data,omitempty"`
}
//Make 返回 Response 结构体
func Make(code int, err error, data interface{}) *Response {
return &Response{code, err.Error(), data}
}
//MakeSuccess 返回成功时的 Response 结构体
func MakeSuccess(data interface{}) *Response {
return &Response{Success, "success", data}
}

@ -0,0 +1,38 @@
package routers
import (
"weather/controllers"
"github.com/astaxie/beego"
"github.com/astaxie/beego/plugins/cors"
)
func init() {
beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
AllowOrigins: []string{"http://*", "https://*"},
AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
AllowHeaders: []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "X-Requested-With", "Access-Control-Allow-Headers", "Content-Type"},
ExposeHeaders: []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
AllowCredentials: true,
}))
beego.Router("/", &controllers.LoginController{})
beego.Router("/login", &controllers.LoginController{}, "post:Post")
beego.Router("/regist", &controllers.LoginController{}, "get:Regist")
beego.Router("/regist/submit", &controllers.LoginController{}, "post:RegistSubmit")
ns :=
beego.NewNamespace("/v1",
beego.NSRouter("/main", &controllers.MainController{}),
beego.NSRouter("/version", &controllers.AdminController{}, "get:ShowAPIVersion"),
beego.NSNamespace("/cms",
beego.NSRouter("/node", &controllers.MainController{}),
beego.NSRouter("/form", &controllers.CMSController{}),
beego.NSRouter("/formpost", &controllers.CMSController{}, "post:Post"),
beego.NSInclude(
&controllers.CMSController{},
),
),
)
//注册 namespace
beego.AddNamespace(ns)
beego.InsertFilter("/v1/*", beego.BeforeRouter, controllers.FilterUser)
}

@ -0,0 +1,38 @@
package service
import (
"fmt"
"weather/models"
"github.com/astaxie/beego/orm"
_ "github.com/astaxie/beego/session/mysql"
)
type AccountService struct {
}
func (s *AccountService) LoginAccount(account models.Account) *models.Account {
o := orm.NewOrm()
var accountTemp models.Account
err := o.QueryTable(new(models.Account)).Filter("username", account.Username).Filter("password", account.Password).One(&accountTemp)
if err == orm.ErrNoRows {
// 没有找到记录
fmt.Println("查询不到")
}
if err == nil {
fmt.Println("登录成功")
return &accountTemp
}
return nil
}
func (s *AccountService) RegistAccount(account models.Account) bool {
o := orm.NewOrm()
accountTemp := new(models.Account)
accountTemp.Username = account.Username
accountTemp.Password = account.Password
fmt.Println(o.Insert(accountTemp))
return true
}

@ -0,0 +1,174 @@
package service
import (
"crypto/tls"
"encoding/json"
"fmt"
"strings"
"time"
"weather/models"
"github.com/astaxie/beego/httplib"
)
type HttpService struct {
}
func (s *HttpService) GetActivityTyhoon() {
now := time.Now() //获取当前时间
timestamp1 := now.Unix() * 1000 //时间戳
fmt.Println("current timestamp1:%l", timestamp1)
//time.Sleep(10) //等待1秒
now1 := time.Now() //获取当前时间
timestamp2 := now1.Unix() * 1000 //时间戳
now3 := time.Now() //获取当前时间
timestamp3 := now3.Unix() //时间戳
fmt.Println("current timestamp2:%l", timestamp3)
// 两参数格式化
url := fmt.Sprintf("https://typhoon.slt.zj.gov.cn/Api/TyhoonActivity?callback=jQuery1830914871%v_%v_=%v", timestamp3, timestamp1, timestamp2)
fmt.Println(url)
req := httplib.Get(url)
req.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
str, err := req.String()
if err != nil {
fmt.Println(err)
}
//fmt.Println(str)
comLeft := strings.Index(str, "[")
pos := str[comLeft:]
posLeft := strings.Index(pos, "]")
jsonTyhoonActivity := pos[0 : posLeft+1]
fmt.Println(jsonTyhoonActivity)
var activitys []models.TyhoonActivity
json.Unmarshal([]byte(jsonTyhoonActivity), &activitys)
fmt.Println(activitys)
fmt.Println(len(activitys))
for _, item := range activitys {
if models.GetTyhoonActivity(&item) {
//存在
fmt.Println("存在")
} else {
//不存在
models.TyhoonActivityAdd(&item)
fmt.Println("不存在,插入数据库")
}
}
activitys = make([]models.TyhoonActivity, 0)
//不存在活跃的台风
if len(activitys) == 0 {
items := models.GetTyhoonActivityList()
if items != nil && len(items) > 0 {
for _, item := range items {
models.TyhoonActivityDel(item)
}
}
}
s.GetTyhoonList(now.Year())
//data, err := json.Marshal(activitys)
//if err == nil {
// fmt.Println(string(data))
//}
}
func (s *HttpService) GetTyhoonList(year int) {
now := time.Now() //获取当前时间
timestamp1 := now.Unix() * 1000 //时间戳
fmt.Println("current timestamp1:%l", timestamp1)
//time.Sleep(10) //等待1秒
now1 := time.Now() //获取当前时间
timestamp2 := now1.Unix() * 1000 //时间戳
now3 := time.Now() //获取当前时间
timestamp3 := now3.Unix() //时间戳
fmt.Println("current timestamp2:%l", timestamp3)
// 两参数格式化
url := fmt.Sprintf("https://typhoon.slt.zj.gov.cn/Api/TyphoonList/%v?callback=jQuery18303639632%v_%v_=%v", year, timestamp3, timestamp1, timestamp2)
fmt.Println(url)
req := httplib.Get(url)
req.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
str, err := req.String()
if err != nil {
fmt.Println(err)
}
//fmt.Println(str)
comLeft := strings.Index(str, "[")
pos := str[comLeft:]
posLeft := strings.Index(pos, "]")
jsonTyhoonListItem := pos[0 : posLeft+1]
fmt.Println(jsonTyhoonListItem)
var tyhoonListItem []models.TyhoonListItem
json.Unmarshal([]byte(jsonTyhoonListItem), &tyhoonListItem)
fmt.Println(tyhoonListItem)
fmt.Println(len(tyhoonListItem))
for _, item := range tyhoonListItem {
itemDB := models.GetTyhoonListItem(&item)
if itemDB != nil {
//存在
fmt.Println("存在")
if itemDB.Isactive == "1" && item.Isactive == "0" {
//需要更新
itemDB.Isactive = "0"
if models.TyhoonListItemUpdate(itemDB) {
fmt.Println("update 成功")
s.GetTyphoonInfo(item.Tfid)
}
}
if item.Isactive == "1" {
//需要更新
s.GetTyphoonInfo(item.Tfid)
}
} else {
//不存在
models.TyhoonListItemAdd(&item)
fmt.Println("不存在,插入数据库")
s.GetTyphoonInfo(item.Tfid)
}
}
}
func (s *HttpService) GetTyphoonInfo(tfid string) {
now := time.Now() //获取当前时间
timestamp1 := now.Unix() * 1000 //时间戳
fmt.Println("current timestamp1:%l", timestamp1)
//time.Sleep(10) //等待1秒
now1 := time.Now() //获取当前时间
timestamp2 := now1.Unix() * 1000 //时间戳
now3 := time.Now() //获取当前时间
timestamp3 := now3.Unix() //时间戳
fmt.Println("current timestamp2:%l", timestamp3)
// 两参数格式化
url := fmt.Sprintf("https://typhoon.slt.zj.gov.cn/Api/TyphoonInfo/%v?callback=jQuery18300926577%v_%v_=%v", tfid, timestamp3, timestamp1, timestamp2)
fmt.Println(url)
req := httplib.Get(url)
req.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
str, err := req.String()
if err != nil {
fmt.Println(err)
}
//fmt.Println(str)
comLeft := strings.Index(str, "[")
pos := str[comLeft:]
posLeft := strings.LastIndex(pos, "]")
jsonTyhoonListItem := pos[0 : posLeft+1]
fmt.Println(jsonTyhoonListItem)
fmt.Println(posLeft)
typhoonInfo := new(models.TyphoonInfo)
typhoonInfo.Tfid = tfid
typhoonInfoDB := models.GetTyphoonInfo(typhoonInfo)
if typhoonInfoDB == nil {
typhoonInfo.Typhoon = jsonTyhoonListItem
models.TyphoonInfoAdd(typhoonInfo)
fmt.Println("不存在,插入数据库")
} else {
typhoonInfoDB.Typhoon = jsonTyhoonListItem
models.TyphoonInfoUpdate(typhoonInfo)
fmt.Println("已存在,更新数据库")
}
}

@ -0,0 +1,50 @@
package service
import (
"fmt"
"github.com/astaxie/beego/httplib"
"strconv"
"sync"
"time"
"weather/models"
)
type HttpWeatherService struct {
}
func (s *HttpWeatherService) GetNmcNowWeather() {
citys := models.GetNmcCityList()
fmt.Println(citys)
fmt.Println(len(citys))
var wg sync.WaitGroup
for _, item := range citys {
time.Sleep(time.Millisecond * 300)
wg.Add(1) // 启动一个goroutine就登记+1
go func(city *models.NmcCity) {
defer wg.Done() // goroutine结束就登记-1
fmt.Println(*city)
timeUnix := time.Now().Unix()
s := strconv.FormatInt(timeUnix, 10)
url := "http://www.nmc.cn/rest/weather?stationid=" + item.Code + "&_=" + s + "000"
fmt.Println(url)
req := httplib.Get(url)
//req.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
str, err := req.String()
if err != nil {
fmt.Println(err)
}
var nmcNowWeather = new(models.NmcNowWeather)
now := time.Now() //获取当前时间
nmcNowWeather.Weather = str
nmcNowWeather.Code = item.Code
nmcNowWeather.WeatherDate = now.Format("2006-01-02")
id,errInsert := models.AddNmcNowWeather(nmcNowWeather)
if errInsert!=nil {
println(errInsert.Error())
}
fmt.Println(id)
fmt.Println(str)
}(item)
}
wg.Wait() // 等待所有登记的goroutine都结束
}

@ -0,0 +1 @@
function b(a){var c=new WebSocket(a);c.onclose=function(){setTimeout(function(){b(a)},2E3)};c.onmessage=function(){location.reload()}}try{if(window.WebSocket)try{b("ws://localhost:12450/reload")}catch(a){console.error(a)}else console.log("Your browser does not support WebSockets.")}catch(a){console.error("Exception during connecting to Reload:",a)};

@ -0,0 +1 @@
hello world

@ -0,0 +1,37 @@
package test
import (
"net/http"
"net/http/httptest"
"path/filepath"
"runtime"
"testing"
_ "weather/routers"
"github.com/astaxie/beego"
. "github.com/smartystreets/goconvey/convey"
)
func init() {
_, file, _, _ := runtime.Caller(0)
apppath, _ := filepath.Abs(filepath.Dir(filepath.Join(file, ".."+string(filepath.Separator))))
beego.TestBeegoInit(apppath)
}
// TestBeego is a sample to run an endpoint test
func TestBeego(t *testing.T) {
r, _ := http.NewRequest("GET", "/", nil)
w := httptest.NewRecorder()
beego.BeeApp.Handlers.ServeHTTP(w, r)
beego.Trace("testing", "TestBeego", "Code[%d]\n%s", w.Code, w.Body.String())
Convey("Subject: Test Station Endpoint\n", t, func() {
Convey("Status Code Should Be 200", func() {
So(w.Code, ShouldEqual, 200)
})
Convey("The Result Should Not Be Empty", func() {
So(w.Body.Len(), ShouldBeGreaterThan, 0)
})
})
}

@ -0,0 +1,10 @@
package utils
import (
"github.com/astaxie/beego"
)
// GetSessName 获取配置文件中sessionName
func GetSessName() string {
return beego.AppConfig.String("SessionName")
}

@ -0,0 +1,14 @@
package utils
type Error struct {
Code int `json:"code"`
Message string `json:"message"`
}
func NewError(code int, msg string) error {
return Error{code, msg}
}
func (this Error) Error() string {
return this.Message
}

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<title>Beego</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<form id="user" action = "/v1/cms/formpost", method = "POST">
名字:<input name="username" type="text" />
年龄:<input name="age" type="text" />
邮箱:<input name="email" type="text" />
<input type="submit" value="提交" />
</form>
</body>
</html>

File diff suppressed because one or more lines are too long

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<title>登录</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script>
function copyText(){
console.log('hehe');
}
</script>
</head>
<body>
<form id="login" action = "/login", method = "POST">
用户名:<input type="text" name="username"/>
密码:<input type="password" name="password"/>
<input type="submit" value="提交"/>
</form>
<a href="/regist">注册</a><br/>
<button type="button" onclick="copyText()">点我吧</button>
</body>
</html>

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<title>登录</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<form id="login" action = "/regist/submit", method = "POST">
用户名:<input type="text" name="username"/>
密码:<input type="password" name="password"/>
<input type="submit" value="注册"/>
</form>
</body>
</html>

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>登录成功</title>
<meta http-equiv="refresh" content="1 ;url=/v1/main">
</head>
<body>
</body>
</html>

Binary file not shown.
Loading…
Cancel
Save