Documentation
¶
Overview ¶
Package config is in charge of loading policies files from disk or remote Github URL.
It also contains the view for the __reload__ endpoint.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
func Load(sources []string) (doorman.ServicesConfig, error)
Load will load and parse the specified sources.
Types ¶
type FileLoader ¶
type FileLoader struct{}
FileLoader loads from local disk (file, folder)
func (*FileLoader) CanLoad ¶
func (f *FileLoader) CanLoad(path string) bool
CanLoad will return true if the path exists.
func (*FileLoader) Load ¶
func (f *FileLoader) Load(path string) (doorman.ServicesConfig, error)
Load reads the local file or scans the folder.
type GithubLoader ¶
type GithubLoader struct {
Token string
}
GithubLoader reads configuration from Github URLs.
func (*GithubLoader) CanLoad ¶
func (ghl *GithubLoader) CanLoad(url string) bool
CanLoad will return true if the URL contains github
func (*GithubLoader) Load ¶
func (ghl *GithubLoader) Load(source string) (doorman.ServicesConfig, error)
Load downloads the URL into a temporary folder and loads it from disk
Source Files
¶
- lint.go
- loader.go
- loader_file.go
- loader_github.go
Click to show internal directories.
Click to hide internal directories.