dao.go 360 B

1234567891011121314151617181920212223242526
  1. package bfs
  2. import (
  3. "go-common/app/admin/main/mcn/conf"
  4. )
  5. // Dao dao
  6. type Dao struct {
  7. c *conf.Config
  8. bucket string
  9. key string
  10. secret string
  11. bfs string
  12. }
  13. // New init mysql db
  14. func New(c *conf.Config) (d *Dao) {
  15. d = &Dao{
  16. c: c,
  17. bucket: c.BFS.Bucket,
  18. key: c.BFS.Key,
  19. secret: c.BFS.Secret,
  20. bfs: c.Host.Bfs,
  21. }
  22. return
  23. }