go-common/app/interface/main/tv/dao/goblin/dao.go

27 lines
486 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package goblin
import (
"go-common/app/interface/main/tv/conf"
"go-common/library/cache/memcache"
"go-common/library/database/sql"
bm "go-common/library/net/http/blademaster"
)
// Dao .
type Dao struct {
conf *conf.Config
client *bm.Client
db *sql.DB
mc *memcache.Pool
}
// New .
func New(c *conf.Config) *Dao {
return &Dao{
conf: c,
client: bm.NewClient(c.PlayurlClient),
db: sql.NewMySQL(c.Mysql),
mc: memcache.NewPool(c.Memcache.Config),
}
}