mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 21:00:06 +01:00
feat: adding background jobs, Dockerfile
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
.travis.yml
|
||||
README.md
|
||||
api/openapi.yaml
|
||||
api_annotations.go
|
||||
api_auth.go
|
||||
api_health.go
|
||||
api_labels.go
|
||||
api_me.go
|
||||
api_me_api_keys.go
|
||||
@@ -13,7 +15,9 @@ api_ssh.go
|
||||
api_taints.go
|
||||
client.go
|
||||
configuration.go
|
||||
docs/AnnotationsAPI.md
|
||||
docs/AuthAPI.md
|
||||
docs/DtoAnnotationResponse.md
|
||||
docs/DtoAuthStartResponse.md
|
||||
docs/DtoCreateLabelRequest.md
|
||||
docs/DtoCreateSSHRequest.md
|
||||
@@ -33,6 +37,7 @@ docs/DtoUpdateLabelRequest.md
|
||||
docs/DtoUpdateServerRequest.md
|
||||
docs/DtoUpdateTaintRequest.md
|
||||
docs/HandlersCreateUserKeyRequest.md
|
||||
docs/HandlersHealthStatus.md
|
||||
docs/HandlersMeResponse.md
|
||||
docs/HandlersMemberOut.md
|
||||
docs/HandlersMemberUpsertReq.md
|
||||
@@ -42,6 +47,7 @@ docs/HandlersOrgKeyCreateResp.md
|
||||
docs/HandlersOrgUpdateReq.md
|
||||
docs/HandlersUpdateMeRequest.md
|
||||
docs/HandlersUserAPIKeyOut.md
|
||||
docs/HealthAPI.md
|
||||
docs/LabelsAPI.md
|
||||
docs/MeAPI.md
|
||||
docs/MeAPIKeysAPI.md
|
||||
@@ -57,6 +63,7 @@ docs/UtilsErrorResponse.md
|
||||
git_push.sh
|
||||
go.mod
|
||||
go.sum
|
||||
model_dto_annotation_response.go
|
||||
model_dto_auth_start_response.go
|
||||
model_dto_create_label_request.go
|
||||
model_dto_create_server_request.go
|
||||
@@ -76,6 +83,7 @@ model_dto_update_label_request.go
|
||||
model_dto_update_server_request.go
|
||||
model_dto_update_taint_request.go
|
||||
model_handlers_create_user_key_request.go
|
||||
model_handlers_health_status.go
|
||||
model_handlers_me_response.go
|
||||
model_handlers_member_out.go
|
||||
model_handlers_member_upsert_req.go
|
||||
@@ -91,7 +99,9 @@ model_models_user.go
|
||||
model_models_user_email.go
|
||||
model_utils_error_response.go
|
||||
response.go
|
||||
test/api_annotations_test.go
|
||||
test/api_auth_test.go
|
||||
test/api_health_test.go
|
||||
test/api_labels_test.go
|
||||
test/api_me_api_keys_test.go
|
||||
test/api_me_test.go
|
||||
|
||||
@@ -78,11 +78,14 @@ All URIs are relative to *http://localhost:8080/api/v1*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*AnnotationsAPI* | [**GetAnnotation**](docs/AnnotationsAPI.md#getannotation) | **Get** /annotations/{id} | Get annotation by ID (org scoped)
|
||||
*AnnotationsAPI* | [**ListAnnotations**](docs/AnnotationsAPI.md#listannotations) | **Get** /annotations | List annotations (org scoped)
|
||||
*AuthAPI* | [**AuthCallback**](docs/AuthAPI.md#authcallback) | **Get** /auth/{provider}/callback | Handle social login callback
|
||||
*AuthAPI* | [**AuthStart**](docs/AuthAPI.md#authstart) | **Post** /auth/{provider}/start | Begin social login
|
||||
*AuthAPI* | [**GetJWKS**](docs/AuthAPI.md#getjwks) | **Get** /.well-known/jwks.json | Get JWKS
|
||||
*AuthAPI* | [**Logout**](docs/AuthAPI.md#logout) | **Post** /auth/logout | Revoke refresh token family (logout everywhere)
|
||||
*AuthAPI* | [**Refresh**](docs/AuthAPI.md#refresh) | **Post** /auth/refresh | Rotate refresh token
|
||||
*HealthAPI* | [**HealthCheckOperationId**](docs/HealthAPI.md#healthcheckoperationid) | **Get** /healthz | Basic health check
|
||||
*LabelsAPI* | [**CreateLabel**](docs/LabelsAPI.md#createlabel) | **Post** /labels | Create label (org scoped)
|
||||
*LabelsAPI* | [**DeleteLabel**](docs/LabelsAPI.md#deletelabel) | **Delete** /labels/{id} | Delete label (org scoped)
|
||||
*LabelsAPI* | [**GetLabel**](docs/LabelsAPI.md#getlabel) | **Get** /labels/{id} | Get label by ID (org scoped)
|
||||
@@ -123,6 +126,7 @@ Class | Method | HTTP request | Description
|
||||
|
||||
## Documentation For Models
|
||||
|
||||
- [DtoAnnotationResponse](docs/DtoAnnotationResponse.md)
|
||||
- [DtoAuthStartResponse](docs/DtoAuthStartResponse.md)
|
||||
- [DtoCreateLabelRequest](docs/DtoCreateLabelRequest.md)
|
||||
- [DtoCreateSSHRequest](docs/DtoCreateSSHRequest.md)
|
||||
@@ -142,6 +146,7 @@ Class | Method | HTTP request | Description
|
||||
- [DtoUpdateServerRequest](docs/DtoUpdateServerRequest.md)
|
||||
- [DtoUpdateTaintRequest](docs/DtoUpdateTaintRequest.md)
|
||||
- [HandlersCreateUserKeyRequest](docs/HandlersCreateUserKeyRequest.md)
|
||||
- [HandlersHealthStatus](docs/HandlersHealthStatus.md)
|
||||
- [HandlersMeResponse](docs/HandlersMeResponse.md)
|
||||
- [HandlersMemberOut](docs/HandlersMemberOut.md)
|
||||
- [HandlersMemberUpsertReq](docs/HandlersMemberUpsertReq.md)
|
||||
|
||||
@@ -23,6 +23,133 @@ paths:
|
||||
summary: Get JWKS
|
||||
tags:
|
||||
- Auth
|
||||
/annotations:
|
||||
get:
|
||||
description: "Returns annotations for the organization in X-Org-ID. Filters:\
|
||||
\ `name`, `value`, and `q` (name contains). Add `include=node_pools` to include\
|
||||
\ linked node pools."
|
||||
operationId: ListAnnotations
|
||||
parameters:
|
||||
- description: Organization UUID
|
||||
in: header
|
||||
name: X-Org-ID
|
||||
schema:
|
||||
type: string
|
||||
- description: Exact name
|
||||
in: query
|
||||
name: name
|
||||
schema:
|
||||
type: string
|
||||
- description: Exact value
|
||||
in: query
|
||||
name: value
|
||||
schema:
|
||||
type: string
|
||||
- description: name contains (case-insensitive)
|
||||
in: query
|
||||
name: q
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
$ref: "#/components/schemas/dto.AnnotationResponse"
|
||||
type: array
|
||||
description: OK
|
||||
"401":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
description: Unauthorized
|
||||
"403":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
description: organization required
|
||||
"500":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
description: failed to list annotations
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- OrgKeyAuth: []
|
||||
- OrgSecretAuth: []
|
||||
summary: List annotations (org scoped)
|
||||
tags:
|
||||
- Annotations
|
||||
/annotations/{id}:
|
||||
get:
|
||||
description: Returns one annotation. Add `include=node_pools` to include node
|
||||
pools.
|
||||
operationId: GetAnnotation
|
||||
parameters:
|
||||
- description: Organization UUID
|
||||
in: header
|
||||
name: X-Org-ID
|
||||
schema:
|
||||
type: string
|
||||
- description: Annotation ID (UUID)
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: "Optional: node_pools"
|
||||
in: query
|
||||
name: include
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/dto.AnnotationResponse"
|
||||
description: OK
|
||||
"400":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
description: invalid id
|
||||
"401":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
description: Unauthorized
|
||||
"403":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
description: organization required
|
||||
"404":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
description: not found
|
||||
"500":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
description: fetch failed
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- OrgKeyAuth: []
|
||||
- OrgSecretAuth: []
|
||||
summary: Get annotation by ID (org scoped)
|
||||
tags:
|
||||
- Annotations
|
||||
/auth/logout:
|
||||
post:
|
||||
operationId: Logout
|
||||
@@ -103,6 +230,20 @@ paths:
|
||||
summary: Begin social login
|
||||
tags:
|
||||
- Auth
|
||||
/healthz:
|
||||
get:
|
||||
description: Returns 200 OK when the service is up
|
||||
operationId: HealthCheck // operationId
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/handlers.HealthStatus"
|
||||
description: OK
|
||||
summary: Basic health check
|
||||
tags:
|
||||
- Health
|
||||
/labels:
|
||||
get:
|
||||
description: "Returns node labels for the organization in X-Org-ID. Filters:\
|
||||
@@ -1740,6 +1881,28 @@ paths:
|
||||
x-codegen-request-body-name: body
|
||||
components:
|
||||
schemas:
|
||||
dto.AnnotationResponse:
|
||||
example:
|
||||
updated_at: updated_at
|
||||
organization_id: organization_id
|
||||
created_at: created_at
|
||||
id: id
|
||||
value: value
|
||||
key: key
|
||||
properties:
|
||||
created_at:
|
||||
type: string
|
||||
id:
|
||||
type: string
|
||||
key:
|
||||
type: string
|
||||
organization_id:
|
||||
type: string
|
||||
updated_at:
|
||||
type: string
|
||||
value:
|
||||
type: string
|
||||
type: object
|
||||
dto.AuthStartResponse:
|
||||
example:
|
||||
auth_url: https://accounts.google.com/o/oauth2/v2/auth?client_id=...
|
||||
@@ -2054,6 +2217,14 @@ components:
|
||||
value:
|
||||
type: string
|
||||
type: object
|
||||
handlers.HealthStatus:
|
||||
example:
|
||||
status: ok
|
||||
properties:
|
||||
status:
|
||||
example: ok
|
||||
type: string
|
||||
type: object
|
||||
handlers.createUserKeyRequest:
|
||||
properties:
|
||||
expires_in_hours:
|
||||
|
||||
@@ -48,8 +48,12 @@ type APIClient struct {
|
||||
|
||||
// API Services
|
||||
|
||||
AnnotationsAPI *AnnotationsAPIService
|
||||
|
||||
AuthAPI *AuthAPIService
|
||||
|
||||
HealthAPI *HealthAPIService
|
||||
|
||||
LabelsAPI *LabelsAPIService
|
||||
|
||||
MeAPI *MeAPIService
|
||||
@@ -81,7 +85,9 @@ func NewAPIClient(cfg *Configuration) *APIClient {
|
||||
c.common.client = c
|
||||
|
||||
// API Services
|
||||
c.AnnotationsAPI = (*AnnotationsAPIService)(&c.common)
|
||||
c.AuthAPI = (*AuthAPIService)(&c.common)
|
||||
c.HealthAPI = (*HealthAPIService)(&c.common)
|
||||
c.LabelsAPI = (*LabelsAPIService)(&c.common)
|
||||
c.MeAPI = (*MeAPIService)(&c.common)
|
||||
c.MeAPIKeysAPI = (*MeAPIKeysAPIService)(&c.common)
|
||||
|
||||
Reference in New Issue
Block a user