mirror of
https://github.com/foomo/posh-providers.git
synced 2025-10-16 12:35:41 +00:00
23 lines
373 B
Go
23 lines
373 B
Go
package cloudflared
|
|
|
|
import (
|
|
"sort"
|
|
|
|
"github.com/samber/lo"
|
|
)
|
|
|
|
type Config struct {
|
|
Path string `json:"path" yaml:"path"`
|
|
Access map[string]Access `json:"access" yaml:"access"`
|
|
}
|
|
|
|
func (c Config) AccessNames() []string {
|
|
ret := lo.Keys(c.Access)
|
|
sort.Strings(ret)
|
|
return ret
|
|
}
|
|
|
|
func (c Config) GetAccesss(name string) Access {
|
|
return c.Access[name]
|
|
}
|