-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jirka Kremser <[email protected]>
- Loading branch information
Showing
6 changed files
with
496 additions
and
17 deletions.
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 |
---|---|---|
@@ -0,0 +1,154 @@ | ||
// Package docs Code generated by swaggo/swag. DO NOT EDIT | ||
package docs | ||
|
||
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": { | ||
"/info": { | ||
"get": { | ||
"description": "this will return versions, ports, ...", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"info" | ||
], | ||
"summary": "get basic info about the app", | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
} | ||
}, | ||
"/memstore/data": { | ||
"get": { | ||
"description": "this will return detailed metrics, including all the datapoints and calculated aggregates", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"metrics" | ||
], | ||
"summary": "get metrics dump", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/rest.MetricDataPayload" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/memstore/names": { | ||
"get": { | ||
"description": "this will return the metric names of all tracked metric series in the store", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"metrics" | ||
], | ||
"summary": "get metric names in the store", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"rest.MetricDataPayload": { | ||
"type": "object", | ||
"properties": { | ||
"aggregatesOverTime": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "number" | ||
} | ||
}, | ||
"data": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/types.ObservedValue" | ||
} | ||
}, | ||
"labels": { | ||
"$ref": "#/definitions/types.Labels" | ||
}, | ||
"lastUpdate": { | ||
"type": "integer" | ||
} | ||
} | ||
}, | ||
"types.Labels": { | ||
"type": "object", | ||
"additionalProperties": {} | ||
}, | ||
"types.ObservedValue": { | ||
"type": "object", | ||
"properties": { | ||
"time": { | ||
"description": "timestamp of last update (in seconds)", | ||
"type": "integer" | ||
}, | ||
"value": { | ||
"description": "observed value", | ||
"type": "number" | ||
} | ||
} | ||
} | ||
} | ||
}` | ||
|
||
// 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,125 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"contact": {} | ||
}, | ||
"paths": { | ||
"/info": { | ||
"get": { | ||
"description": "this will return versions, ports, ...", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"info" | ||
], | ||
"summary": "get basic info about the app", | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
} | ||
} | ||
} | ||
}, | ||
"/memstore/data": { | ||
"get": { | ||
"description": "this will return detailed metrics, including all the datapoints and calculated aggregates", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"metrics" | ||
], | ||
"summary": "get metrics dump", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/rest.MetricDataPayload" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/memstore/names": { | ||
"get": { | ||
"description": "this will return the metric names of all tracked metric series in the store", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"metrics" | ||
], | ||
"summary": "get metric names in the store", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"rest.MetricDataPayload": { | ||
"type": "object", | ||
"properties": { | ||
"aggregatesOverTime": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "number" | ||
} | ||
}, | ||
"data": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/types.ObservedValue" | ||
} | ||
}, | ||
"labels": { | ||
"$ref": "#/definitions/types.Labels" | ||
}, | ||
"lastUpdate": { | ||
"type": "integer" | ||
} | ||
} | ||
}, | ||
"types.Labels": { | ||
"type": "object", | ||
"additionalProperties": {} | ||
}, | ||
"types.ObservedValue": { | ||
"type": "object", | ||
"properties": { | ||
"time": { | ||
"description": "timestamp of last update (in seconds)", | ||
"type": "integer" | ||
}, | ||
"value": { | ||
"description": "observed value", | ||
"type": "number" | ||
} | ||
} | ||
} | ||
} | ||
} |
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,83 @@ | ||
definitions: | ||
rest.MetricDataPayload: | ||
properties: | ||
aggregatesOverTime: | ||
additionalProperties: | ||
type: number | ||
type: object | ||
data: | ||
items: | ||
$ref: '#/definitions/types.ObservedValue' | ||
type: array | ||
labels: | ||
$ref: '#/definitions/types.Labels' | ||
lastUpdate: | ||
type: integer | ||
type: object | ||
types.Labels: | ||
additionalProperties: {} | ||
type: object | ||
types.ObservedValue: | ||
properties: | ||
time: | ||
description: timestamp of last update (in seconds) | ||
type: integer | ||
value: | ||
description: observed value | ||
type: number | ||
type: object | ||
info: | ||
contact: {} | ||
paths: | ||
/info: | ||
get: | ||
consumes: | ||
- application/json | ||
description: this will return versions, ports, ... | ||
produces: | ||
- application/json | ||
responses: | ||
"200": | ||
description: OK | ||
summary: get basic info about the app | ||
tags: | ||
- info | ||
/memstore/data: | ||
get: | ||
consumes: | ||
- application/json | ||
description: this will return detailed metrics, including all the datapoints | ||
and calculated aggregates | ||
produces: | ||
- application/json | ||
responses: | ||
"200": | ||
description: OK | ||
schema: | ||
additionalProperties: | ||
items: | ||
$ref: '#/definitions/rest.MetricDataPayload' | ||
type: array | ||
type: object | ||
summary: get metrics dump | ||
tags: | ||
- metrics | ||
/memstore/names: | ||
get: | ||
consumes: | ||
- application/json | ||
description: this will return the metric names of all tracked metric series | ||
in the store | ||
produces: | ||
- application/json | ||
responses: | ||
"200": | ||
description: OK | ||
schema: | ||
items: | ||
type: string | ||
type: array | ||
summary: get metric names in the store | ||
tags: | ||
- metrics | ||
swagger: "2.0" |
Oops, something went wrong.