Create & Init Project...
This commit is contained in:
24
app/job/main/appstatic/dao/caldiff/dao.go
Normal file
24
app/job/main/appstatic/dao/caldiff/dao.go
Normal file
@ -0,0 +1,24 @@
|
||||
package caldiff
|
||||
|
||||
import (
|
||||
"go-common/app/job/main/appstatic/conf"
|
||||
xsql "go-common/library/database/sql"
|
||||
bm "go-common/library/net/http/blademaster"
|
||||
)
|
||||
|
||||
// Dao .
|
||||
type Dao struct {
|
||||
c *conf.Config
|
||||
db *xsql.DB
|
||||
client *bm.Client
|
||||
}
|
||||
|
||||
// New creates a dao instance.
|
||||
func New(c *conf.Config) (d *Dao) {
|
||||
d = &Dao{
|
||||
c: c,
|
||||
db: xsql.NewMySQL(c.MySQL),
|
||||
client: bm.NewClient(c.HTTPClient),
|
||||
}
|
||||
return
|
||||
}
|
Reference in New Issue
Block a user