dao.go 653 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package elec
  2. import (
  3. "context"
  4. "go-common/app/interface/main/videoup/conf"
  5. bm "go-common/library/net/http/blademaster"
  6. )
  7. // Dao is elec dao.
  8. type Dao struct {
  9. c *conf.Config
  10. // http
  11. client *bm.Client
  12. // uri
  13. showURI string
  14. arcOpenURL string
  15. arcCloseURL string
  16. }
  17. // New new a elec dao.
  18. func New(c *conf.Config) (d *Dao) {
  19. d = &Dao{
  20. c: c,
  21. // http client
  22. client: bm.NewClient(c.HTTPClient.Write),
  23. // uri
  24. showURI: c.Host.Elec + _showURL,
  25. arcOpenURL: c.Host.Elec + _arcOpenURI,
  26. arcCloseURL: c.Host.Elec + _arcCloseURI,
  27. }
  28. return d
  29. }
  30. // Ping ping success.
  31. func (d *Dao) Ping(c context.Context) (err error) {
  32. return
  33. }