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.
32 lines
559 B
32 lines
559 B
package dao |
|
|
|
import ( |
|
"context" |
|
|
|
"go-common/app/interface/main/ugcpay-rank/internal/conf" |
|
ugcpay_rank "go-common/app/service/main/ugcpay-rank/api/v1" |
|
) |
|
|
|
// Dao dao |
|
type Dao struct { |
|
ugcPayRankAPI ugcpay_rank.UGCPayRankClient |
|
} |
|
|
|
// New init mysql db |
|
func New() (dao *Dao) { |
|
dao = &Dao{} |
|
var err error |
|
if dao.ugcPayRankAPI, err = ugcpay_rank.NewClient(conf.Conf.UGCPayRankGRPC); err != nil { |
|
panic(err) |
|
} |
|
return |
|
} |
|
|
|
// Close close the resource. |
|
func (d *Dao) Close() { |
|
} |
|
|
|
// Ping dao ping |
|
func (d *Dao) Ping(ctx context.Context) error { |
|
return nil |
|
}
|
|
|