Added frontend
This commit is contained in:
@@ -0,0 +1,714 @@
|
||||
basePath: /api/v1
|
||||
definitions:
|
||||
models.APIError:
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
type: object
|
||||
models.CreateSiteResponse:
|
||||
properties:
|
||||
raw_deploy_token:
|
||||
type: string
|
||||
site:
|
||||
$ref: '#/definitions/models.Site'
|
||||
type: object
|
||||
models.CustomHeaders:
|
||||
properties:
|
||||
headers:
|
||||
items:
|
||||
$ref: '#/definitions/models.Header'
|
||||
type: array
|
||||
id:
|
||||
type: string
|
||||
source:
|
||||
type: string
|
||||
type: object
|
||||
models.ForwardRule:
|
||||
properties:
|
||||
destination:
|
||||
type: string
|
||||
id:
|
||||
type: string
|
||||
regex:
|
||||
type: boolean
|
||||
source:
|
||||
type: string
|
||||
status_code:
|
||||
type: integer
|
||||
type: object
|
||||
models.GetAllSitesResponse:
|
||||
properties:
|
||||
sites:
|
||||
items:
|
||||
$ref: '#/definitions/models.Site'
|
||||
type: array
|
||||
total:
|
||||
type: integer
|
||||
type: object
|
||||
models.Header:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
key:
|
||||
type: string
|
||||
value:
|
||||
type: string
|
||||
type: object
|
||||
models.Site:
|
||||
properties:
|
||||
branch:
|
||||
type: string
|
||||
custom_headers:
|
||||
items:
|
||||
$ref: '#/definitions/models.CustomHeaders'
|
||||
type: array
|
||||
deploy_token:
|
||||
type: string
|
||||
domain:
|
||||
type: string
|
||||
enabled:
|
||||
type: boolean
|
||||
forward_rules:
|
||||
items:
|
||||
$ref: '#/definitions/models.ForwardRule'
|
||||
type: array
|
||||
git_server:
|
||||
type: string
|
||||
id:
|
||||
type: string
|
||||
not_found_file:
|
||||
type: string
|
||||
owner:
|
||||
type: string
|
||||
repository:
|
||||
type: string
|
||||
spa:
|
||||
type: boolean
|
||||
type: object
|
||||
host: localhost:4321
|
||||
info:
|
||||
contact: {}
|
||||
description: Self-hosted static site deployment service
|
||||
title: Quay API
|
||||
version: "1.0"
|
||||
paths:
|
||||
/custom-headers/{id}:
|
||||
delete:
|
||||
description: Deletes a custom header group by ID
|
||||
parameters:
|
||||
- description: Custom Headers ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"204":
|
||||
description: No content
|
||||
"404":
|
||||
description: Custom headers not found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Delete a custom header group
|
||||
tags:
|
||||
- Custom-Headers
|
||||
get:
|
||||
description: Returns a single custom header group by ID
|
||||
parameters:
|
||||
- description: Custom Headers ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Custom header group
|
||||
schema:
|
||||
$ref: '#/definitions/models.CustomHeaders'
|
||||
"404":
|
||||
description: Custom headers not found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Get a custom header group
|
||||
tags:
|
||||
- Custom-Headers
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Replaces an existing custom header group by ID
|
||||
parameters:
|
||||
- description: Custom Headers ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
- description: Updated custom header group
|
||||
in: body
|
||||
name: customHeaders
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.CustomHeaders'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Updated custom header group
|
||||
schema:
|
||||
$ref: '#/definitions/models.CustomHeaders'
|
||||
"400":
|
||||
description: Invalid request body
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"404":
|
||||
description: Custom headers not found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Update a custom header group
|
||||
tags:
|
||||
- Custom-Headers
|
||||
/custom-headers/{id}/headers:
|
||||
get:
|
||||
description: Returns all individual headers belonging to the given custom header
|
||||
group
|
||||
parameters:
|
||||
- description: Custom Headers ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: List of headers
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/models.Header'
|
||||
type: array
|
||||
"404":
|
||||
description: Custom headers not found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: List headers in a custom header group
|
||||
tags:
|
||||
- Custom-Headers
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Creates a new header within the given custom header group
|
||||
parameters:
|
||||
- description: Custom Headers ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
- description: Header to create
|
||||
in: body
|
||||
name: header
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.Header'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Created header
|
||||
schema:
|
||||
$ref: '#/definitions/models.Header'
|
||||
"400":
|
||||
description: Invalid request body
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"404":
|
||||
description: Custom headers not found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Create a header
|
||||
tags:
|
||||
- Headers
|
||||
/forward-rules/{id}:
|
||||
delete:
|
||||
description: Deletes a forward rule by ID
|
||||
parameters:
|
||||
- description: Forward Rule ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"204":
|
||||
description: No content
|
||||
"404":
|
||||
description: Forward rule not found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Delete a forward rule
|
||||
tags:
|
||||
- Forward-Rules
|
||||
get:
|
||||
description: Returns a single forward rule by ID
|
||||
parameters:
|
||||
- description: Forward Rule ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Forward rule
|
||||
schema:
|
||||
$ref: '#/definitions/models.ForwardRule'
|
||||
"404":
|
||||
description: Forward rule not found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Get a forward rule
|
||||
tags:
|
||||
- Forward-Rules
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Replaces an existing forward rule by ID
|
||||
parameters:
|
||||
- description: Forward Rule ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
- description: Updated forward rule
|
||||
in: body
|
||||
name: rule
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.ForwardRule'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Updated forward rule
|
||||
schema:
|
||||
$ref: '#/definitions/models.ForwardRule'
|
||||
"400":
|
||||
description: Invalid request body
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"404":
|
||||
description: Forward rule not found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Update a forward rule
|
||||
tags:
|
||||
- Forward-Rules
|
||||
/headers/{id}:
|
||||
delete:
|
||||
description: Deletes a header by ID
|
||||
parameters:
|
||||
- description: Header ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"204":
|
||||
description: No content
|
||||
"404":
|
||||
description: Header not found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Delete a header
|
||||
tags:
|
||||
- Headers
|
||||
get:
|
||||
description: Returns a single header by ID
|
||||
parameters:
|
||||
- description: Header ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Header
|
||||
schema:
|
||||
$ref: '#/definitions/models.Header'
|
||||
"404":
|
||||
description: Header not found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Get a header
|
||||
tags:
|
||||
- Headers
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Replaces an existing header by ID
|
||||
parameters:
|
||||
- description: Header ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
- description: Updated header
|
||||
in: body
|
||||
name: header
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.Header'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Updated header
|
||||
schema:
|
||||
$ref: '#/definitions/models.Header'
|
||||
"400":
|
||||
description: Invalid request body
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"404":
|
||||
description: Header not found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Update a header
|
||||
tags:
|
||||
- Headers
|
||||
/sites:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Get a list of all sites
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/models.GetAllSitesResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Get all sites
|
||||
tags:
|
||||
- Sites
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Create a new site with the provided details
|
||||
parameters:
|
||||
- description: Site details
|
||||
in: body
|
||||
name: site
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.Site'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/models.CreateSiteResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Create a new site
|
||||
tags:
|
||||
- Sites
|
||||
/sites/{id}:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Delete a site by its ID
|
||||
parameters:
|
||||
- description: Site ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"204":
|
||||
description: No Content
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Delete a site
|
||||
tags:
|
||||
- Sites
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Get a single site by its ID
|
||||
parameters:
|
||||
- description: Site ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/models.Site'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Get site by ID
|
||||
tags:
|
||||
- Sites
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Update an existing site by its ID
|
||||
parameters:
|
||||
- description: Site ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
- description: Updated site details
|
||||
in: body
|
||||
name: site
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.Site'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/models.Site'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Update an existing site
|
||||
tags:
|
||||
- Sites
|
||||
/sites/{id}/custom-headers:
|
||||
get:
|
||||
description: Returns all custom header groups associated with the given site
|
||||
parameters:
|
||||
- description: Site ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: List of custom header groups
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/models.CustomHeaders'
|
||||
type: array
|
||||
"404":
|
||||
description: Site not found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: List custom header groups for a site
|
||||
tags:
|
||||
- Custom-Headers
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Creates a new custom header group for the given site
|
||||
parameters:
|
||||
- description: Site ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
- description: Custom header group to create
|
||||
in: body
|
||||
name: customHeaders
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.CustomHeaders'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Created custom header group
|
||||
schema:
|
||||
$ref: '#/definitions/models.CustomHeaders'
|
||||
"400":
|
||||
description: Invalid request body
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"404":
|
||||
description: Site not found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Create a custom header group
|
||||
tags:
|
||||
- Custom-Headers
|
||||
/sites/{id}/forward-rules:
|
||||
get:
|
||||
description: Returns all forward rules associated with the given site
|
||||
parameters:
|
||||
- description: Site ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: List of forward rules
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/models.ForwardRule'
|
||||
type: array
|
||||
"404":
|
||||
description: Site not found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: List forward rules for a site
|
||||
tags:
|
||||
- Forward-Rules
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Creates a new forward rule for the given site
|
||||
parameters:
|
||||
- description: Site ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
- description: Forward rule to create
|
||||
in: body
|
||||
name: rule
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.ForwardRule'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Created forward rule
|
||||
schema:
|
||||
$ref: '#/definitions/models.ForwardRule'
|
||||
"400":
|
||||
description: Invalid request body
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"404":
|
||||
description: Site not found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Create a forward rule
|
||||
tags:
|
||||
- Forward-Rules
|
||||
swagger: "2.0"
|
||||
tags:
|
||||
- description: Manage sites
|
||||
name: Sites
|
||||
- description: Manage redirect rules for a site
|
||||
name: Forward-Rules
|
||||
- description: Manage custom header groups for a site
|
||||
name: Custom-Headers
|
||||
- description: Manage individual headers within a custom header group
|
||||
name: Headers
|
||||
Reference in New Issue
Block a user