From 6a9495ab6d6e6bc0a3a654cdd3b9a8be569edf6d Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期五, 05 七月 2019 16:17:04 +0800
Subject: [PATCH] rm no use file
---
/dev/null | 1 -
main.go | 2 --
models/vssLocalSettingTbl.go | 26 +++++++++++++-------------
models/localconfig.go | 30 +++++++++++++++---------------
4 files changed, 28 insertions(+), 31 deletions(-)
diff --git a/config/testdb b/config/testdb
deleted file mode 100644
index 25439a5..0000000
--- a/config/testdb
+++ /dev/null
Binary files differ
diff --git a/main.go b/main.go
index 63e6064..b2bbcd3 100644
--- a/main.go
+++ b/main.go
@@ -29,11 +29,9 @@
flag.Lookup("alsologtostderr").Value.Set("true")
flag.Lookup("log_dir").Value.Set("./log")
config.Init(*envirment)
- //models.Init()
r := router.NewRouter()
r.Run("0.0.0.0:8000")
- //defer models.CloseDB()
//defer new(gorun.SimpleFaceDetect).FaceDetactClose()
}
diff --git a/models/db.go b/models/db.go
deleted file mode 100644
index 71124a1..0000000
--- a/models/db.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package models
-
-//import (
-// "github.com/jinzhu/gorm"
-// _ "github.com/jinzhu/gorm/dialects/sqlite"
-//)
-//
-//var db *gorm.DB
-//var err error
-
-// Init creates a connection to mysql database and
-// migrates any new models
-//func Init() {
-// // dbname, file path
-// db, err = gorm.Open(config.DBconf.Name, config.DBconf.FilePath)
-// db.LogMode(true)
-// db.Exec("PRAGMA foreign_keys = ON")
-// if err != nil {
-// glog.Error("db open error ", err)
-// }
-// //db.AutoMigrate(&Area{}, &Camera{}, &LocalConfig{}, &VSSLocalSettingTbl{}, &Task{}, &CameraTask{}, &TaskSdk{}, &Sdk{})
-//}
-
-//GetDB ...
-//func GetDB() *gorm.DB {
-// return db
-//}
-//
-//func CloseDB() {
-// db.Close()
-//}
diff --git a/models/localconfig.go b/models/localconfig.go
index b4cca23..bc602fa 100644
--- a/models/localconfig.go
+++ b/models/localconfig.go
@@ -1,17 +1,17 @@
package models
-type LocalConfig struct {
- ID int `json:"-"`
- Alarm_ip string `json:"alarm_ip,omitempty" example:"192.168.1.182"`
- Alarm_port int `json:"alarm_port,omitempty" example:"22122"`
- Web_pic_ip string `json:"web_pic_ip,omitempty" example:""`
- Web_pic_port int `json:"web_pic_port,omitempty" example:"22122"`
- Es_pic_ip string `json:"es_pic_ip,omitempty" example:""`
- Es_pic_port int `json:"es_pic_port,omitempty" example:"22122"`
- Cut_max_duration int `json:"cut_max_duration,omitempty" example:"20"`
- Cut_min_duration int `json:"cut_min_duration,omitempty" example:"5"`
- Dev_id string `json:"dev_id,omitempty" example:"鍒嗘瀽璁惧id"`
- Dev_name string `json:"dev_name,omitempty" example:"鍒嗘瀽璁惧鍚嶇О"`
- Dev_type int `json:"dev_type,omitempty" example:"1"`
- Reserved string `json:"dev_type,omitempty" example:"1"`
-}
\ No newline at end of file
+//type LocalConfig struct {
+// ID int `json:"-"`
+// Alarm_ip string `json:"alarm_ip,omitempty" example:"192.168.1.182"`
+// Alarm_port int `json:"alarm_port,omitempty" example:"22122"`
+// Web_pic_ip string `json:"web_pic_ip,omitempty" example:""`
+// Web_pic_port int `json:"web_pic_port,omitempty" example:"22122"`
+// Es_pic_ip string `json:"es_pic_ip,omitempty" example:""`
+// Es_pic_port int `json:"es_pic_port,omitempty" example:"22122"`
+// Cut_max_duration int `json:"cut_max_duration,omitempty" example:"20"`
+// Cut_min_duration int `json:"cut_min_duration,omitempty" example:"5"`
+// Dev_id string `json:"dev_id,omitempty" example:"鍒嗘瀽璁惧id"`
+// Dev_name string `json:"dev_name,omitempty" example:"鍒嗘瀽璁惧鍚嶇О"`
+// Dev_type int `json:"dev_type,omitempty" example:"1"`
+// Reserved string `json:"dev_type,omitempty" example:"1"`
+//}
\ No newline at end of file
diff --git a/models/task.go b/models/task.go
deleted file mode 100644
index 2640e7f..0000000
--- a/models/task.go
+++ /dev/null
@@ -1 +0,0 @@
-package models
diff --git a/models/vssLocalSettingTbl.go b/models/vssLocalSettingTbl.go
index de36b96..1e44700 100644
--- a/models/vssLocalSettingTbl.go
+++ b/models/vssLocalSettingTbl.go
@@ -1,15 +1,15 @@
package models
-import (
- "time"
-)
-
-type VSSLocalSettingTbl struct {
- ID int `json:"ID,omitempty" gorm:"primary_key" `
- ServerIp string `json:"ServerIp,omitempty" example:"SIP鏈嶅姟鍣↖P" gorm:"column:ServerIp"`
- ServerPort int `json:"ServerPort,omitempty" example:"21231" gorm:"column:ServerPort"`
- ServerId string `json:"ServerId,omitempty" example:"SIP鏈嶅姟鍣↖d" gorm:"column:ServerId"`
- UserAuthId string `json:"UserAuthId,omitempty" example:"SIP鐢ㄦ埛璁よ瘉ID" gorm:"column:UserAuthId"`
- Password string `json:"Password,omitempty" example:"瀵嗙爜" gorm:"column:Password"`
- UpdateTime time.Time `json:"-" gorm:"column:UpdateTime"`
-}
\ No newline at end of file
+//import (
+// "time"
+//)
+//
+//type VSSLocalSettingTbl struct {
+// ID int `json:"ID,omitempty" gorm:"primary_key" `
+// ServerIp string `json:"ServerIp,omitempty" example:"SIP鏈嶅姟鍣↖P" gorm:"column:ServerIp"`
+// ServerPort int `json:"ServerPort,omitempty" example:"21231" gorm:"column:ServerPort"`
+// ServerId string `json:"ServerId,omitempty" example:"SIP鏈嶅姟鍣↖d" gorm:"column:ServerId"`
+// UserAuthId string `json:"UserAuthId,omitempty" example:"SIP鐢ㄦ埛璁よ瘉ID" gorm:"column:UserAuthId"`
+// Password string `json:"Password,omitempty" example:"瀵嗙爜" gorm:"column:Password"`
+// UpdateTime time.Time `json:"-" gorm:"column:UpdateTime"`
+//}
\ No newline at end of file
--
Gitblit v1.8.0