You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
486 B
26 lines
486 B
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), |
|
} |
|
}
|
|
|