12345678910111213141516171819202122232425262728 |
- package admin_api
- type Module string
- const (
- ModuleCustomer Module = "customer"
- ModuleProduct Module = "product"
- ModuleOrder Module = "order"
- ModuleShop Module = "shop"
- )
- var AllModules = []Module{
- ModuleCustomer, ModuleProduct, ModuleOrder, ModuleShop,
- }
- func (m Module) IsValid() bool {
- for _, module := range AllModules {
- if module == m {
- return true
- }
- }
- return false
- }
- func (m Module) String() string {
- return string(m)
- }
|