server

package
v0.0.0-...-0794014 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAll

func GetAll(c *gin.Context)

GetAll represents a server function we use for handling GET requests to the API. It will grab a list of all active Jenkins masters by retrieving corresponding running Docker services using the Docker API.

swagger:operation GET /jenkins get getAll

Get All Jenkins Masters

--- x-success_http_code: '200' x-response_time_sla: 5000ms x-expected_tps: '5' produces: - text/plain responses:

'200':
  description: Successful retrieval of all active Jenkins masters
  schema:
    type: string
'500':
  description: There was a problem within the API
  schema:
    type: string

func Health

func Health(c *gin.Context)

swagger:operation GET /health health getHealth

Check if the Jenkins API is available

--- x-success_http_code: '200' x-response_time_sla: 100ms x-expected_tps: '1' produces: - application/json responses:

'200':
  description: Successful 'ping' of Jenkins API
  schema:
    type: string

func Restart

func Restart(c *gin.Context)

Restart represents a server function we use for handling PUT requests to the API. It will restart a Jenkins master by by forcing a Docker Swarm service update using the Docker API.

swagger:operation PUT /jenkins/restart/:master restart putRestart

Restart Jenkins Master

--- x-success_http_code: '200' x-response_time_sla: 5000ms x-expected_tps: '5' produces: - text/plain parameters:

  • in: header name: Authorization description: GitHub personal access token required: true type: string default: 'Personal Access Token '

responses:

'200':
  description: Successful restart of the Jenkins master
  schema:
    type: string
'400':
  description: There is something wrong about the request
  schema:
    type: string
'401':
  description: Request to restart is unauthorized
  schema:
   type: string
'404':
  description: Jenkins master does not exist as a running Docker service in docker swarm
  schema:
    type: string
'500':
  description: There was a problem within the API
  schema:
    type: string

func Shutdown

func Shutdown(c *gin.Context)

Shutdown represents a server function we use for handling PUT requests to the API. It will shutdown a Jenkins master by by forcing a Docker Swarm service remove using the Docker API.

swagger:operation PUT /jenkins/shutdown/:master shutdown putShutdown

Shutdown Jenkins Master

--- x-success_http_code: '200' x-response_time_sla: 5000ms x-expected_tps: '5' produces: - text/plain parameters:

  • in: header name: Authorization description: GitHub personal access token required: true type: string default: 'Personal Access Token '

responses:

'200':
  description: Successful shutdown of the Jenkins master
  schema:
    type: string
'400':
  description: There is something wrong about the request
  schema:
    type: string
'401':
  description: Request to shutdown is unauthorized
  schema:
   type: string
'404':
  description: Jenkins master does not exist as a running Docker service in docker swarm
  schema:
    type: string
'500':
  description: There was a problem within the API
  schema:
    type: string

func Update

func Update(c *gin.Context)

Update represents a server function we use for handling PUT requests to the API. It will update a Jenkins master by updating its corresponding Docker service using the Docker API.

swagger:operation PUT /jenkins/update/:master update putUpdate

Update Jenkins Master

--- x-success_http_code: '200' x-response_time_sla: 5000ms x-expected_tps: '5' produces: - text/plain parameters:

  • in: header name: Authorization description: GitHub personal access token required: true type: string default: 'Personal Access Token '

responses:

'200':
  description: Successful update of the Jenkins master
  schema:
    type: string
'400':
  description: There is something wrong about the request
  schema:
    type: string
'401':
  description: Request to update is unauthorized
  schema:
    type: string
'404':
  description: Jenkins master does not exist as a running Docker service in docker swarm
  schema:
    type: string
'500':
  description: There was a problem within the API
  schema:
    type: string

func UpdateAll

func UpdateAll(c *gin.Context)

UpdateAll represents a server function we use for handling PUT requests to the API. It will update all Jenkins masters by updating all actively running Docker services using the Docker API.

swagger:operation PUT /jenkins/admin/update_all updateAll putUpdateAll

Update All Jenkins Masters (admins only)

--- x-success_http_code: '200' x-response_time_sla: 5000ms x-expected_tps: '5' produces: - application/json parameters:

  • in: header name: Authorization description: GitHub personal access token required: true type: string default: 'Personal Access Token '

responses:

'200':
  description: Successful update of all Jenkins masters
  schema:
    type: string
'401':
  description: Request to update all is unauthorized
  schema:
    type: string
'500':
  description: There was a problem within the API
  schema:
    type: string

Types

This section is empty.

Jump to

Keyboard shortcuts

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