-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
421 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
api | ||
config.local.yaml | ||
onyxia-api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
// Package api Code generated by swaggo/swag. DO NOT EDIT | ||
package api | ||
|
||
import "github.com/swaggo/swag" | ||
|
||
const docTemplate = `{ | ||
"schemes": {{ marshal .Schemes }}, | ||
"swagger": "2.0", | ||
"info": { | ||
"description": "{{escape .Description}}", | ||
"title": "{{.Title}}", | ||
"contact": {}, | ||
"version": "{{.Version}}" | ||
}, | ||
"host": "{{.Host}}", | ||
"basePath": "{{.BasePath}}", | ||
"paths": { | ||
"/my-lab/quota": { | ||
"get": { | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"My lab" | ||
], | ||
"summary": "List the quotas in a namespace.", | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
}, | ||
"post": { | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"My lab" | ||
], | ||
"summary": "Change the quotas for a namespace.", | ||
"parameters": [ | ||
{ | ||
"description": "Modify quotas", | ||
"name": "newQuota", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/cmd.model" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
} | ||
}, | ||
"/my-lab/services": { | ||
"get": { | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"My lab" | ||
], | ||
"summary": "List the services installed in a namespace.", | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
} | ||
}, | ||
"/onboarding": { | ||
"post": { | ||
"description": "Create or replace the namespace of the user or the namespace of a group if the user is in the requested group and the according rbac policies. with the group prefix / user prefix of the region", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"Onboarding" | ||
], | ||
"summary": "Init a namespace for a user or a group", | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
} | ||
}, | ||
"/public/ip": { | ||
"get": { | ||
"description": "Get the public IP (as seen by this app).", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"public" | ||
], | ||
"summary": "Get your public IP address.", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/user/info": { | ||
"get": { | ||
"description": "Get user info and projects", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"user" | ||
], | ||
"summary": "Get user info", | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"cmd.model": { | ||
"type": "object", | ||
"properties": { | ||
"namespace": { | ||
"description": "Namespace of the quota", | ||
"type": "string", | ||
"format": "string", | ||
"example": "default" | ||
}, | ||
"newLimit": { | ||
"description": "New limit for the quota", | ||
"type": "integer", | ||
"format": "int", | ||
"example": 100 | ||
}, | ||
"quotaName": { | ||
"description": "Name of the quota", | ||
"type": "string", | ||
"format": "string", | ||
"example": "name" | ||
} | ||
} | ||
} | ||
} | ||
}` | ||
|
||
// SwaggerInfo holds exported Swagger Info so clients can modify it | ||
var SwaggerInfo = &swag.Spec{ | ||
Version: "", | ||
Host: "", | ||
BasePath: "", | ||
Schemes: []string{}, | ||
Title: "", | ||
Description: "", | ||
InfoInstanceName: "swagger", | ||
SwaggerTemplate: docTemplate, | ||
LeftDelim: "{{", | ||
RightDelim: "}}", | ||
} | ||
|
||
func init() { | ||
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"contact": {} | ||
}, | ||
"paths": { | ||
"/my-lab/quota": { | ||
"get": { | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"My lab" | ||
], | ||
"summary": "List the quotas in a namespace.", | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
}, | ||
"post": { | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"My lab" | ||
], | ||
"summary": "Change the quotas for a namespace.", | ||
"parameters": [ | ||
{ | ||
"description": "Modify quotas", | ||
"name": "newQuota", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/cmd.model" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
} | ||
}, | ||
"/my-lab/services": { | ||
"get": { | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"My lab" | ||
], | ||
"summary": "List the services installed in a namespace.", | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
} | ||
}, | ||
"/onboarding": { | ||
"post": { | ||
"description": "Create or replace the namespace of the user or the namespace of a group if the user is in the requested group and the according rbac policies. with the group prefix / user prefix of the region", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"Onboarding" | ||
], | ||
"summary": "Init a namespace for a user or a group", | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
} | ||
}, | ||
"/public/ip": { | ||
"get": { | ||
"description": "Get the public IP (as seen by this app).", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"public" | ||
], | ||
"summary": "Get your public IP address.", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/user/info": { | ||
"get": { | ||
"description": "Get user info and projects", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"user" | ||
], | ||
"summary": "Get user info", | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"cmd.model": { | ||
"type": "object", | ||
"properties": { | ||
"namespace": { | ||
"description": "Namespace of the quota", | ||
"type": "string", | ||
"format": "string", | ||
"example": "default" | ||
}, | ||
"newLimit": { | ||
"description": "New limit for the quota", | ||
"type": "integer", | ||
"format": "int", | ||
"example": 100 | ||
}, | ||
"quotaName": { | ||
"description": "Name of the quota", | ||
"type": "string", | ||
"format": "string", | ||
"example": "name" | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.