Files
goldpinger/pkg/restapi/embedded_spec.go
Ivan Kalita 1e324f78b9 Remove license header from autogenerated files
According to #32.

Signed-off-by: Ivan Kalita <kaduev13@gmail.com>
2018-12-21 14:28:44 +01:00

377 lines
8.5 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package restapi
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"encoding/json"
)
var (
// SwaggerJSON embedded version of the swagger document used at generation time
SwaggerJSON json.RawMessage
// FlatSwaggerJSON embedded flattened version of the swagger document used at generation time
FlatSwaggerJSON json.RawMessage
)
func init() {
SwaggerJSON = json.RawMessage([]byte(`{
"swagger": "2.0",
"info": {
"title": "Goldpinger",
"version": "1.0.0"
},
"paths": {
"/check": {
"get": {
"description": "Queries the API server for all other pods in this service, and pings them via their pods IPs. Calls their /ping endpoint",
"produces": [
"application/json"
],
"operationId": "checkServicePods",
"responses": {
"200": {
"description": "Success, return response",
"schema": {
"$ref": "#/definitions/CheckResults"
}
}
}
}
},
"/check_all": {
"get": {
"description": "Queries the API server for all other pods in this service, and makes all of them query all of their neighbours, using their pods IPs. Calls their /check endpoint.",
"produces": [
"application/json"
],
"operationId": "checkAllPods",
"responses": {
"200": {
"description": "Success, return response",
"schema": {
"$ref": "#/definitions/CheckAllResults"
}
}
}
}
},
"/ping": {
"get": {
"description": "return query stats",
"produces": [
"application/json"
],
"operationId": "ping",
"responses": {
"200": {
"description": "return success",
"schema": {
"$ref": "#/definitions/PingResults"
}
}
}
}
}
},
"definitions": {
"CallStats": {
"properties": {
"check": {
"type": "integer"
},
"check_all": {
"type": "integer"
},
"ping": {
"type": "integer"
}
}
},
"CheckAllPodResult": {
"type": "object",
"properties": {
"HostIP": {
"type": "string",
"format": "ipv4"
},
"OK": {
"type": "boolean",
"default": false
},
"error": {
"type": "string"
},
"response": {
"$ref": "#/definitions/CheckResults"
},
"status-code": {
"type": "integer",
"format": "int32"
}
}
},
"CheckAllResults": {
"type": "object",
"properties": {
"OK": {
"type": "boolean",
"default": false
},
"hosts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"hostIP": {
"type": "string",
"format": "ipv4"
},
"podIP": {
"type": "string",
"format": "ipv4"
}
}
}
},
"hosts-healthy": {
"type": "integer",
"format": "int32"
},
"hosts-number": {
"type": "integer",
"format": "int32"
},
"responses": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/CheckAllPodResult"
}
}
}
},
"CheckResults": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/PodResult"
}
},
"PingResults": {
"type": "object",
"properties": {
"boot_time": {
"type": "string",
"format": "date-time"
},
"received": {
"$ref": "#/definitions/CallStats"
}
}
},
"PodResult": {
"type": "object",
"properties": {
"HostIP": {
"type": "string",
"format": "ipv4"
},
"OK": {
"type": "boolean",
"default": false
},
"error": {
"type": "string"
},
"response": {
"$ref": "#/definitions/PingResults"
},
"status-code": {
"type": "integer",
"format": "int32"
}
}
}
}
}`))
FlatSwaggerJSON = json.RawMessage([]byte(`{
"swagger": "2.0",
"info": {
"title": "Goldpinger",
"version": "1.0.0"
},
"paths": {
"/check": {
"get": {
"description": "Queries the API server for all other pods in this service, and pings them via their pods IPs. Calls their /ping endpoint",
"produces": [
"application/json"
],
"operationId": "checkServicePods",
"responses": {
"200": {
"description": "Success, return response",
"schema": {
"$ref": "#/definitions/CheckResults"
}
}
}
}
},
"/check_all": {
"get": {
"description": "Queries the API server for all other pods in this service, and makes all of them query all of their neighbours, using their pods IPs. Calls their /check endpoint.",
"produces": [
"application/json"
],
"operationId": "checkAllPods",
"responses": {
"200": {
"description": "Success, return response",
"schema": {
"$ref": "#/definitions/CheckAllResults"
}
}
}
}
},
"/ping": {
"get": {
"description": "return query stats",
"produces": [
"application/json"
],
"operationId": "ping",
"responses": {
"200": {
"description": "return success",
"schema": {
"$ref": "#/definitions/PingResults"
}
}
}
}
}
},
"definitions": {
"CallStats": {
"properties": {
"check": {
"type": "integer"
},
"check_all": {
"type": "integer"
},
"ping": {
"type": "integer"
}
}
},
"CheckAllPodResult": {
"type": "object",
"properties": {
"HostIP": {
"type": "string",
"format": "ipv4"
},
"OK": {
"type": "boolean",
"default": false
},
"error": {
"type": "string"
},
"response": {
"$ref": "#/definitions/CheckResults"
},
"status-code": {
"type": "integer",
"format": "int32"
}
}
},
"CheckAllResults": {
"type": "object",
"properties": {
"OK": {
"type": "boolean",
"default": false
},
"hosts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"hostIP": {
"type": "string",
"format": "ipv4"
},
"podIP": {
"type": "string",
"format": "ipv4"
}
}
}
},
"hosts-healthy": {
"type": "integer",
"format": "int32"
},
"hosts-number": {
"type": "integer",
"format": "int32"
},
"responses": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/CheckAllPodResult"
}
}
}
},
"CheckResults": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/PodResult"
}
},
"PingResults": {
"type": "object",
"properties": {
"boot_time": {
"type": "string",
"format": "date-time"
},
"received": {
"$ref": "#/definitions/CallStats"
}
}
},
"PodResult": {
"type": "object",
"properties": {
"HostIP": {
"type": "string",
"format": "ipv4"
},
"OK": {
"type": "boolean",
"default": false
},
"error": {
"type": "string"
},
"response": {
"$ref": "#/definitions/PingResults"
},
"status-code": {
"type": "integer",
"format": "int32"
}
}
}
}
}`))
}