server

package
v0.0.0-...-1b4910b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2018 License: MIT Imports: 20 Imported by: 0

Documentation

Index

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

func (Repository) Fetch

func (r Repository) Fetch() error

Fetch pulls from origin

func (Repository) Push

func (r Repository) Push() error

Push pushes to target

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

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

type WebHooksServerOptions

type WebHooksServerOptions struct {
	GitTimeoutSeconds uint64
	RepositoriesPath  string
	SSHPrivateKey     string
	Concurrency       int
}

WebHooksServerOptions holds server configuration options

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL