zhangmeng
2020-01-06 a10f7bf10c195421b089cda0c13f2195c614cb80
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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()
}