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.
 
 
 

28 lines
448 B

package dao
import (
"time"
"go-common/app/service/bbq/push/conf"
"go-common/app/service/bbq/push/dao/jpush"
)
// Dao dao
type Dao struct {
c *conf.Config
JPush *jpush.Client
}
// New init mysql db
func New(c *conf.Config) (dao *Dao) {
client := jpush.New(c.JPush.AppKey, c.JPush.SecretKey, time.Duration(c.JPush.Timeout))
dao = &Dao{
c: c,
JPush: client,
}
return
}
// Close close the resource.
func (d *Dao) Close() {
}