go-common/app/admin/main/passport/dao/dao.go

36 lines
496 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package dao
import (
"context"
"go-common/library/database/elastic"
"go-common/app/admin/main/passport/conf"
)
// Dao dao
type Dao struct {
c *conf.Config
// elastic client
EsCli *elastic.Elastic
}
// New init mysql db
func New(c *conf.Config) (dao *Dao) {
dao = &Dao{
c: c,
// elastic client
EsCli: elastic.NewElastic(c.Elastic),
}
return
}
// Close close the resource.
func (d *Dao) Close() {
}
// Ping dao ping
func (d *Dao) Ping(c context.Context) error {
return nil
}