api.go 412 B

1234567891011121314151617181920
  1. package dao
  2. import (
  3. "go-common/app/interface/live/app-room/conf"
  4. userextApi "go-common/app/service/live/userext/api/liverpc"
  5. "go-common/library/net/rpc/liverpc"
  6. )
  7. // InitAPI init all service APIs
  8. func InitAPI(dao *Dao) {
  9. dao.UserExtAPI = userextApi.New(getConf("userext"))
  10. }
  11. func getConf(appName string) *liverpc.ClientConfig {
  12. c := conf.Conf.LiveRpc
  13. if c != nil {
  14. return c[appName]
  15. }
  16. return nil
  17. }