-
Notifications
You must be signed in to change notification settings - Fork 0
/
docs.go
55 lines (48 loc) · 44.4 KB
/
docs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package docs
import (
"encoding/json"
"strings"
"github.com/astaxie/beego"
"github.com/astaxie/beego/swagger"
)
const (
Rootinfo string = `{"apiVersion":"1.0.0","swaggerVersion":"1.2","apis":[{"path":"/dashboardhealthcheck","description":""},{"path":"/dashboardtopology","description":""},{"path":"/deployautoscaler","description":""},{"path":"/deploydeploy","description":""},{"path":"/deploydeploybluegreen","description":""},{"path":"/deploydeployclusterapplication","description":""},{"path":"/eventkubernetes","description":""},{"path":"/filesystemglusterfscluster","description":""},{"path":"/filesystemglusterfsvolume","description":""},{"path":"/inventoryreplicationcontroller","description":""},{"path":"/inventoryservice","description":""},{"path":"/monitorcontainer","description":""},{"path":"/monitorchistoricalcontainer","description":""},{"path":"/monitornode","description":""},{"path":"/notificationnotifier","description":""},{"path":"/repositoryimageinformation","description":""},{"path":"/repositoryimagerecord","description":""},{"path":"/repositorythirdparty","description":""},{"path":"/systemnamespace","description":""},{"path":"/systemnotificationemailserver","description":""},{"path":"/systemnotificationsms","description":""}],"info":{"title":"Cloudone GUI REST API","description":"This is used for client side GUI only. For functional API, use each component's API directly.","license":"Url http://www.apache.org/licenses/LICENSE-2.0.html"}}`
Subapi string = `{"/dashboardhealthcheck":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/dashboardhealthcheck","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"Get","type":"","summary":"get health check","responseMessages":[{"code":200,"message":"{}","responseModel":""}]}]}]},"/dashboardtopology":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/dashboardtopology","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"Get","type":"","summary":"get topology","responseMessages":[{"code":200,"message":"{}","responseModel":""}]}]}]},"/deployautoscaler":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/deployautoscaler","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/:kind/:name","description":"","operations":[{"httpMethod":"DELETE","nickname":"delete","type":"","summary":"delete the autoscaler","parameters":[{"paramType":"path","name":"kind","description":"\"The type of target autoscaler configured for\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"path","name":"name","description":"\"The name of target autoscaler configured for\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/:kind/:name","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get the autoscaler","parameters":[{"paramType":"path","name":"kind","description":"\"The type of target autoscaler configured for\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"path","name":"name","description":"\"The name of target autoscaler configured for\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"guirestapi.deploy.autoscaler.ReplicationControllerAutoScaler","responseModel":"ReplicationControllerAutoScaler"},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"PUT","nickname":"update","type":"","summary":"update the autoscaler","parameters":[{"paramType":"body","name":"body","description":"\"body for autoscaler\"","dataType":"ReplicationControllerAutoScaler","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get all autoscalers","responseMessages":[{"code":200,"message":"[]ReplicationControllerAutoScaler","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}],"models":{"Indicator":{"id":"Indicator","properties":{"AboveAllOrOne":{"type":"bool","description":"","format":""},"AbovePercentageOfData":{"type":"float64","description":"","format":""},"AboveThreshold":{"type":"int64","description":"","format":""},"BelowAllOrOne":{"type":"bool","description":"","format":""},"BelowPercentageOfData":{"type":"float64","description":"","format":""},"BelowThreshold":{"type":"int64","description":"","format":""},"Type":{"type":"string","description":"","format":""}}},"ReplicationControllerAutoScaler":{"id":"ReplicationControllerAutoScaler","properties":{"Check":{"type":"bool","description":"","format":""},"CoolDownDuration":{"type":"\u0026{time Duration}","description":"","format":""},"IndicatorSlice":{"type":"array","description":"","items":{"$ref":"Indicator"},"format":""},"Kind":{"type":"string","description":"","format":""},"KubeapiHost":{"type":"string","description":"","format":""},"KubeapiPort":{"type":"int","description":"","format":""},"MaximumReplica":{"type":"int","description":"","format":""},"MinimumReplica":{"type":"int","description":"","format":""},"Name":{"type":"string","description":"","format":""},"Namespace":{"type":"string","description":"","format":""},"RemainingCoolDown":{"type":"\u0026{time Duration}","description":"","format":""}}}}},"/deploydeploy":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/deploydeploy","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/createinformation/:name","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get the related selection in order to create a new deployment","parameters":[{"paramType":"path","name":"name","description":"\"The name of image record\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"POST","nickname":"create","type":"","summary":"create the autoscaler","parameters":[{"paramType":"body","name":"body","description":"\"body for deploy\"","dataType":"DeployCreateInput","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/:name","description":"","operations":[{"httpMethod":"DELETE","nickname":"delete","type":"","summary":"delete the deployment","parameters":[{"paramType":"path","name":"name","description":"\"The name of deployment\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get all deployments","responseMessages":[{"code":200,"message":"[]DeployInformation","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/updateinformation/:name","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get the related selection in order to create a new deployment","parameters":[{"paramType":"path","name":"name","description":"\"The name of image record\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"query","name":"oldVersion","description":"\"The current version to be replaced\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"PUT","nickname":"update","type":"","summary":"update the deploy","parameters":[{"paramType":"body","name":"body","description":"\"body for deploy\"","dataType":"DeployUpdateInput","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}]},"/deploydeploybluegreen":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/deploydeploybluegreen","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/:imageInformation","description":"","operations":[{"httpMethod":"DELETE","nickname":"delete","type":"","summary":"delete the blue green deployment","parameters":[{"paramType":"path","name":"imageInformation","description":"\"The name of image information\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get all blue green deployments","responseMessages":[{"code":200,"message":"[]DeployBlueGreen","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/selectinformation/:imageInformation","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get the related selection in order to select a blue green deployment","parameters":[{"paramType":"path","name":"imageInformation","description":"\"The name of image record\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"PUT","nickname":"select","type":"","summary":"select the different namespace","parameters":[{"paramType":"body","name":"body","description":"\"body for blue green deployment\"","dataType":"DeployBlueGreen","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}]},"/deploydeployclusterapplication":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/deploydeployclusterapplication","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/:clusterApplicationName","description":"","operations":[{"httpMethod":"DELETE","nickname":"delete","type":"","summary":"delete the cluster application deployment","parameters":[{"paramType":"path","name":"clusterApplicationName","description":"\"The name of cluster application deployment\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get all cluster application deployments","responseMessages":[{"code":200,"message":"[]DeployClusterApplication","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/sizeinformation/:name","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get the related selection in order to change size","parameters":[{"paramType":"path","name":"name","description":"\"The name of cluster application deployment\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/size/:name","description":"","operations":[{"httpMethod":"PUT","nickname":"resize","type":"","summary":"resize the cluster application","parameters":[{"paramType":"body","name":"body","description":"\"Array of environment\"","dataType":"[]Environment","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"path","name":"name","description":"\"The name of cluster application deployment\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"query","name":"size","description":"\"The size to change\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}]},"/eventkubernetes":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/eventkubernetes","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/acknowledge/:namespace/:id","description":"","operations":[{"httpMethod":"PUT","nickname":"acknowledge","type":"","summary":"acknowledge the event","parameters":[{"paramType":"path","name":"namespace","description":"\"The namespace where the event is\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"path","name":"id","description":"\"The id of the event\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"query","name":"acknowledge","description":"\"acknowledge (true) or unacknowledge (false)\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get all events and related parameters","responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}]},"/filesystemglusterfscluster":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/filesystemglusterfscluster","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/:clusterName","description":"","operations":[{"httpMethod":"DELETE","nickname":"delete","type":"","summary":"delete the gluster cluster configuration","parameters":[{"paramType":"path","name":"clusterName","description":"\"The name of gluster cluster configuration\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/:clusterName","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get the glusterfs cluster configuration","parameters":[{"paramType":"path","name":"clusterName","description":"\"The name of glusterfs cluster configuration\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"guirestapi.filesystem.glusterfs.cluster.GlusterfsCluster","responseModel":"GlusterfsCluster"},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"POST","nickname":"create","type":"","summary":"create gluster cluster configuration","parameters":[{"paramType":"body","name":"body","description":"\"body for glusterfs cluster configuration\"","dataType":"GlusterfsClusterInput","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"PUT","nickname":"update","type":"","summary":"update gluster cluster configuration","parameters":[{"paramType":"body","name":"body","description":"\"body for glusterfs cluster configuration\"","dataType":"GlusterfsClusterInput","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get all glusterfs cluster configurations","responseMessages":[{"code":200,"message":"[]GlusterfsCluster","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}],"models":{"GlusterfsCluster":{"id":"GlusterfsCluster","properties":{"HostSlice":{"type":"[]string","description":"","format":""},"Name":{"type":"string","description":"","format":""},"Path":{"type":"string","description":"","format":""},"SSHDialTimeout":{"type":"\u0026{time Duration}","description":"","format":""},"SSHPassword":{"type":"string","description":"","format":""},"SSHPort":{"type":"int","description":"","format":""},"SSHSessionTimeout":{"type":"\u0026{time Duration}","description":"","format":""},"SSHUser":{"type":"string","description":"","format":""}}}}},"/filesystemglusterfsvolume":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/filesystemglusterfsvolume","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/createinformation/:clusterName","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get the glusterfs cluster configuration","parameters":[{"paramType":"path","name":"clusterName","description":"\"The name of glusterfs cluster configuration\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"guirestapi.filesystem.glusterfs.cluster.GlusterfsCluster","responseModel":"GlusterfsCluster"},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"POST","nickname":"create","type":"","summary":"create gluster volume","parameters":[{"paramType":"body","name":"body","description":"\"body for glusterfs volume\"","dataType":"GlusterfsVolumeInput","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/:clusterName/:glusterfsVolume","description":"","operations":[{"httpMethod":"DELETE","nickname":"delete","type":"","summary":"delete the gluster volume","parameters":[{"paramType":"path","name":"glusterfsVolume","description":"\"The name of gluster volume\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"path","name":"clusterName","description":"\"The name of gluster cluster configuration\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/:clusterName","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get all glusterfs cluster configurations","parameters":[{"paramType":"path","name":"clusterName","description":"\"The name of gluster cluster configuration\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"[]GlusterfsVolume","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}],"models":{"GlusterfsCluster":{"id":"GlusterfsCluster","properties":{"HostSlice":{"type":"[]string","description":"","format":""},"Name":{"type":"string","description":"","format":""},"Path":{"type":"string","description":"","format":""},"SSHDialTimeout":{"type":"\u0026{time Duration}","description":"","format":""},"SSHPassword":{"type":"string","description":"","format":""},"SSHPort":{"type":"int","description":"","format":""},"SSHSessionTimeout":{"type":"\u0026{time Duration}","description":"","format":""},"SSHUser":{"type":"string","description":"","format":""}}}}},"/inventoryreplicationcontroller":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/inventoryreplicationcontroller","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/:namespace/:replicationcontroller","description":"","operations":[{"httpMethod":"DELETE","nickname":"delete","type":"","summary":"delete the replication controller","parameters":[{"paramType":"path","name":"namespace","description":"\"The name of namespace\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"path","name":"replicationcontroller","description":"\"The name of replication controller\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"POST","nickname":"create","type":"","summary":"create replication controller","parameters":[{"paramType":"body","name":"body","description":"\"body for replication controller\"","dataType":"ReplicationController","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get all replication controllers","responseMessages":[{"code":200,"message":"[]ReplicationControllerAndRelatedPod","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/podlog/:namespace/:pod","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get container log in the pod","parameters":[{"paramType":"path","name":"namespace","description":"\"The name of namespace\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"path","name":"pod","description":"\"The name of pod\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/resize/:name","description":"","operations":[{"httpMethod":"PUT","nickname":"resize","type":"","summary":"resize replication controller","parameters":[{"paramType":"path","name":"name","description":"\"The name of replication controller\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"query","name":"size","description":"\"the new size\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}]},"/inventoryservice":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/inventoryservice","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/:namespace/:service","description":"","operations":[{"httpMethod":"DELETE","nickname":"delete","type":"","summary":"delete the service","parameters":[{"paramType":"path","name":"namespace","description":"\"The name of namespace\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"path","name":"service","description":"\"The name of service\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"POST","nickname":"create","type":"","summary":"create service","parameters":[{"paramType":"body","name":"body","description":"\"body for service\"","dataType":"Service","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get all services","responseMessages":[{"code":200,"message":"[]Service","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}]},"/monitorchistoricalcontainer":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/monitorchistoricalcontainer","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/selectinformation","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get related information","responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/:replicationController","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get historical container data of the replication controller","parameters":[{"paramType":"path","name":"replicationController","description":"\"The name of replication controller or All\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"query","name":"from","description":"\"from (format: 01/02/2006 15:04 PM)\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"query","name":"to","description":"\"to (format: 01/02/2006 15:04 PM)\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}]},"/monitorcontainer":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/monitorcontainer","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/selectinformation","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get related information","responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/:replicationController","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get container data of the replication controller","parameters":[{"paramType":"path","name":"replicationController","description":"\"The name of replication controller or All\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}]},"/monitornode":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/monitornode","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/information","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get related information","responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get node data","responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}]},"/notificationnotifier":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/notificationnotifier","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/:kind/:name","description":"","operations":[{"httpMethod":"DELETE","nickname":"delete","type":"","summary":"delete the notifier","parameters":[{"paramType":"path","name":"kind","description":"\"The type of target notifier configured for\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"path","name":"name","description":"\"The name of target notifier configured for\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/:kind/:name","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get the notifier","parameters":[{"paramType":"path","name":"kind","description":"\"The type of target notifier configured for\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"path","name":"name","description":"\"The name of target notifier configured for\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"guirestapi.notification.notifier.ReplicationControllerNotifier","responseModel":"ReplicationControllerNotifier"},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"PUT","nickname":"update","type":"","summary":"update the notifier","parameters":[{"paramType":"body","name":"body","description":"\"body for notifier\"","dataType":"ReplicationControllerNotifier","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get all notifiers","responseMessages":[{"code":200,"message":"[]ReplicationControllerNotifier","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}],"models":{"Indicator":{"id":"Indicator","properties":{"AboveAllOrOne":{"type":"bool","description":"","format":""},"AbovePercentageOfData":{"type":"float64","description":"","format":""},"AboveThreshold":{"type":"int64","description":"","format":""},"BelowAllOrOne":{"type":"bool","description":"","format":""},"BelowPercentageOfData":{"type":"float64","description":"","format":""},"BelowThreshold":{"type":"int64","description":"","format":""},"Type":{"type":"string","description":"","format":""}}},"Notifier":{"id":"Notifier","properties":{"Data":{"type":"string","description":"","format":""},"Kind":{"type":"string","description":"","format":""}}},"ReplicationControllerNotifier":{"id":"ReplicationControllerNotifier","properties":{"Check":{"type":"bool","description":"","format":""},"CoolDownDuration":{"type":"\u0026{time Duration}","description":"","format":""},"IndicatorSlice":{"type":"array","description":"","items":{"$ref":"Indicator"},"format":""},"Kind":{"type":"string","description":"","format":""},"KubeapiHost":{"type":"string","description":"","format":""},"KubeapiPort":{"type":"int","description":"","format":""},"Name":{"type":"string","description":"","format":""},"Namespace":{"type":"string","description":"","format":""},"NotifierSlice":{"type":"array","description":"","items":{"$ref":"Notifier"},"format":""},"RemainingCoolDown":{"type":"\u0026{time Duration}","description":"","format":""}}}}},"/repositoryimageinformation":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/repositoryimageinformation","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/","description":"","operations":[{"httpMethod":"POST","nickname":"create","type":"","summary":"create the image information","parameters":[{"paramType":"body","name":"body","description":"\"body for image information\"","dataType":"ImageInformation","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/:name","description":"","operations":[{"httpMethod":"DELETE","nickname":"delete","type":"","summary":"delete the image information","parameters":[{"paramType":"path","name":"name","description":"\"The name of image information\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get all image informations","responseMessages":[{"code":200,"message":"[]ImageInformation","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/upgrade/","description":"","operations":[{"httpMethod":"PUT","nickname":"upgrade","type":"","summary":"upgrade the image information with new version","parameters":[{"paramType":"body","name":"body","description":"\"body for deploy upgrade input\"","dataType":"DeployUpgradeInput","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}]},"/repositoryimagerecord":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/repositoryimagerecord","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/:name/:version","description":"","operations":[{"httpMethod":"DELETE","nickname":"delete","type":"","summary":"delete the image record","parameters":[{"paramType":"path","name":"name","description":"\"The name of image information\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"path","name":"name","description":"\"The version of image record\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get all image informations","parameters":[{"paramType":"query","name":"name","description":"\"The name of image information\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"[]ImageRecord","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}]},"/repositorythirdparty":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/repositorythirdparty","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/:name","description":"","operations":[{"httpMethod":"DELETE","nickname":"delete","type":"","summary":"delete the cluster application template","parameters":[{"paramType":"path","name":"name","description":"\"The name of cluster application template\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/:name","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get the cluster application template","parameters":[{"paramType":"path","name":"name","description":"\"The name of cluster application template\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"guirestapi.repository.thirdparty.Cluster","responseModel":"Cluster"},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"POST","nickname":"create","type":"","summary":"create the cluster application template","parameters":[{"paramType":"body","name":"body","description":"\"body for cluster application template\"","dataType":"Cluster","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/launchinformation/:name","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get the cluster application template","parameters":[{"paramType":"path","name":"name","description":"\"The name of cluster application template\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"guirestapi.repository.thirdparty.Cluster","responseModel":"Cluster"},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/launch/","description":"","operations":[{"httpMethod":"POST","nickname":"launch","type":"","summary":"launch the cluster application template","parameters":[{"paramType":"body","name":"body","description":"\"body for cluster application template\"","dataType":"Cluster","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"query","name":"name","description":"\"The name to use\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0},{"paramType":"query","name":"size","description":"\"The size to use\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get all cluster application templates","responseMessages":[{"code":200,"message":"[]ThirdPartyApplication","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}],"models":{"Cluster":{"id":"Cluster","properties":{"Description":{"type":"string","description":"","format":""},"Environment":{"type":"\u0026{4400 string string}","description":"","format":""},"Name":{"type":"string","description":"","format":""},"ReplicationControllerJson":{"type":"string","description":"","format":""},"ScriptContent":{"type":"string","description":"","format":""},"ScriptType":{"type":"string","description":"","format":""},"ServiceJson":{"type":"string","description":"","format":""}}}}},"/systemnamespace":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/systemnamespace","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/:name","description":"","operations":[{"httpMethod":"DELETE","nickname":"delete","type":"","summary":"delete the namespace","parameters":[{"paramType":"path","name":"name","description":"\"The name of namespace\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"POST","nickname":"create","type":"","summary":"create the cluster application template","parameters":[{"paramType":"body","name":"body","description":"\"body for namespace\"","dataType":"Namespace","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get all namespaces","responseMessages":[{"code":200,"message":"[]Namespace","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/select/:name","description":"","operations":[{"httpMethod":"PUT","nickname":"select","type":"","summary":"select the current namespace","parameters":[{"paramType":"path","name":"name","description":"\"The name of namespace\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}]},"/systemnotificationemailserver":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/systemnotificationemailserver","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/","description":"","operations":[{"httpMethod":"POST","nickname":"create","type":"","summary":"create the email server configuration","parameters":[{"paramType":"body","name":"body","description":"\"body for email server configuration\"","dataType":"EmailServerSMTP","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/:name","description":"","operations":[{"httpMethod":"DELETE","nickname":"delete","type":"","summary":"delete the email server configuration","parameters":[{"paramType":"path","name":"name","description":"\"The name of email server configuration\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get all email server configuratons","responseMessages":[{"code":200,"message":"[]EmailServerSMTP","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}]},"/systemnotificationsms":{"apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"","resourcePath":"/systemnotificationsms","produces":["application/json","application/xml","text/plain","text/html"],"apis":[{"path":"/","description":"","operations":[{"httpMethod":"POST","nickname":"create","type":"","summary":"create the sms configuration","parameters":[{"paramType":"body","name":"body","description":"\"body for sms configuration\"","dataType":"SMSNexmo","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/:name","description":"","operations":[{"httpMethod":"DELETE","nickname":"delete","type":"","summary":"delete the sms configuration","parameters":[{"paramType":"path","name":"name","description":"\"The name of sms configuration\"","dataType":"string","type":"","format":"","allowMultiple":false,"required":true,"minimum":0,"maximum":0}],"responseMessages":[{"code":200,"message":"{}","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]},{"path":"/","description":"","operations":[{"httpMethod":"GET","nickname":"get","type":"","summary":"get all sms configuratons","responseMessages":[{"code":200,"message":"[]SMSNexmo","responseModel":""},{"code":404,"message":"error reason","responseModel":""}]}]}]}}`
BasePath string= "/guirestapi/v1"
)
var rootapi swagger.ResourceListing
var apilist map[string]*swagger.APIDeclaration
func init() {
if beego.BConfig.WebConfig.EnableDocs {
err := json.Unmarshal([]byte(Rootinfo), &rootapi)
if err != nil {
beego.Error(err)
}
err = json.Unmarshal([]byte(Subapi), &apilist)
if err != nil {
beego.Error(err)
}
beego.GlobalDocAPI["Root"] = rootapi
for k, v := range apilist {
for i, a := range v.APIs {
a.Path = urlReplace(k + a.Path)
v.APIs[i] = a
}
v.BasePath = BasePath
beego.GlobalDocAPI[strings.Trim(k, "/")] = v
}
}
}
func urlReplace(src string) string {
pt := strings.Split(src, "/")
for i, p := range pt {
if len(p) > 0 {
if p[0] == ':' {
pt[i] = "{" + p[1:] + "}"
} else if p[0] == '?' && p[1] == ':' {
pt[i] = "{" + p[2:] + "}"
}
}
}
return strings.Join(pt, "/")
}