Documentation ¶
Index ¶
- Constants
- type Repository
- type WebHooksServer
- func (ws *WebHooksServer) Configure(c config.Config) error
- func (ws *WebHooksServer) Run(address string, c config.Config, ready chan interface{})
- func (ws *WebHooksServer) Shutdown()
- func (ws *WebHooksServer) UpdateAll()
- func (ws *WebHooksServer) WebHookHandler(w http.ResponseWriter, r *http.Request)
- type WebHooksServerOptions
Constants ¶
View Source
const ( OriginRemote = "origin" TargetRemote = "target" )
Remotes names
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository is a git repo that enables to pull and push. Having an instance of this object means that we have a valid repo
type WebHooksServer ¶
type WebHooksServer struct { WebHooksClient webhooks.Client // contains filtered or unexported fields }
WebHooksServer is the server that will listen for webhooks calls and handle them
func New ¶
func New(client webhooks.Client, opts WebHooksServerOptions) *WebHooksServer
New returns a new unconfigured webhooks server
func (*WebHooksServer) Configure ¶
func (ws *WebHooksServer) Configure(c config.Config) error
Configure sets up the server
func (*WebHooksServer) Run ¶
func (ws *WebHooksServer) Run(address string, c config.Config, ready chan interface{})
Run starts the execution of the server, forever
func (*WebHooksServer) Shutdown ¶
func (ws *WebHooksServer) Shutdown()
Shutdown performs a graceful shutdown of the webhooks server
func (*WebHooksServer) UpdateAll ¶
func (ws *WebHooksServer) UpdateAll()
UpdateAll triggers an update for all the repositories
func (*WebHooksServer) WebHookHandler ¶
func (ws *WebHooksServer) WebHookHandler(w http.ResponseWriter, r *http.Request)
WebHookHandler handles a webhook request
Click to show internal directories.
Click to hide internal directories.