Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Find ¶
func Find(org, repo string, cfg []IRepoFilter) int
Types ¶
type ConfigAgent ¶
type ConfigAgent struct {
// contains filtered or unexported fields
}
func NewConfigAgent ¶
func NewConfigAgent(b NewConfig) ConfigAgent
func (*ConfigAgent) GetConfig ¶
func (ca *ConfigAgent) GetConfig() (string, Config)
func (*ConfigAgent) Start ¶
func (ca *ConfigAgent) Start(path string) error
Start starts polling path for plugin config. If the first attempt fails, then start returns the error.
func (*ConfigAgent) Stop ¶
func (ca *ConfigAgent) Stop()
type IRepoFilter ¶
type NewConfig ¶
type NewConfig func() Config
The returned value of NewConfig must be a pointer. Otherwise, it should deep copy the config when reading it.
type RepoFilter ¶
type RepoFilter struct { // Repos is either in the form of org/repos or just org. Repos []string `json:"repos" required:"true"` // ExcludedRepos is in the form of org/repo. ExcludedRepos []string `json:"excluded_repos,omitempty"` }
func (RepoFilter) CanApply ¶
func (p RepoFilter) CanApply(org, orgRepo string) (applyOrgRepo bool, applyOrg bool)
The return value will be one of the following cases: true, false: the config can be applied to the org/repo true, true: the config can be applied to the org and org/repo false, true: the config can be applied to the org except org/repo false, false: the config can be applied to neither org or org/repo
func (RepoFilter) Validate ¶
func (p RepoFilter) Validate() error
Click to show internal directories.
Click to hide internal directories.