white.go 427 B

1234567891011121314151617181920212223242526
  1. package white
  2. import (
  3. "go-common/app/interface/main/app-resource/conf"
  4. )
  5. // Service white service.
  6. type Service struct {
  7. c *conf.Config
  8. listCache map[string][]string
  9. }
  10. // New new a interest service.
  11. func New(c *conf.Config) (s *Service) {
  12. s = &Service{
  13. c: c,
  14. listCache: c.White.List,
  15. }
  16. return
  17. }
  18. // List white list
  19. func (s *Service) List() (res map[string][]string) {
  20. res = s.listCache
  21. return
  22. }