api

package
v0.0.0-...-04f2c18 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Healthz

func Healthz(request *restful.Request, response *restful.Response)

Healthz is the gin handler for the GET /healthz endpoint

Types

type API

type API struct {
	// contains filtered or unexported fields
}

API represents the rest api handlers.

func New

func New(s storage.Store) API

New creates a new api handler.

func (API) Build

func (api API) Build() Build

Build returns a handler for builds.

func (API) Job

func (api API) Job() Job

Job returns a handler for jobs.

func (API) Project

func (api API) Project() Project

Project returns a handler for projects.

type Build

type Build struct {
	// contains filtered or unexported fields
}

Build represents the build api handlers.

func (Build) Get

func (api Build) Get(request *restful.Request, response *restful.Response)

Get creates a new gin handler for the GET /build/:id endpoint

func (Build) Jobs

func (api Build) Jobs(request *restful.Request, response *restful.Response)

Jobs creates a new gin handler for the GET /build/:id/jobs endpoint

func (Build) Logs

func (api Build) Logs(request *restful.Request, response *restful.Response)

Logs creates a new gin handler for the GET /build/:id/logs endpoint

type Job

type Job struct {
	// contains filtered or unexported fields
}

Job represents the job api handlers.

func (Job) Get

func (api Job) Get(request *restful.Request, response *restful.Response)

Get creates a new gin handler for the GET /job/:id endpoint

func (Job) Logs

func (api Job) Logs(request *restful.Request, response *restful.Response)

Logs creates a new gin handler for the GET /job/:id/logs endpoint

type Project

type Project struct {
	// contains filtered or unexported fields
}

Project represents the project api handlers.

func (Project) Builds

func (api Project) Builds(request *restful.Request, response *restful.Response)

Builds creates a new gin handler for the GET /project/:id/builds endpoint

func (Project) Get

func (api Project) Get(request *restful.Request, response *restful.Response)

Get creates a new gin handler for the GET /project/:id endpoint

func (Project) List

func (api Project) List(request *restful.Request, response *restful.Response)

List creates a new gin handler for the GET /projects endpoint

func (Project) ListWithLatestBuild

func (api Project) ListWithLatestBuild(request *restful.Request, response *restful.Response)

ListWithLatestBuild lists the projects with the latest builds attached.

type ProjectBuildSummary

type ProjectBuildSummary struct {
	Project   *brigade.Project `json:"project"`
	LastBuild *brigade.Build   `json:"lastBuild"`
}

ProjectBuildSummary is a project plus the latest build data

Jump to

Keyboard shortcuts

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