Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEventPayload = httputil.NewHttpError(400, "error event payload") ErrNoSupportEvent = httputil.NewHttpError(400, "no support event") ErrNoOwnerRepo = httputil.NewHttpError(400, "event no owner and repo info") ErrNoPlugins = httputil.NewHttpError(400, "no correspond plugins") ErrNoInstallation = httputil.NewHttpError(400, "no installation") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
BindAddr string `json:"bind_addr"`
LogLevel string `json:"log_level"`
LogFile string `json:"log_file"`
LogMaxDays int64 `json:"log_max_days"`
GithubAccessToken string `json:"github_access_token"`
GithubAppPrivateKey string `json:"github_app_private_key"`
GithubAppID int `json:"github_app_id"`
// repo -> plugin
RepoConfs map[string]RepoConf `json:"repo_confs"`
RepoConfDir string `json:"repo_conf_dir"`
RepoConfDirUpdateIntervalS int `json:"repo_conf_dir_update_interval_s"`
}
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
func NewEventHandler ¶
func NewEventHandler(requireInstallation bool, plugins map[string][]plugin.Plugin) *EventHandler
func (*EventHandler) HandleEvent ¶
func (*EventHandler) UpdatePlugins ¶
func (eh *EventHandler) UpdatePlugins(plugins map[string][]plugin.Plugin)
type PluginConfig ¶
type PluginConfig struct {
Disable bool `json:"disable"`
Preconditions []config.Precondition `json:"preconditions"`
Extra interface{} `json:"extra"`
}
type RepoConf ¶
type RepoConf struct {
Alias config.AliasOptions `json:"alias"`
Roles config.RoleOptions `json:"roles"` // role -> []string{user1, user2}
LabelRoles config.LabelRoles `json:"label_roles"` // label -> role -> users
Plugins map[string]PluginConfig `json:"plugins"`
}
Click to show internal directories.
Click to hide internal directories.