go-common/app/interface/main/creative/dao/coin/dao.go
2019-04-22 18:49:16 +08:00

25 lines
395 B
Go

package coin
import (
"go-common/app/interface/main/creative/conf"
coinclient "go-common/app/service/main/coin/api"
)
// Dao str
type Dao struct {
c *conf.Config
coinClient coinclient.CoinClient
}
// New fn
func New(c *conf.Config) (d *Dao) {
d = &Dao{
c: c,
}
var err error
if d.coinClient, err = coinclient.NewClient(c.CoinClient); err != nil {
panic(err)
}
return
}