| 
									
										
										
										
											2022-07-25 22:19:07 +08:00
										 |  |  | package definitions | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import ( | 
					
						
							|  |  |  | 	"github.com/grafana/grafana/pkg/services/correlations" | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-07-27 14:01:46 +08:00
										 |  |  | // swagger:route POST /datasources/uid/{sourceUID}/correlations correlations createCorrelation
 | 
					
						
							| 
									
										
										
										
											2022-07-25 22:19:07 +08:00
										 |  |  | //
 | 
					
						
							|  |  |  | // Add correlation.
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | // Responses:
 | 
					
						
							|  |  |  | // 200: createCorrelationResponse
 | 
					
						
							|  |  |  | // 400: badRequestError
 | 
					
						
							|  |  |  | // 401: unauthorisedError
 | 
					
						
							|  |  |  | // 403: forbiddenError
 | 
					
						
							|  |  |  | // 404: notFoundError
 | 
					
						
							|  |  |  | // 500: internalServerError
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // swagger:parameters createCorrelation
 | 
					
						
							|  |  |  | type CreateCorrelationParams struct { | 
					
						
							|  |  |  | 	// in:body
 | 
					
						
							|  |  |  | 	// required:true
 | 
					
						
							|  |  |  | 	Body correlations.CreateCorrelationCommand `json:"body"` | 
					
						
							|  |  |  | 	// in:path
 | 
					
						
							|  |  |  | 	// required:true
 | 
					
						
							| 
									
										
										
										
											2022-07-27 14:01:46 +08:00
										 |  |  | 	SourceUID string `json:"sourceUID"` | 
					
						
							| 
									
										
										
										
											2022-07-25 22:19:07 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | //swagger:response createCorrelationResponse
 | 
					
						
							|  |  |  | type CreateCorrelationResponse struct { | 
					
						
							|  |  |  | 	// in: body
 | 
					
						
							|  |  |  | 	Body correlations.CreateCorrelationResponse `json:"body"` | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2022-07-27 16:07:58 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | // swagger:route DELETE /datasources/uid/{uid}/correlations/{correlationUID} correlations deleteCorrelation
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | // Delete a correlation.
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | // Responses:
 | 
					
						
							|  |  |  | // 200: deleteCorrelationResponse
 | 
					
						
							|  |  |  | // 401: unauthorisedError
 | 
					
						
							|  |  |  | // 403: forbiddenError
 | 
					
						
							|  |  |  | // 404: notFoundError
 | 
					
						
							|  |  |  | // 500: internalServerError
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // swagger:parameters deleteCorrelation
 | 
					
						
							|  |  |  | type DeleteCorrelationParams struct { | 
					
						
							|  |  |  | 	// in:path
 | 
					
						
							|  |  |  | 	// required:true
 | 
					
						
							|  |  |  | 	DatasourceUID string `json:"uid"` | 
					
						
							|  |  |  | 	// in:path
 | 
					
						
							|  |  |  | 	// required:true
 | 
					
						
							|  |  |  | 	CorrelationUID string `json:"correlationUID"` | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | //swagger:response deleteCorrelationResponse
 | 
					
						
							|  |  |  | type DeleteCorrelationResponse struct { | 
					
						
							|  |  |  | 	// in: body
 | 
					
						
							|  |  |  | 	Body correlations.DeleteCorrelationResponse `json:"body"` | 
					
						
							|  |  |  | } |