Documentation ¶
Index ¶
- func AdminHomeHandler(w http.ResponseWriter, r *http.Request)
- func FaviconHandler(w http.ResponseWriter, r *http.Request)
- func MagicPathHandler(next http.Handler) http.Handler
- func RobotsHandler(w http.ResponseWriter, r *http.Request)
- type Application
- func (a *Application) AdminRun(listen string) error
- func (a *Application) BadgeMyTaskHandler(latest bool) http.HandlerFunc
- func (a *Application) HomeHandler() http.HandlerFunc
- func (a *Application) ListServices() []string
- func (a *Application) PostImageHandler(w http.ResponseWriter, r *http.Request)
- func (a *Application) PostTaskHandler(w http.ResponseWriter, r *http.Request)
- func (a *Application) ReadmeHandler(w http.ResponseWriter, r *http.Request)
- func (a *Application) RefererMiddleware(next http.Handler) http.Handler
- func (a *Application) Run(listen string) error
- func (a *Application) ServiceMiddleware(next http.Handler) http.Handler
- func (a *Application) ServicesHandler(w http.ResponseWriter, r *http.Request)
- func (a *Application) Shutdown() error
- func (a *Application) SinkAllHandler(w http.ResponseWriter, r *http.Request)
- func (a *Application) SinkHandler(w http.ResponseWriter, r *http.Request)
- func (a *Application) StatusHandler(w http.ResponseWriter, r *http.Request)
- func (a *Application) TaskHandler(latest bool) http.HandlerFunc
- func (a *Application) TaskIDHandler(w http.ResponseWriter, r *http.Request)
- func (a *Application) TaskLogsHandler(latest bool) func(http.ResponseWriter, *http.Request)
- func (a *Application) TaskLogzHandler(latest bool) func(http.ResponseWriter, *http.Request)
- func (a *Application) VolumesHandler(basePathLen int, latest bool) http.HandlerFunc
- type HttpSink
- type ImageParams
- type Status
- type TaskMatcher
- type TaskPage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminHomeHandler ¶ added in v0.2.2
func AdminHomeHandler(w http.ResponseWriter, r *http.Request)
func FaviconHandler ¶ added in v0.2.0
func FaviconHandler(w http.ResponseWriter, r *http.Request)
func RobotsHandler ¶ added in v0.2.0
func RobotsHandler(w http.ResponseWriter, r *http.Request)
Types ¶
type Application ¶
type Application struct { Services map[string]service.Service Domain string GitlabURL string Router http.Handler AdminRouter http.Handler Sink *events.Broadcaster Server *http.Server AdminServer *http.Server Stopper chan (os.Signal) // contains filtered or unexported fields }
func (*Application) AdminRun ¶ added in v0.2.2
func (a *Application) AdminRun(listen string) error
func (*Application) BadgeMyTaskHandler ¶
func (a *Application) BadgeMyTaskHandler(latest bool) http.HandlerFunc
BadgeMyTaskHandler generates a badge for a given task
func (*Application) HomeHandler ¶
func (a *Application) HomeHandler() http.HandlerFunc
HomeHandler display the home page
func (*Application) ListServices ¶ added in v0.2.0
func (a *Application) ListServices() []string
ListServices returns a list of all services as string array
func (*Application) PostImageHandler ¶ added in v0.3.0
func (a *Application) PostImageHandler(w http.ResponseWriter, r *http.Request)
PostImageHandler is used to pull the request image, see https://docs.docker.com/engine/api/sdk/examples/#pull-an-image-with-authentication
func (*Application) PostTaskHandler ¶
func (a *Application) PostTaskHandler(w http.ResponseWriter, r *http.Request)
PostTaskHandler create a Task
func (*Application) ReadmeHandler ¶
func (a *Application) ReadmeHandler(w http.ResponseWriter, r *http.Request)
func (*Application) RefererMiddleware ¶ added in v0.2.0
func (a *Application) RefererMiddleware(next http.Handler) http.Handler
RefererMiddleware ensure that requests comes from the gitlab domain
func (*Application) Run ¶ added in v0.2.2
func (a *Application) Run(listen string) error
Run make the app listen and serve requests
func (*Application) ServiceMiddleware ¶
func (a *Application) ServiceMiddleware(next http.Handler) http.Handler
Http middleware
func (*Application) ServicesHandler ¶
func (a *Application) ServicesHandler(w http.ResponseWriter, r *http.Request)
ServicesHandler show all services
func (*Application) Shutdown ¶ added in v0.2.2
func (a *Application) Shutdown() error
Shutdown the server and put running tasks into interrupted state
func (*Application) SinkAllHandler ¶ added in v0.3.0
func (a *Application) SinkAllHandler(w http.ResponseWriter, r *http.Request)
SinkAllHandler show 5 minutes of Task events
func (*Application) SinkHandler ¶ added in v0.3.0
func (a *Application) SinkHandler(w http.ResponseWriter, r *http.Request)
SinkHandler show the events of a specific run and stop
func (*Application) StatusHandler ¶ added in v0.2.4
func (a *Application) StatusHandler(w http.ResponseWriter, r *http.Request)
func (*Application) TaskHandler ¶
func (a *Application) TaskHandler(latest bool) http.HandlerFunc
TaskHandler show a Task
func (*Application) TaskIDHandler ¶
func (a *Application) TaskIDHandler(w http.ResponseWriter, r *http.Request)
TaskIDHandler get a task using it's ID
func (*Application) TaskLogsHandler ¶ added in v0.2.2
func (a *Application) TaskLogsHandler(latest bool) func(http.ResponseWriter, *http.Request)
TaskLogsHandler get a logs for a task, used to get row logs from curl, not used for now
func (*Application) TaskLogzHandler ¶ added in v0.2.2
func (a *Application) TaskLogzHandler(latest bool) func(http.ResponseWriter, *http.Request)
TaskLogzHandler get a logs for a task
func (*Application) VolumesHandler ¶
func (a *Application) VolumesHandler(basePathLen int, latest bool) http.HandlerFunc
VolumesHandler expose volumes of a task
type HttpSink ¶ added in v0.3.0
type HttpSink struct {
// contains filtered or unexported fields
}
func NewHttpSink ¶ added in v0.3.0
type ImageParams ¶ added in v0.3.0
ImageParams describe body data
type TaskMatcher ¶ added in v0.3.0
type TaskMatcher struct {
// contains filtered or unexported fields
}
func (*TaskMatcher) Match ¶ added in v0.3.0
func (t *TaskMatcher) Match(event events.Event) bool