parser.go
parser.go - Overview
-
Overview This file contains functions for parsing HTTP requests related to metrics explorer, extracting parameters for filter key/value suggestions, summary list metrics, tree map metrics, related metrics, inspect metrics, and updating metrics metadata.
-
Detailed Documentation
ParseFilterKeySuggestions(r *http.Request) (*metrics_explorer.FilterKeyRequest, *model.ApiError)
- Purpose: Parses the HTTP request to extract parameters for filter key suggestions.
- Parameters:
r
: *http.Request - The HTTP request object.
- Returns:
*metrics_explorer.FilterKeyRequest
: A pointer to aFilterKeyRequest
struct containing the parsed parameters.*model.ApiError
: A pointer to anApiError
struct if an error occurs during parsing.
ParseFilterValueSuggestions(r *http.Request) (*metrics_explorer.FilterValueRequest, *model.ApiError)
- Purpose: Parses the HTTP request body to extract parameters for filter value suggestions.
- Parameters:
r
: *http.Request - The HTTP request object.
- Returns:
*metrics_explorer.FilterValueRequest
: A pointer to aFilterValueRequest
struct containing the parsed parameters.*model.ApiError
: A pointer to anApiError
struct if an error occurs during parsing.
ParseSummaryListMetricsParams(r *http.Request) (*metrics_explorer.SummaryListMetricsRequest, *model.ApiError)
- Purpose: Parses the HTTP request body to extract parameters for listing summary metrics.
- Parameters:
r
: *http.Request - The HTTP request object.
- Returns:
*metrics_explorer.SummaryListMetricsRequest
: A pointer to aSummaryListMetricsRequest
struct containing the parsed parameters.*model.ApiError
: A pointer to anApiError
struct if an error occurs during parsing.
ParseTreeMapMetricsParams(r *http.Request) (*metrics_explorer.TreeMapMetricsRequest, *model.ApiError)
- Purpose: Parses the HTTP request body to extract parameters for tree map metrics.
- Parameters:
r
: *http.Request - The HTTP request object.
- Returns:
*metrics_explorer.TreeMapMetricsRequest
: A pointer to aTreeMapMetricsRequest
struct containing the parsed parameters.*model.ApiError
: A pointer to anApiError
struct if an error occurs during parsing.
ParseRelatedMetricsParams(r *http.Request) (*metrics_explorer.RelatedMetricsRequest, *model.ApiError)
- Purpose: Parses the HTTP request body to extract parameters for related metrics.
- Parameters:
r
: *http.Request - The HTTP request object.
- Returns:
*metrics_explorer.RelatedMetricsRequest
: A pointer to aRelatedMetricsRequest
struct containing the parsed parameters.*model.ApiError
: A pointer to anApiError
struct if an error occurs during parsing.
ParseInspectMetricsParams(r *http.Request) (*metrics_explorer.InspectMetricsRequest, *model.ApiError)
- Purpose: Parses the HTTP request body to extract parameters for inspecting metrics.
- Parameters:
r
: *http.Request - The HTTP request object.
- Returns:
*metrics_explorer.InspectMetricsRequest
: A pointer to anInspectMetricsRequest
struct containing the parsed parameters.*model.ApiError
: A pointer to anApiError
struct if an error occurs during parsing.
ParseUpdateMetricsMetadataParams(r *http.Request) (*metrics_explorer.UpdateMetricsMetadataRequest, *model.ApiError)
- Purpose: Parses the HTTP request body and route variables to extract parameters for updating metrics metadata.
- Parameters:
r
: *http.Request - The HTTP request object.
- Returns:
*metrics_explorer.UpdateMetricsMetadataRequest
: A pointer to anUpdateMetricsMetadataRequest
struct containing the parsed parameters.*model.ApiError
: A pointer to anApiError
struct if an error occurs during parsing or if validation fails.
-
Code Examples
None
-
Clarity and Accuracy
All documented functions have clear descriptions and parameter/return value explanations.
-
Markdown & MDX Perfection
The documentation uses proper markdown syntax for headings, lists, and code blocks.
-
Edge Cases To Avoid Breaking MDX
- No unescaped special characters.
- No broken links or images.
- No raw HTML tags.
- No HTML comments.
- No tables.
- Lists are properly indented.
- Code blocks and headings are properly closed.
-
Getting Started Relevance Include in Getting Started: NO