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.
26 lines
427 B
26 lines
427 B
package white |
|
|
|
import ( |
|
"go-common/app/interface/main/app-resource/conf" |
|
) |
|
|
|
// Service white service. |
|
type Service struct { |
|
c *conf.Config |
|
listCache map[string][]string |
|
} |
|
|
|
// New new a interest service. |
|
func New(c *conf.Config) (s *Service) { |
|
s = &Service{ |
|
c: c, |
|
listCache: c.White.List, |
|
} |
|
return |
|
} |
|
|
|
// List white list |
|
func (s *Service) List() (res map[string][]string) { |
|
res = s.listCache |
|
return |
|
}
|
|
|