feat: add swagger annotations for open API router (#3885)
Signed-off-by: BruceAko <chongzhi@hust.edu.cn>
This commit is contained in:
parent
5eec091e94
commit
a700f5e14d
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,4 @@
|
||||||
basePath: /api/v1
|
basePath: /
|
||||||
definitions:
|
definitions:
|
||||||
d7y_io_dragonfly_v2_manager_models.Application:
|
d7y_io_dragonfly_v2_manager_models.Application:
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -1075,7 +1075,7 @@ info:
|
||||||
title: Dragonfly Manager
|
title: Dragonfly Manager
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
paths:
|
paths:
|
||||||
/applications:
|
/api/v1/applications:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -1140,7 +1140,7 @@ paths:
|
||||||
summary: Create Application
|
summary: Create Application
|
||||||
tags:
|
tags:
|
||||||
- Application
|
- Application
|
||||||
/applications/{id}:
|
/api/v1/applications/{id}:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -1223,7 +1223,7 @@ paths:
|
||||||
summary: Update Application
|
summary: Update Application
|
||||||
tags:
|
tags:
|
||||||
- Application
|
- Application
|
||||||
/buckets:
|
/api/v1/buckets:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -1271,7 +1271,7 @@ paths:
|
||||||
summary: Create Bucket
|
summary: Create Bucket
|
||||||
tags:
|
tags:
|
||||||
- Bucket
|
- Bucket
|
||||||
/buckets/{id}:
|
/api/v1/buckets/{id}:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -1322,7 +1322,7 @@ paths:
|
||||||
summary: Get Bucket
|
summary: Get Bucket
|
||||||
tags:
|
tags:
|
||||||
- Bucket
|
- Bucket
|
||||||
/clusters:
|
/api/v1/clusters:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -1387,7 +1387,7 @@ paths:
|
||||||
summary: Create Cluster
|
summary: Create Cluster
|
||||||
tags:
|
tags:
|
||||||
- Cluster
|
- Cluster
|
||||||
/clusters/{id}:
|
/api/v1/clusters/{id}:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -1470,7 +1470,7 @@ paths:
|
||||||
summary: Update Cluster
|
summary: Update Cluster
|
||||||
tags:
|
tags:
|
||||||
- Cluster
|
- Cluster
|
||||||
/configs:
|
/api/v1/configs:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -1535,7 +1535,7 @@ paths:
|
||||||
summary: Create Config
|
summary: Create Config
|
||||||
tags:
|
tags:
|
||||||
- Config
|
- Config
|
||||||
/configs/{id}:
|
/api/v1/configs/{id}:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -1618,26 +1618,7 @@ paths:
|
||||||
summary: Update Config
|
summary: Update Config
|
||||||
tags:
|
tags:
|
||||||
- Config
|
- Config
|
||||||
/healthy:
|
/api/v1/jobs:
|
||||||
get:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
description: Get app health
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
"400":
|
|
||||||
description: Bad Request
|
|
||||||
"404":
|
|
||||||
description: Not Found
|
|
||||||
"500":
|
|
||||||
description: Internal Server Error
|
|
||||||
summary: Get Health
|
|
||||||
tags:
|
|
||||||
- Health
|
|
||||||
/jobs:
|
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -1675,34 +1656,7 @@ paths:
|
||||||
summary: Get Jobs
|
summary: Get Jobs
|
||||||
tags:
|
tags:
|
||||||
- Job
|
- Job
|
||||||
post:
|
/api/v1/jobs/{id}:
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
description: Create by json config
|
|
||||||
parameters:
|
|
||||||
- description: Job
|
|
||||||
in: body
|
|
||||||
name: Job
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_types.CreateJobRequest'
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_models.Job'
|
|
||||||
"400":
|
|
||||||
description: Bad Request
|
|
||||||
"404":
|
|
||||||
description: Not Found
|
|
||||||
"500":
|
|
||||||
description: Internal Server Error
|
|
||||||
summary: Create Job
|
|
||||||
tags:
|
|
||||||
- Job
|
|
||||||
/jobs/{id}:
|
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -1785,7 +1739,7 @@ paths:
|
||||||
summary: Update Job
|
summary: Update Job
|
||||||
tags:
|
tags:
|
||||||
- Job
|
- Job
|
||||||
/oauth:
|
/api/v1/oauth:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -1850,7 +1804,7 @@ paths:
|
||||||
summary: Create Oauth
|
summary: Create Oauth
|
||||||
tags:
|
tags:
|
||||||
- Oauth
|
- Oauth
|
||||||
/oauth/{id}:
|
/api/v1/oauth/{id}:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -1933,7 +1887,7 @@ paths:
|
||||||
summary: Update Oauth
|
summary: Update Oauth
|
||||||
tags:
|
tags:
|
||||||
- Oauth
|
- Oauth
|
||||||
/peers:
|
/api/v1/peers:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -1998,7 +1952,7 @@ paths:
|
||||||
summary: Create Peer
|
summary: Create Peer
|
||||||
tags:
|
tags:
|
||||||
- Peer
|
- Peer
|
||||||
/peers/{id}:
|
/api/v1/peers/{id}:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -2049,7 +2003,7 @@ paths:
|
||||||
summary: Get Peer
|
summary: Get Peer
|
||||||
tags:
|
tags:
|
||||||
- Peer
|
- Peer
|
||||||
/permissions:
|
/api/v1/permissions:
|
||||||
get:
|
get:
|
||||||
description: Get Permissions
|
description: Get Permissions
|
||||||
produces:
|
produces:
|
||||||
|
|
@ -2068,7 +2022,7 @@ paths:
|
||||||
summary: Get Permissions
|
summary: Get Permissions
|
||||||
tags:
|
tags:
|
||||||
- Permission
|
- Permission
|
||||||
/personal-access-tokens:
|
/api/v1/personal-access-tokens:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -2133,7 +2087,7 @@ paths:
|
||||||
summary: Create PersonalAccessToken
|
summary: Create PersonalAccessToken
|
||||||
tags:
|
tags:
|
||||||
- PersonalAccessToken
|
- PersonalAccessToken
|
||||||
/personal-access-tokens/{id}:
|
/api/v1/personal-access-tokens/{id}:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -2216,62 +2170,7 @@ paths:
|
||||||
summary: Update PersonalAccessToken
|
summary: Update PersonalAccessToken
|
||||||
tags:
|
tags:
|
||||||
- PersonalAccessToken
|
- PersonalAccessToken
|
||||||
/preheats:
|
/api/v1/roles:
|
||||||
post:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
description: Create by json config
|
|
||||||
parameters:
|
|
||||||
- description: Preheat
|
|
||||||
in: body
|
|
||||||
name: Preheat
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_types.CreateV1PreheatRequest'
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_types.CreateV1PreheatResponse'
|
|
||||||
"400":
|
|
||||||
description: Bad Request
|
|
||||||
"404":
|
|
||||||
description: Not Found
|
|
||||||
"500":
|
|
||||||
description: Internal Server Error
|
|
||||||
summary: Create V1 Preheat
|
|
||||||
tags:
|
|
||||||
- Preheat
|
|
||||||
/preheats/{id}:
|
|
||||||
get:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
description: Get Preheat by id
|
|
||||||
parameters:
|
|
||||||
- description: id
|
|
||||||
in: path
|
|
||||||
name: id
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_types.GetV1PreheatResponse'
|
|
||||||
"400":
|
|
||||||
description: Bad Request
|
|
||||||
"404":
|
|
||||||
description: Not Found
|
|
||||||
"500":
|
|
||||||
description: Internal Server Error
|
|
||||||
summary: Get V1 Preheat
|
|
||||||
tags:
|
|
||||||
- Preheat
|
|
||||||
/roles:
|
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -2311,7 +2210,7 @@ paths:
|
||||||
summary: Create Role
|
summary: Create Role
|
||||||
tags:
|
tags:
|
||||||
- Role
|
- Role
|
||||||
/roles/{role}:
|
/api/v1/roles/{role}:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -2356,7 +2255,7 @@ paths:
|
||||||
summary: Get Role
|
summary: Get Role
|
||||||
tags:
|
tags:
|
||||||
- Role
|
- Role
|
||||||
/roles/{role}/permissions:
|
/api/v1/roles/{role}/permissions:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -2413,7 +2312,7 @@ paths:
|
||||||
summary: Add Permission For Role
|
summary: Add Permission For Role
|
||||||
tags:
|
tags:
|
||||||
- Role
|
- Role
|
||||||
/scheduler-clusters:
|
/api/v1/scheduler-clusters:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -2478,7 +2377,7 @@ paths:
|
||||||
summary: Create SchedulerCluster
|
summary: Create SchedulerCluster
|
||||||
tags:
|
tags:
|
||||||
- SchedulerCluster
|
- SchedulerCluster
|
||||||
/scheduler-clusters/{id}:
|
/api/v1/scheduler-clusters/{id}:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -2561,7 +2460,7 @@ paths:
|
||||||
summary: Update SchedulerCluster
|
summary: Update SchedulerCluster
|
||||||
tags:
|
tags:
|
||||||
- SchedulerCluster
|
- SchedulerCluster
|
||||||
/scheduler-clusters/{id}/schedulers/{scheduler_id}:
|
/api/v1/scheduler-clusters/{id}/schedulers/{scheduler_id}:
|
||||||
put:
|
put:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -2591,7 +2490,7 @@ paths:
|
||||||
summary: Add Scheduler to schedulerCluster
|
summary: Add Scheduler to schedulerCluster
|
||||||
tags:
|
tags:
|
||||||
- SchedulerCluster
|
- SchedulerCluster
|
||||||
/scheduler-features:
|
/api/v1/scheduler-features:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -2614,7 +2513,7 @@ paths:
|
||||||
summary: Get Scheudler Features
|
summary: Get Scheudler Features
|
||||||
tags:
|
tags:
|
||||||
- Scheduler Feature
|
- Scheduler Feature
|
||||||
/schedulers:
|
/api/v1/schedulers:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -2679,7 +2578,7 @@ paths:
|
||||||
summary: Create Scheduler
|
summary: Create Scheduler
|
||||||
tags:
|
tags:
|
||||||
- Scheduler
|
- Scheduler
|
||||||
/schedulers/{id}:
|
/api/v1/schedulers/{id}:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -2762,7 +2661,7 @@ paths:
|
||||||
summary: Update Scheduler
|
summary: Update Scheduler
|
||||||
tags:
|
tags:
|
||||||
- Scheduler
|
- Scheduler
|
||||||
/seed-peer-clusters:
|
/api/v1/seed-peer-clusters:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -2827,7 +2726,7 @@ paths:
|
||||||
summary: Create SeedPeerCluster
|
summary: Create SeedPeerCluster
|
||||||
tags:
|
tags:
|
||||||
- SeedPeerCluster
|
- SeedPeerCluster
|
||||||
/seed-peer-clusters/{id}:
|
/api/v1/seed-peer-clusters/{id}:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -2910,7 +2809,7 @@ paths:
|
||||||
summary: Update SeedPeerCluster
|
summary: Update SeedPeerCluster
|
||||||
tags:
|
tags:
|
||||||
- SeedPeerCluster
|
- SeedPeerCluster
|
||||||
/seed-peer-clusters/{id}/scheduler-clusters/{scheduler_cluster_id}:
|
/api/v1/seed-peer-clusters/{id}/scheduler-clusters/{scheduler_cluster_id}:
|
||||||
put:
|
put:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -2940,7 +2839,7 @@ paths:
|
||||||
summary: Add SchedulerCluster to SeedPeerCluster
|
summary: Add SchedulerCluster to SeedPeerCluster
|
||||||
tags:
|
tags:
|
||||||
- SeedPeerCluster
|
- SeedPeerCluster
|
||||||
/seed-peer-clusters/{id}/seed-peers/{seed_peer_id}:
|
/api/v1/seed-peer-clusters/{id}/seed-peers/{seed_peer_id}:
|
||||||
put:
|
put:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -2970,7 +2869,7 @@ paths:
|
||||||
summary: Add Instance to SeedPeerCluster
|
summary: Add Instance to SeedPeerCluster
|
||||||
tags:
|
tags:
|
||||||
- SeedPeerCluster
|
- SeedPeerCluster
|
||||||
/seed-peers:
|
/api/v1/seed-peers:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -3035,7 +2934,7 @@ paths:
|
||||||
summary: Create SeedPeer
|
summary: Create SeedPeer
|
||||||
tags:
|
tags:
|
||||||
- SeedPeer
|
- SeedPeer
|
||||||
/seed-peers/{id}:
|
/api/v1/seed-peers/{id}:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -3118,7 +3017,7 @@ paths:
|
||||||
summary: Update SeedPeer
|
summary: Update SeedPeer
|
||||||
tags:
|
tags:
|
||||||
- SeedPeer
|
- SeedPeer
|
||||||
/user/signin/{name}:
|
/api/v1/user/signin/{name}:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -3143,7 +3042,7 @@ paths:
|
||||||
summary: Oauth Signin
|
summary: Oauth Signin
|
||||||
tags:
|
tags:
|
||||||
- User
|
- User
|
||||||
/user/signin/{name}/callback:
|
/api/v1/user/signin/{name}/callback:
|
||||||
get:
|
get:
|
||||||
description: oauth signin callback by json config
|
description: oauth signin callback by json config
|
||||||
parameters:
|
parameters:
|
||||||
|
|
@ -3169,7 +3068,7 @@ paths:
|
||||||
summary: Oauth Signin Callback
|
summary: Oauth Signin Callback
|
||||||
tags:
|
tags:
|
||||||
- Oauth
|
- Oauth
|
||||||
/user/signup:
|
/api/v1/user/signup:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -3195,7 +3094,7 @@ paths:
|
||||||
summary: SignUp user
|
summary: SignUp user
|
||||||
tags:
|
tags:
|
||||||
- User
|
- User
|
||||||
/users:
|
/api/v1/users:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -3233,7 +3132,7 @@ paths:
|
||||||
summary: Get Users
|
summary: Get Users
|
||||||
tags:
|
tags:
|
||||||
- User
|
- User
|
||||||
/users/{id}:
|
/api/v1/users/{id}:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -3292,7 +3191,7 @@ paths:
|
||||||
summary: Update User
|
summary: Update User
|
||||||
tags:
|
tags:
|
||||||
- User
|
- User
|
||||||
/users/{id}/reset_password:
|
/api/v1/users/{id}/reset_password:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -3321,7 +3220,7 @@ paths:
|
||||||
summary: Reset Password For User
|
summary: Reset Password For User
|
||||||
tags:
|
tags:
|
||||||
- User
|
- User
|
||||||
/users/{id}/roles:
|
/api/v1/users/{id}/roles:
|
||||||
get:
|
get:
|
||||||
description: get roles by json config
|
description: get roles by json config
|
||||||
parameters:
|
parameters:
|
||||||
|
|
@ -3346,7 +3245,7 @@ paths:
|
||||||
summary: Get User Roles
|
summary: Get User Roles
|
||||||
tags:
|
tags:
|
||||||
- User
|
- User
|
||||||
/users/{id}/roles/{role}:
|
/api/v1/users/{id}/roles/{role}:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -3401,4 +3300,379 @@ paths:
|
||||||
summary: Add Role For User
|
summary: Add Role For User
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- Users
|
||||||
|
/healthy:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Get app health
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
summary: Get Health
|
||||||
|
tags:
|
||||||
|
- Health
|
||||||
|
/oapi/v1/clusters:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Get Clusters
|
||||||
|
parameters:
|
||||||
|
- default: 0
|
||||||
|
description: current page
|
||||||
|
in: query
|
||||||
|
name: page
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
- default: 10
|
||||||
|
description: return max item count, default 10, max 50
|
||||||
|
in: query
|
||||||
|
maximum: 50
|
||||||
|
minimum: 2
|
||||||
|
name: per_page
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_types.GetClusterResponse'
|
||||||
|
type: array
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
summary: Get Clusters
|
||||||
|
tags:
|
||||||
|
- Cluster
|
||||||
|
post:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Create by json config
|
||||||
|
parameters:
|
||||||
|
- description: Cluster
|
||||||
|
in: body
|
||||||
|
name: Cluster
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_types.CreateClusterRequest'
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_types.CreateClusterResponse'
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
summary: Create Cluster
|
||||||
|
tags:
|
||||||
|
- Cluster
|
||||||
|
/oapi/v1/clusters/{id}:
|
||||||
|
delete:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Destroy by id
|
||||||
|
parameters:
|
||||||
|
- description: id
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
summary: Destroy Cluster
|
||||||
|
tags:
|
||||||
|
- Cluster
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Get Cluster by id
|
||||||
|
parameters:
|
||||||
|
- description: id
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_types.GetClusterResponse'
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
summary: Get Cluster
|
||||||
|
tags:
|
||||||
|
- Cluster
|
||||||
|
patch:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Update by json config
|
||||||
|
parameters:
|
||||||
|
- description: id
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- description: Cluster
|
||||||
|
in: body
|
||||||
|
name: Cluster
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_types.UpdateClusterRequest'
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_types.UpdateClusterResponse'
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
summary: Update Cluster
|
||||||
|
tags:
|
||||||
|
- Cluster
|
||||||
|
/oapi/v1/jobs:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Get Jobs
|
||||||
|
parameters:
|
||||||
|
- default: 0
|
||||||
|
description: current page
|
||||||
|
in: query
|
||||||
|
name: page
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
- default: 10
|
||||||
|
description: return max item count, default 10, max 50
|
||||||
|
in: query
|
||||||
|
maximum: 50
|
||||||
|
minimum: 2
|
||||||
|
name: per_page
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_models.Job'
|
||||||
|
type: array
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
summary: Get Jobs
|
||||||
|
tags:
|
||||||
|
- Job
|
||||||
|
post:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Create by json config
|
||||||
|
parameters:
|
||||||
|
- description: Job
|
||||||
|
in: body
|
||||||
|
name: Job
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_types.CreateJobRequest'
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_models.Job'
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
summary: Create Job
|
||||||
|
tags:
|
||||||
|
- Job
|
||||||
|
/oapi/v1/jobs/{id}:
|
||||||
|
delete:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Destroy by id
|
||||||
|
parameters:
|
||||||
|
- description: id
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
summary: Destroy Job
|
||||||
|
tags:
|
||||||
|
- Job
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Get Job by id
|
||||||
|
parameters:
|
||||||
|
- description: id
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_models.Job'
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
summary: Get Job
|
||||||
|
tags:
|
||||||
|
- Job
|
||||||
|
patch:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Update by json config
|
||||||
|
parameters:
|
||||||
|
- description: id
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- description: Job
|
||||||
|
in: body
|
||||||
|
name: Job
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_types.UpdateJobRequest'
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_models.Job'
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
summary: Update Job
|
||||||
|
tags:
|
||||||
|
- Job
|
||||||
|
/preheats:
|
||||||
|
post:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Create by json config
|
||||||
|
parameters:
|
||||||
|
- description: Preheat
|
||||||
|
in: body
|
||||||
|
name: Preheat
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_types.CreateV1PreheatRequest'
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_types.CreateV1PreheatResponse'
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
summary: Create V1 Preheat
|
||||||
|
tags:
|
||||||
|
- Preheat
|
||||||
|
/preheats/{id}:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Get Preheat by id
|
||||||
|
parameters:
|
||||||
|
- description: id
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/d7y_io_dragonfly_v2_manager_types.GetV1PreheatResponse'
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
summary: Get V1 Preheat
|
||||||
|
tags:
|
||||||
|
- Preheat
|
||||||
swagger: "2.0"
|
swagger: "2.0"
|
||||||
|
tags:
|
||||||
|
- description: API router (/api/v1)
|
||||||
|
name: api
|
||||||
|
- description: open API router (/oapi/v1)
|
||||||
|
name: oapi
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,11 @@ import (
|
||||||
// @contact.url https://d7y.io
|
// @contact.url https://d7y.io
|
||||||
// @license.name Apache 2.0
|
// @license.name Apache 2.0
|
||||||
// @host localhost:8080
|
// @host localhost:8080
|
||||||
// @BasePath /api/v1
|
// @BasePath /
|
||||||
|
// @tag.name api
|
||||||
|
// @tag.description API router (/api/v1)
|
||||||
|
// @tag.name oapi
|
||||||
|
// @tag.description open API router (/oapi/v1)
|
||||||
func main() {
|
func main() {
|
||||||
cmd.Execute()
|
cmd.Execute()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ import (
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /applications [post]
|
// @Router /api/v1/applications [post]
|
||||||
func (h *Handlers) CreateApplication(ctx *gin.Context) {
|
func (h *Handlers) CreateApplication(ctx *gin.Context) {
|
||||||
var json types.CreateApplicationRequest
|
var json types.CreateApplicationRequest
|
||||||
if err := ctx.ShouldBindJSON(&json); err != nil {
|
if err := ctx.ShouldBindJSON(&json); err != nil {
|
||||||
|
|
@ -63,7 +63,7 @@ func (h *Handlers) CreateApplication(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /applications/{id} [delete]
|
// @Router /api/v1/applications/{id} [delete]
|
||||||
func (h *Handlers) DestroyApplication(ctx *gin.Context) {
|
func (h *Handlers) DestroyApplication(ctx *gin.Context) {
|
||||||
var params types.ApplicationParams
|
var params types.ApplicationParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -90,7 +90,7 @@ func (h *Handlers) DestroyApplication(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /applications/{id} [patch]
|
// @Router /api/v1/applications/{id} [patch]
|
||||||
func (h *Handlers) UpdateApplication(ctx *gin.Context) {
|
func (h *Handlers) UpdateApplication(ctx *gin.Context) {
|
||||||
var params types.ApplicationParams
|
var params types.ApplicationParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -123,7 +123,7 @@ func (h *Handlers) UpdateApplication(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /applications/{id} [get]
|
// @Router /api/v1/applications/{id} [get]
|
||||||
func (h *Handlers) GetApplication(ctx *gin.Context) {
|
func (h *Handlers) GetApplication(ctx *gin.Context) {
|
||||||
var params types.ApplicationParams
|
var params types.ApplicationParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -151,7 +151,7 @@ func (h *Handlers) GetApplication(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /applications [get]
|
// @Router /api/v1/applications [get]
|
||||||
func (h *Handlers) GetApplications(ctx *gin.Context) {
|
func (h *Handlers) GetApplications(ctx *gin.Context) {
|
||||||
var query types.GetApplicationsQuery
|
var query types.GetApplicationsQuery
|
||||||
if err := ctx.ShouldBindQuery(&query); err != nil {
|
if err := ctx.ShouldBindQuery(&query); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ import (
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /buckets [post]
|
// @Router /api/v1/buckets [post]
|
||||||
func (h *Handlers) CreateBucket(ctx *gin.Context) {
|
func (h *Handlers) CreateBucket(ctx *gin.Context) {
|
||||||
var json types.CreateBucketRequest
|
var json types.CreateBucketRequest
|
||||||
if err := ctx.ShouldBindJSON(&json); err != nil {
|
if err := ctx.ShouldBindJSON(&json); err != nil {
|
||||||
|
|
@ -65,7 +65,7 @@ func (h *Handlers) CreateBucket(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /buckets/{id} [delete]
|
// @Router /api/v1/buckets/{id} [delete]
|
||||||
func (h *Handlers) DestroyBucket(ctx *gin.Context) {
|
func (h *Handlers) DestroyBucket(ctx *gin.Context) {
|
||||||
var params types.BucketParams
|
var params types.BucketParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -91,7 +91,7 @@ func (h *Handlers) DestroyBucket(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /buckets/{id} [get]
|
// @Router /api/v1/buckets/{id} [get]
|
||||||
func (h *Handlers) GetBucket(ctx *gin.Context) {
|
func (h *Handlers) GetBucket(ctx *gin.Context) {
|
||||||
var params types.BucketParams
|
var params types.BucketParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -117,7 +117,7 @@ func (h *Handlers) GetBucket(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /buckets [get]
|
// @Router /api/v1/buckets [get]
|
||||||
func (h *Handlers) GetBuckets(ctx *gin.Context) {
|
func (h *Handlers) GetBuckets(ctx *gin.Context) {
|
||||||
buckets, err := h.service.GetBuckets(ctx.Request.Context())
|
buckets, err := h.service.GetBuckets(ctx.Request.Context())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,8 @@ import (
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /clusters [post]
|
// @Router /api/v1/clusters [post]
|
||||||
|
// @Router /oapi/v1/clusters [post]
|
||||||
func (h *Handlers) CreateCluster(ctx *gin.Context) {
|
func (h *Handlers) CreateCluster(ctx *gin.Context) {
|
||||||
var json types.CreateClusterRequest
|
var json types.CreateClusterRequest
|
||||||
if err := ctx.ShouldBindJSON(&json); err != nil {
|
if err := ctx.ShouldBindJSON(&json); err != nil {
|
||||||
|
|
@ -63,7 +64,8 @@ func (h *Handlers) CreateCluster(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /clusters/{id} [delete]
|
// @Router /api/v1/clusters/{id} [delete]
|
||||||
|
// @Router /oapi/v1/clusters/{id} [delete]
|
||||||
func (h *Handlers) DestroyCluster(ctx *gin.Context) {
|
func (h *Handlers) DestroyCluster(ctx *gin.Context) {
|
||||||
var params types.ClusterParams
|
var params types.ClusterParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -90,7 +92,8 @@ func (h *Handlers) DestroyCluster(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /clusters/{id} [patch]
|
// @Router /api/v1/clusters/{id} [patch]
|
||||||
|
// @Router /oapi/v1/clusters/{id} [patch]
|
||||||
func (h *Handlers) UpdateCluster(ctx *gin.Context) {
|
func (h *Handlers) UpdateCluster(ctx *gin.Context) {
|
||||||
var params types.ClusterParams
|
var params types.ClusterParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -123,7 +126,8 @@ func (h *Handlers) UpdateCluster(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /clusters/{id} [get]
|
// @Router /api/v1/clusters/{id} [get]
|
||||||
|
// @Router /oapi/v1/clusters/{id} [get]
|
||||||
func (h *Handlers) GetCluster(ctx *gin.Context) {
|
func (h *Handlers) GetCluster(ctx *gin.Context) {
|
||||||
var params types.ClusterParams
|
var params types.ClusterParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -151,7 +155,8 @@ func (h *Handlers) GetCluster(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /clusters [get]
|
// @Router /api/v1/clusters [get]
|
||||||
|
// @Router /oapi/v1/clusters [get]
|
||||||
func (h *Handlers) GetClusters(ctx *gin.Context) {
|
func (h *Handlers) GetClusters(ctx *gin.Context) {
|
||||||
var query types.GetClustersQuery
|
var query types.GetClustersQuery
|
||||||
if err := ctx.ShouldBindQuery(&query); err != nil {
|
if err := ctx.ShouldBindQuery(&query); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ import (
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /configs [post]
|
// @Router /api/v1/configs [post]
|
||||||
func (h *Handlers) CreateConfig(ctx *gin.Context) {
|
func (h *Handlers) CreateConfig(ctx *gin.Context) {
|
||||||
var json types.CreateConfigRequest
|
var json types.CreateConfigRequest
|
||||||
if err := ctx.ShouldBindJSON(&json); err != nil {
|
if err := ctx.ShouldBindJSON(&json); err != nil {
|
||||||
|
|
@ -63,7 +63,7 @@ func (h *Handlers) CreateConfig(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /configs/{id} [delete]
|
// @Router /api/v1/configs/{id} [delete]
|
||||||
func (h *Handlers) DestroyConfig(ctx *gin.Context) {
|
func (h *Handlers) DestroyConfig(ctx *gin.Context) {
|
||||||
var params types.ConfigParams
|
var params types.ConfigParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -90,7 +90,7 @@ func (h *Handlers) DestroyConfig(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /configs/{id} [patch]
|
// @Router /api/v1/configs/{id} [patch]
|
||||||
func (h *Handlers) UpdateConfig(ctx *gin.Context) {
|
func (h *Handlers) UpdateConfig(ctx *gin.Context) {
|
||||||
var params types.ConfigParams
|
var params types.ConfigParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -123,7 +123,7 @@ func (h *Handlers) UpdateConfig(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /configs/{id} [get]
|
// @Router /api/v1/configs/{id} [get]
|
||||||
func (h *Handlers) GetConfig(ctx *gin.Context) {
|
func (h *Handlers) GetConfig(ctx *gin.Context) {
|
||||||
var params types.ConfigParams
|
var params types.ConfigParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -151,7 +151,7 @@ func (h *Handlers) GetConfig(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /configs [get]
|
// @Router /api/v1/configs [get]
|
||||||
func (h *Handlers) GetConfigs(ctx *gin.Context) {
|
func (h *Handlers) GetConfigs(ctx *gin.Context) {
|
||||||
var query types.GetConfigsQuery
|
var query types.GetConfigsQuery
|
||||||
if err := ctx.ShouldBindQuery(&query); err != nil {
|
if err := ctx.ShouldBindQuery(&query); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ import (
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /jobs [post]
|
// @Router /oapi/v1/jobs [post]
|
||||||
func (h *Handlers) CreateJob(ctx *gin.Context) {
|
func (h *Handlers) CreateJob(ctx *gin.Context) {
|
||||||
var json types.CreateJobRequest
|
var json types.CreateJobRequest
|
||||||
if err := ctx.ShouldBindBodyWith(&json, binding.JSON); err != nil {
|
if err := ctx.ShouldBindBodyWith(&json, binding.JSON); err != nil {
|
||||||
|
|
@ -132,7 +132,8 @@ func (h *Handlers) CreateJob(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /jobs/{id} [delete]
|
// @Router /api/v1/jobs/{id} [delete]
|
||||||
|
// @Router /oapi/v1/jobs/{id} [delete]
|
||||||
func (h *Handlers) DestroyJob(ctx *gin.Context) {
|
func (h *Handlers) DestroyJob(ctx *gin.Context) {
|
||||||
var params types.JobParams
|
var params types.JobParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -159,7 +160,8 @@ func (h *Handlers) DestroyJob(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /jobs/{id} [patch]
|
// @Router /api/v1/jobs/{id} [patch]
|
||||||
|
// @Router /oapi/v1/jobs/{id} [patch]
|
||||||
func (h *Handlers) UpdateJob(ctx *gin.Context) {
|
func (h *Handlers) UpdateJob(ctx *gin.Context) {
|
||||||
var params types.JobParams
|
var params types.JobParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -192,7 +194,8 @@ func (h *Handlers) UpdateJob(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /jobs/{id} [get]
|
// @Router /api/v1/jobs/{id} [get]
|
||||||
|
// @Router /oapi/v1/jobs/{id} [get]
|
||||||
func (h *Handlers) GetJob(ctx *gin.Context) {
|
func (h *Handlers) GetJob(ctx *gin.Context) {
|
||||||
var params types.JobParams
|
var params types.JobParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -220,7 +223,8 @@ func (h *Handlers) GetJob(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /jobs [get]
|
// @Router /api/v1/jobs [get]
|
||||||
|
// @Router /oapi/v1/jobs [get]
|
||||||
func (h *Handlers) GetJobs(ctx *gin.Context) {
|
func (h *Handlers) GetJobs(ctx *gin.Context) {
|
||||||
var query types.GetJobsQuery
|
var query types.GetJobsQuery
|
||||||
if err := ctx.ShouldBindQuery(&query); err != nil {
|
if err := ctx.ShouldBindQuery(&query); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ import (
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /oauth [post]
|
// @Router /api/v1/oauth [post]
|
||||||
func (h *Handlers) CreateOauth(ctx *gin.Context) {
|
func (h *Handlers) CreateOauth(ctx *gin.Context) {
|
||||||
var json types.CreateOauthRequest
|
var json types.CreateOauthRequest
|
||||||
if err := ctx.ShouldBindJSON(&json); err != nil {
|
if err := ctx.ShouldBindJSON(&json); err != nil {
|
||||||
|
|
@ -63,7 +63,7 @@ func (h *Handlers) CreateOauth(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /oauth/{id} [delete]
|
// @Router /api/v1/oauth/{id} [delete]
|
||||||
func (h *Handlers) DestroyOauth(ctx *gin.Context) {
|
func (h *Handlers) DestroyOauth(ctx *gin.Context) {
|
||||||
var params types.OauthParams
|
var params types.OauthParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -90,7 +90,7 @@ func (h *Handlers) DestroyOauth(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /oauth/{id} [patch]
|
// @Router /api/v1/oauth/{id} [patch]
|
||||||
func (h *Handlers) UpdateOauth(ctx *gin.Context) {
|
func (h *Handlers) UpdateOauth(ctx *gin.Context) {
|
||||||
var params types.OauthParams
|
var params types.OauthParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -123,7 +123,7 @@ func (h *Handlers) UpdateOauth(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /oauth/{id} [get]
|
// @Router /api/v1/oauth/{id} [get]
|
||||||
func (h *Handlers) GetOauth(ctx *gin.Context) {
|
func (h *Handlers) GetOauth(ctx *gin.Context) {
|
||||||
var params types.OauthParams
|
var params types.OauthParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -151,7 +151,7 @@ func (h *Handlers) GetOauth(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /oauth [get]
|
// @Router /api/v1/oauth [get]
|
||||||
func (h *Handlers) GetOauths(ctx *gin.Context) {
|
func (h *Handlers) GetOauths(ctx *gin.Context) {
|
||||||
var query types.GetOauthsQuery
|
var query types.GetOauthsQuery
|
||||||
if err := ctx.ShouldBindQuery(&query); err != nil {
|
if err := ctx.ShouldBindQuery(&query); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ import (
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /peers [post]
|
// @Router /api/v1/peers [post]
|
||||||
func (h *Handlers) CreatePeer(ctx *gin.Context) {
|
func (h *Handlers) CreatePeer(ctx *gin.Context) {
|
||||||
var json types.CreatePeerRequest
|
var json types.CreatePeerRequest
|
||||||
if err := ctx.ShouldBindJSON(&json); err != nil {
|
if err := ctx.ShouldBindJSON(&json); err != nil {
|
||||||
|
|
@ -63,7 +63,7 @@ func (h *Handlers) CreatePeer(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /peers/{id} [delete]
|
// @Router /api/v1/peers/{id} [delete]
|
||||||
func (h *Handlers) DestroyPeer(ctx *gin.Context) {
|
func (h *Handlers) DestroyPeer(ctx *gin.Context) {
|
||||||
var params types.PeerParams
|
var params types.PeerParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -89,7 +89,7 @@ func (h *Handlers) DestroyPeer(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /peers/{id} [get]
|
// @Router /api/v1/peers/{id} [get]
|
||||||
func (h *Handlers) GetPeer(ctx *gin.Context) {
|
func (h *Handlers) GetPeer(ctx *gin.Context) {
|
||||||
var params types.PeerParams
|
var params types.PeerParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -117,7 +117,7 @@ func (h *Handlers) GetPeer(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /peers [get]
|
// @Router /api/v1/peers [get]
|
||||||
func (h *Handlers) GetPeers(ctx *gin.Context) {
|
func (h *Handlers) GetPeers(ctx *gin.Context) {
|
||||||
var query types.GetPeersQuery
|
var query types.GetPeersQuery
|
||||||
if err := ctx.ShouldBindQuery(&query); err != nil {
|
if err := ctx.ShouldBindQuery(&query); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ import (
|
||||||
// @Success 200 {object} []rbac.Permission
|
// @Success 200 {object} []rbac.Permission
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /permissions [get]
|
// @Router /api/v1/permissions [get]
|
||||||
func (h *Handlers) GetPermissions(g *gin.Engine) func(ctx *gin.Context) {
|
func (h *Handlers) GetPermissions(g *gin.Engine) func(ctx *gin.Context) {
|
||||||
return func(ctx *gin.Context) {
|
return func(ctx *gin.Context) {
|
||||||
ctx.JSON(http.StatusOK, h.service.GetPermissions(ctx.Request.Context(), g))
|
ctx.JSON(http.StatusOK, h.service.GetPermissions(ctx.Request.Context(), g))
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ import (
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /personal-access-tokens [post]
|
// @Router /api/v1/personal-access-tokens [post]
|
||||||
func (h *Handlers) CreatePersonalAccessToken(ctx *gin.Context) {
|
func (h *Handlers) CreatePersonalAccessToken(ctx *gin.Context) {
|
||||||
var json types.CreatePersonalAccessTokenRequest
|
var json types.CreatePersonalAccessTokenRequest
|
||||||
if err := ctx.ShouldBindJSON(&json); err != nil {
|
if err := ctx.ShouldBindJSON(&json); err != nil {
|
||||||
|
|
@ -63,7 +63,7 @@ func (h *Handlers) CreatePersonalAccessToken(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /personal-access-tokens/{id} [delete]
|
// @Router /api/v1/personal-access-tokens/{id} [delete]
|
||||||
func (h *Handlers) DestroyPersonalAccessToken(ctx *gin.Context) {
|
func (h *Handlers) DestroyPersonalAccessToken(ctx *gin.Context) {
|
||||||
var params types.PersonalAccessTokenParams
|
var params types.PersonalAccessTokenParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -90,7 +90,7 @@ func (h *Handlers) DestroyPersonalAccessToken(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /personal-access-tokens/{id} [patch]
|
// @Router /api/v1/personal-access-tokens/{id} [patch]
|
||||||
func (h *Handlers) UpdatePersonalAccessToken(ctx *gin.Context) {
|
func (h *Handlers) UpdatePersonalAccessToken(ctx *gin.Context) {
|
||||||
var params types.PersonalAccessTokenParams
|
var params types.PersonalAccessTokenParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -123,7 +123,7 @@ func (h *Handlers) UpdatePersonalAccessToken(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /personal-access-tokens/{id} [get]
|
// @Router /api/v1/personal-access-tokens/{id} [get]
|
||||||
func (h *Handlers) GetPersonalAccessToken(ctx *gin.Context) {
|
func (h *Handlers) GetPersonalAccessToken(ctx *gin.Context) {
|
||||||
var params types.PersonalAccessTokenParams
|
var params types.PersonalAccessTokenParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -151,7 +151,7 @@ func (h *Handlers) GetPersonalAccessToken(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /personal-access-tokens [get]
|
// @Router /api/v1/personal-access-tokens [get]
|
||||||
func (h *Handlers) GetPersonalAccessTokens(ctx *gin.Context) {
|
func (h *Handlers) GetPersonalAccessTokens(ctx *gin.Context) {
|
||||||
var query types.GetPersonalAccessTokensQuery
|
var query types.GetPersonalAccessTokensQuery
|
||||||
if err := ctx.ShouldBindQuery(&query); err != nil {
|
if err := ctx.ShouldBindQuery(&query); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import (
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /roles [post]
|
// @Router /api/v1/roles [post]
|
||||||
func (h *Handlers) CreateRole(ctx *gin.Context) {
|
func (h *Handlers) CreateRole(ctx *gin.Context) {
|
||||||
var json types.CreateRoleRequest
|
var json types.CreateRoleRequest
|
||||||
if err := ctx.ShouldBindJSON(&json); err != nil {
|
if err := ctx.ShouldBindJSON(&json); err != nil {
|
||||||
|
|
@ -60,7 +60,7 @@ func (h *Handlers) CreateRole(ctx *gin.Context) {
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /roles/{role} [delete]
|
// @Router /api/v1/roles/{role} [delete]
|
||||||
func (h *Handlers) DestroyRole(ctx *gin.Context) {
|
func (h *Handlers) DestroyRole(ctx *gin.Context) {
|
||||||
var params types.RoleParams
|
var params types.RoleParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -88,7 +88,7 @@ func (h *Handlers) DestroyRole(ctx *gin.Context) {
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /roles/{role} [get]
|
// @Router /api/v1/roles/{role} [get]
|
||||||
func (h *Handlers) GetRole(ctx *gin.Context) {
|
func (h *Handlers) GetRole(ctx *gin.Context) {
|
||||||
var params types.RoleParams
|
var params types.RoleParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -107,7 +107,7 @@ func (h *Handlers) GetRole(ctx *gin.Context) {
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /roles [get]
|
// @Router /api/v1/roles [get]
|
||||||
func (h *Handlers) GetRoles(ctx *gin.Context) {
|
func (h *Handlers) GetRoles(ctx *gin.Context) {
|
||||||
roles := h.service.GetRoles(ctx.Request.Context())
|
roles := h.service.GetRoles(ctx.Request.Context())
|
||||||
ctx.JSON(http.StatusOK, roles)
|
ctx.JSON(http.StatusOK, roles)
|
||||||
|
|
@ -123,7 +123,7 @@ func (h *Handlers) GetRoles(ctx *gin.Context) {
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /roles/{role}/permissions [post]
|
// @Router /api/v1/roles/{role}/permissions [post]
|
||||||
func (h *Handlers) AddPermissionForRole(ctx *gin.Context) {
|
func (h *Handlers) AddPermissionForRole(ctx *gin.Context) {
|
||||||
var params types.RoleParams
|
var params types.RoleParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -158,7 +158,7 @@ func (h *Handlers) AddPermissionForRole(ctx *gin.Context) {
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /roles/{role}/permissions [delete]
|
// @Router /api/v1/roles/{role}/permissions [delete]
|
||||||
func (h *Handlers) DeletePermissionForRole(ctx *gin.Context) {
|
func (h *Handlers) DeletePermissionForRole(ctx *gin.Context) {
|
||||||
var params types.RoleParams
|
var params types.RoleParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ import (
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /schedulers [post]
|
// @Router /api/v1/schedulers [post]
|
||||||
func (h *Handlers) CreateScheduler(ctx *gin.Context) {
|
func (h *Handlers) CreateScheduler(ctx *gin.Context) {
|
||||||
var json types.CreateSchedulerRequest
|
var json types.CreateSchedulerRequest
|
||||||
if err := ctx.ShouldBindJSON(&json); err != nil {
|
if err := ctx.ShouldBindJSON(&json); err != nil {
|
||||||
|
|
@ -63,7 +63,7 @@ func (h *Handlers) CreateScheduler(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /schedulers/{id} [delete]
|
// @Router /api/v1/schedulers/{id} [delete]
|
||||||
func (h *Handlers) DestroyScheduler(ctx *gin.Context) {
|
func (h *Handlers) DestroyScheduler(ctx *gin.Context) {
|
||||||
var params types.SchedulerParams
|
var params types.SchedulerParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -90,7 +90,7 @@ func (h *Handlers) DestroyScheduler(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /schedulers/{id} [patch]
|
// @Router /api/v1/schedulers/{id} [patch]
|
||||||
func (h *Handlers) UpdateScheduler(ctx *gin.Context) {
|
func (h *Handlers) UpdateScheduler(ctx *gin.Context) {
|
||||||
var params types.SchedulerParams
|
var params types.SchedulerParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -123,7 +123,7 @@ func (h *Handlers) UpdateScheduler(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /schedulers/{id} [get]
|
// @Router /api/v1/schedulers/{id} [get]
|
||||||
func (h *Handlers) GetScheduler(ctx *gin.Context) {
|
func (h *Handlers) GetScheduler(ctx *gin.Context) {
|
||||||
var params types.SchedulerParams
|
var params types.SchedulerParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -151,7 +151,7 @@ func (h *Handlers) GetScheduler(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /schedulers [get]
|
// @Router /api/v1/schedulers [get]
|
||||||
func (h *Handlers) GetSchedulers(ctx *gin.Context) {
|
func (h *Handlers) GetSchedulers(ctx *gin.Context) {
|
||||||
var query types.GetSchedulersQuery
|
var query types.GetSchedulersQuery
|
||||||
if err := ctx.ShouldBindQuery(&query); err != nil {
|
if err := ctx.ShouldBindQuery(&query); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ import (
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /scheduler-clusters [post]
|
// @Router /api/v1/scheduler-clusters [post]
|
||||||
func (h *Handlers) CreateSchedulerCluster(ctx *gin.Context) {
|
func (h *Handlers) CreateSchedulerCluster(ctx *gin.Context) {
|
||||||
var json types.CreateSchedulerClusterRequest
|
var json types.CreateSchedulerClusterRequest
|
||||||
if err := ctx.ShouldBindJSON(&json); err != nil {
|
if err := ctx.ShouldBindJSON(&json); err != nil {
|
||||||
|
|
@ -63,7 +63,7 @@ func (h *Handlers) CreateSchedulerCluster(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /scheduler-clusters/{id} [delete]
|
// @Router /api/v1/scheduler-clusters/{id} [delete]
|
||||||
func (h *Handlers) DestroySchedulerCluster(ctx *gin.Context) {
|
func (h *Handlers) DestroySchedulerCluster(ctx *gin.Context) {
|
||||||
var params types.SchedulerClusterParams
|
var params types.SchedulerClusterParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -90,7 +90,7 @@ func (h *Handlers) DestroySchedulerCluster(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /scheduler-clusters/{id} [patch]
|
// @Router /api/v1/scheduler-clusters/{id} [patch]
|
||||||
func (h *Handlers) UpdateSchedulerCluster(ctx *gin.Context) {
|
func (h *Handlers) UpdateSchedulerCluster(ctx *gin.Context) {
|
||||||
var params types.SchedulerClusterParams
|
var params types.SchedulerClusterParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -123,7 +123,7 @@ func (h *Handlers) UpdateSchedulerCluster(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /scheduler-clusters/{id} [get]
|
// @Router /api/v1/scheduler-clusters/{id} [get]
|
||||||
func (h *Handlers) GetSchedulerCluster(ctx *gin.Context) {
|
func (h *Handlers) GetSchedulerCluster(ctx *gin.Context) {
|
||||||
var params types.SchedulerClusterParams
|
var params types.SchedulerClusterParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -151,7 +151,7 @@ func (h *Handlers) GetSchedulerCluster(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /scheduler-clusters [get]
|
// @Router /api/v1/scheduler-clusters [get]
|
||||||
func (h *Handlers) GetSchedulerClusters(ctx *gin.Context) {
|
func (h *Handlers) GetSchedulerClusters(ctx *gin.Context) {
|
||||||
var query types.GetSchedulerClustersQuery
|
var query types.GetSchedulerClustersQuery
|
||||||
if err := ctx.ShouldBindQuery(&query); err != nil {
|
if err := ctx.ShouldBindQuery(&query); err != nil {
|
||||||
|
|
@ -181,7 +181,7 @@ func (h *Handlers) GetSchedulerClusters(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /scheduler-clusters/{id}/schedulers/{scheduler_id} [put]
|
// @Router /api/v1/scheduler-clusters/{id}/schedulers/{scheduler_id} [put]
|
||||||
func (h *Handlers) AddSchedulerToSchedulerCluster(ctx *gin.Context) {
|
func (h *Handlers) AddSchedulerToSchedulerCluster(ctx *gin.Context) {
|
||||||
var params types.AddSchedulerToSchedulerClusterParams
|
var params types.AddSchedulerToSchedulerClusterParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ import (
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /scheduler-features [get]
|
// @Router /api/v1/scheduler-features [get]
|
||||||
func (h *Handlers) GetSchedulerFeatures(ctx *gin.Context) {
|
func (h *Handlers) GetSchedulerFeatures(ctx *gin.Context) {
|
||||||
features := h.service.GetSchedulerFeatures(ctx.Request.Context())
|
features := h.service.GetSchedulerFeatures(ctx.Request.Context())
|
||||||
ctx.JSON(http.StatusOK, features)
|
ctx.JSON(http.StatusOK, features)
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ import (
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /seed-peers [post]
|
// @Router /api/v1/seed-peers [post]
|
||||||
func (h *Handlers) CreateSeedPeer(ctx *gin.Context) {
|
func (h *Handlers) CreateSeedPeer(ctx *gin.Context) {
|
||||||
var json types.CreateSeedPeerRequest
|
var json types.CreateSeedPeerRequest
|
||||||
if err := ctx.ShouldBindJSON(&json); err != nil {
|
if err := ctx.ShouldBindJSON(&json); err != nil {
|
||||||
|
|
@ -63,7 +63,7 @@ func (h *Handlers) CreateSeedPeer(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /seed-peers/{id} [delete]
|
// @Router /api/v1/seed-peers/{id} [delete]
|
||||||
func (h *Handlers) DestroySeedPeer(ctx *gin.Context) {
|
func (h *Handlers) DestroySeedPeer(ctx *gin.Context) {
|
||||||
var params types.SeedPeerParams
|
var params types.SeedPeerParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -90,7 +90,7 @@ func (h *Handlers) DestroySeedPeer(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /seed-peers/{id} [patch]
|
// @Router /api/v1/seed-peers/{id} [patch]
|
||||||
func (h *Handlers) UpdateSeedPeer(ctx *gin.Context) {
|
func (h *Handlers) UpdateSeedPeer(ctx *gin.Context) {
|
||||||
var params types.SeedPeerParams
|
var params types.SeedPeerParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -123,7 +123,7 @@ func (h *Handlers) UpdateSeedPeer(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /seed-peers/{id} [get]
|
// @Router /api/v1/seed-peers/{id} [get]
|
||||||
func (h *Handlers) GetSeedPeer(ctx *gin.Context) {
|
func (h *Handlers) GetSeedPeer(ctx *gin.Context) {
|
||||||
var params types.SeedPeerParams
|
var params types.SeedPeerParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -151,7 +151,7 @@ func (h *Handlers) GetSeedPeer(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /seed-peers [get]
|
// @Router /api/v1/seed-peers [get]
|
||||||
func (h *Handlers) GetSeedPeers(ctx *gin.Context) {
|
func (h *Handlers) GetSeedPeers(ctx *gin.Context) {
|
||||||
var query types.GetSeedPeersQuery
|
var query types.GetSeedPeersQuery
|
||||||
if err := ctx.ShouldBindQuery(&query); err != nil {
|
if err := ctx.ShouldBindQuery(&query); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ import (
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /seed-peer-clusters [post]
|
// @Router /api/v1/seed-peer-clusters [post]
|
||||||
func (h *Handlers) CreateSeedPeerCluster(ctx *gin.Context) {
|
func (h *Handlers) CreateSeedPeerCluster(ctx *gin.Context) {
|
||||||
var json types.CreateSeedPeerClusterRequest
|
var json types.CreateSeedPeerClusterRequest
|
||||||
if err := ctx.ShouldBindJSON(&json); err != nil {
|
if err := ctx.ShouldBindJSON(&json); err != nil {
|
||||||
|
|
@ -63,7 +63,7 @@ func (h *Handlers) CreateSeedPeerCluster(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /seed-peer-clusters/{id} [delete]
|
// @Router /api/v1/seed-peer-clusters/{id} [delete]
|
||||||
func (h *Handlers) DestroySeedPeerCluster(ctx *gin.Context) {
|
func (h *Handlers) DestroySeedPeerCluster(ctx *gin.Context) {
|
||||||
var params types.SeedPeerClusterParams
|
var params types.SeedPeerClusterParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -90,7 +90,7 @@ func (h *Handlers) DestroySeedPeerCluster(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /seed-peer-clusters/{id} [patch]
|
// @Router /api/v1/seed-peer-clusters/{id} [patch]
|
||||||
func (h *Handlers) UpdateSeedPeerCluster(ctx *gin.Context) {
|
func (h *Handlers) UpdateSeedPeerCluster(ctx *gin.Context) {
|
||||||
var params types.SeedPeerClusterParams
|
var params types.SeedPeerClusterParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -123,7 +123,7 @@ func (h *Handlers) UpdateSeedPeerCluster(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /seed-peer-clusters/{id} [get]
|
// @Router /api/v1/seed-peer-clusters/{id} [get]
|
||||||
func (h *Handlers) GetSeedPeerCluster(ctx *gin.Context) {
|
func (h *Handlers) GetSeedPeerCluster(ctx *gin.Context) {
|
||||||
var params types.SeedPeerClusterParams
|
var params types.SeedPeerClusterParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -151,7 +151,7 @@ func (h *Handlers) GetSeedPeerCluster(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /seed-peer-clusters [get]
|
// @Router /api/v1/seed-peer-clusters [get]
|
||||||
func (h *Handlers) GetSeedPeerClusters(ctx *gin.Context) {
|
func (h *Handlers) GetSeedPeerClusters(ctx *gin.Context) {
|
||||||
var query types.GetSeedPeerClustersQuery
|
var query types.GetSeedPeerClustersQuery
|
||||||
if err := ctx.ShouldBindQuery(&query); err != nil {
|
if err := ctx.ShouldBindQuery(&query); err != nil {
|
||||||
|
|
@ -181,7 +181,7 @@ func (h *Handlers) GetSeedPeerClusters(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /seed-peer-clusters/{id}/seed-peers/{seed_peer_id} [put]
|
// @Router /api/v1/seed-peer-clusters/{id}/seed-peers/{seed_peer_id} [put]
|
||||||
func (h *Handlers) AddSeedPeerToSeedPeerCluster(ctx *gin.Context) {
|
func (h *Handlers) AddSeedPeerToSeedPeerCluster(ctx *gin.Context) {
|
||||||
var params types.AddSeedPeerToSeedPeerClusterParams
|
var params types.AddSeedPeerToSeedPeerClusterParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -208,7 +208,7 @@ func (h *Handlers) AddSeedPeerToSeedPeerCluster(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /seed-peer-clusters/{id}/scheduler-clusters/{scheduler_cluster_id} [put]
|
// @Router /api/v1/seed-peer-clusters/{id}/scheduler-clusters/{scheduler_cluster_id} [put]
|
||||||
func (h *Handlers) AddSchedulerClusterToSeedPeerCluster(ctx *gin.Context) {
|
func (h *Handlers) AddSchedulerClusterToSeedPeerCluster(ctx *gin.Context) {
|
||||||
var params types.AddSchedulerClusterToSeedPeerClusterParams
|
var params types.AddSchedulerClusterToSeedPeerClusterParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ import (
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /users/{id} [patch]
|
// @Router /api/v1/users/{id} [patch]
|
||||||
func (h *Handlers) UpdateUser(ctx *gin.Context) {
|
func (h *Handlers) UpdateUser(ctx *gin.Context) {
|
||||||
var params types.UserParams
|
var params types.UserParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -71,7 +71,7 @@ func (h *Handlers) UpdateUser(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /users/{id} [get]
|
// @Router /api/v1/users/{id} [get]
|
||||||
func (h *Handlers) GetUser(ctx *gin.Context) {
|
func (h *Handlers) GetUser(ctx *gin.Context) {
|
||||||
var params types.UserParams
|
var params types.UserParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -99,7 +99,7 @@ func (h *Handlers) GetUser(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /users [get]
|
// @Router /api/v1/users [get]
|
||||||
func (h *Handlers) GetUsers(ctx *gin.Context) {
|
func (h *Handlers) GetUsers(ctx *gin.Context) {
|
||||||
var query types.GetUsersQuery
|
var query types.GetUsersQuery
|
||||||
if err := ctx.ShouldBindQuery(&query); err != nil {
|
if err := ctx.ShouldBindQuery(&query); err != nil {
|
||||||
|
|
@ -127,7 +127,7 @@ func (h *Handlers) GetUsers(ctx *gin.Context) {
|
||||||
// @Success 200 {object} models.User
|
// @Success 200 {object} models.User
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /user/signup [post]
|
// @Router /api/v1/user/signup [post]
|
||||||
func (h *Handlers) SignUp(ctx *gin.Context) {
|
func (h *Handlers) SignUp(ctx *gin.Context) {
|
||||||
var json types.SignUpRequest
|
var json types.SignUpRequest
|
||||||
if err := ctx.ShouldBindJSON(&json); err != nil {
|
if err := ctx.ShouldBindJSON(&json); err != nil {
|
||||||
|
|
@ -154,7 +154,7 @@ func (h *Handlers) SignUp(ctx *gin.Context) {
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /users/{id}/reset_password [post]
|
// @Router /api/v1/users/{id}/reset_password [post]
|
||||||
func (h *Handlers) ResetPassword(ctx *gin.Context) {
|
func (h *Handlers) ResetPassword(ctx *gin.Context) {
|
||||||
var params types.UserParams
|
var params types.UserParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -186,7 +186,7 @@ func (h *Handlers) ResetPassword(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /user/signin/{name} [get]
|
// @Router /api/v1/user/signin/{name} [get]
|
||||||
func (h *Handlers) OauthSignin(ctx *gin.Context) {
|
func (h *Handlers) OauthSignin(ctx *gin.Context) {
|
||||||
var params types.OauthSigninParams
|
var params types.OauthSigninParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -212,7 +212,7 @@ func (h *Handlers) OauthSignin(ctx *gin.Context) {
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 404
|
// @Failure 404
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /user/signin/{name}/callback [get]
|
// @Router /api/v1/user/signin/{name}/callback [get]
|
||||||
func (h *Handlers) OauthSigninCallback(j *jwt.GinJWTMiddleware) func(*gin.Context) {
|
func (h *Handlers) OauthSigninCallback(j *jwt.GinJWTMiddleware) func(*gin.Context) {
|
||||||
return func(ctx *gin.Context) {
|
return func(ctx *gin.Context) {
|
||||||
var params types.OauthSigninCallbackParams
|
var params types.OauthSigninCallbackParams
|
||||||
|
|
@ -246,7 +246,7 @@ func (h *Handlers) OauthSigninCallback(j *jwt.GinJWTMiddleware) func(*gin.Contex
|
||||||
// @Success 200 {object} []string
|
// @Success 200 {object} []string
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /users/{id}/roles [get]
|
// @Router /api/v1/users/{id}/roles [get]
|
||||||
func (h *Handlers) GetRolesForUser(ctx *gin.Context) {
|
func (h *Handlers) GetRolesForUser(ctx *gin.Context) {
|
||||||
var params types.UserParams
|
var params types.UserParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -273,7 +273,7 @@ func (h *Handlers) GetRolesForUser(ctx *gin.Context) {
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /users/{id}/roles/{role} [put]
|
// @Router /api/v1/users/{id}/roles/{role} [put]
|
||||||
func (h *Handlers) AddRoleToUser(ctx *gin.Context) {
|
func (h *Handlers) AddRoleToUser(ctx *gin.Context) {
|
||||||
var params types.AddRoleForUserParams
|
var params types.AddRoleForUserParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
@ -302,7 +302,7 @@ func (h *Handlers) AddRoleToUser(ctx *gin.Context) {
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /users/{id}/roles/{role} [delete]
|
// @Router /api/v1/users/{id}/roles/{role} [delete]
|
||||||
func (h *Handlers) DeleteRoleForUser(ctx *gin.Context) {
|
func (h *Handlers) DeleteRoleForUser(ctx *gin.Context) {
|
||||||
var params types.DeleteRoleForUserParams
|
var params types.DeleteRoleForUserParams
|
||||||
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
if err := ctx.ShouldBindUri(¶ms); err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue