package util
|
|
import (
|
"analysis/logo"
|
"analysis/work/cache"
|
|
"basic.com/dbapi.git"
|
"basic.com/pubsub/protomsg.git"
|
)
|
|
// InitDBAPI init dbapi
|
func InitDBAPI() {
|
dbapi.Init(FSI.IP, FSI.HTTPort)
|
var initchan = make(chan bool)
|
go cache.Init(initchan, FSI.IP, FSI.HBPort, FSI.DataPort)
|
logo.Infoln("db init done!", <-initchan)
|
}
|
|
// TaskInfos get camera infos from sqlite db
|
func TaskInfos() []protomsg.TaskSdkInfo {
|
tAPI := dbapi.TaskApi{}
|
tasks := tAPI.FindAll()
|
|
return tasks
|
}
|
|
// SDKInfo get sdk
|
func SDKInfo() []protomsg.SdkRun {
|
sAPI := dbapi.SdkApi{}
|
|
return sAPI.FindAllSdkRun()
|
}
|