Documentation
¶
Overview ¶
Package metricsclient provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.
Package metricsclient provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.
Index ¶
- Constants
- func NewPostMetricsRequest(server string, environmentUUID EnvironmentPathParam, params *PostMetricsParams, ...) (*http.Request, error)
- func NewPostMetricsRequestWithBody(server string, environmentUUID EnvironmentPathParam, params *PostMetricsParams, ...) (*http.Request, error)
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) PostMetricsWithBodyWithResponse(ctx context.Context, environmentUUID EnvironmentPathParam, ...) (*PostMetricsResponse, error)
- func (c *ClientWithResponses) PostMetricsWithResponse(ctx context.Context, environmentUUID EnvironmentPathParam, ...) (*PostMetricsResponse, error)
- type ClientWithResponsesInterface
- type ClusterQueryOptionalParam
- type EnvironmentPathParam
- type Error
- type HttpRequestDoer
- type InternalServerError
- type KeyValue
- type Metrics
- type MetricsData
- type MetricsDataMetricsType
- type PostMetricsJSONRequestBody
- type PostMetricsParams
- type PostMetricsResponse
- type RequestEditorFn
- type TargetData
- type Unauthenticated
- type Unauthorized
Constants ¶
const ( ApiKeyAuthScopes = "ApiKeyAuth.Scopes" BearerAuthScopes = "BearerAuth.Scopes" )
Variables ¶
This section is empty.
Functions ¶
func NewPostMetricsRequest ¶
func NewPostMetricsRequest(server string, environmentUUID EnvironmentPathParam, params *PostMetricsParams, body PostMetricsJSONRequestBody) (*http.Request, error)
NewPostMetricsRequest calls the generic PostMetrics builder with application/json body
func NewPostMetricsRequestWithBody ¶
func NewPostMetricsRequestWithBody(server string, environmentUUID EnvironmentPathParam, params *PostMetricsParams, contentType string, body io.Reader) (*http.Request, error)
NewPostMetricsRequestWithBody generates requests for PostMetrics with any type of body
Types ¶
type Client ¶
type Client struct { // The endpoint of the server conforming to this interface, with scheme, // https://api.deepmap.com for example. This can contain a path relative // to the server, such as https://api.deepmap.com/dev-test, and all the // paths in the swagger spec will be appended to the server. Server string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A list of callbacks for modifying requests which are generated before sending over // the network. RequestEditors []RequestEditorFn }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) PostMetrics ¶
func (c *Client) PostMetrics(ctx context.Context, environmentUUID EnvironmentPathParam, params *PostMetricsParams, body PostMetricsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostMetricsWithBody ¶
func (c *Client) PostMetricsWithBody(ctx context.Context, environmentUUID EnvironmentPathParam, params *PostMetricsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // PostMetricsWithBody request with any body PostMetricsWithBody(ctx context.Context, environmentUUID EnvironmentPathParam, params *PostMetricsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PostMetrics(ctx context.Context, environmentUUID EnvironmentPathParam, params *PostMetricsParams, body PostMetricsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) PostMetricsWithBodyWithResponse ¶
func (c *ClientWithResponses) PostMetricsWithBodyWithResponse(ctx context.Context, environmentUUID EnvironmentPathParam, params *PostMetricsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostMetricsResponse, error)
PostMetricsWithBodyWithResponse request with arbitrary body returning *PostMetricsResponse
func (*ClientWithResponses) PostMetricsWithResponse ¶
func (c *ClientWithResponses) PostMetricsWithResponse(ctx context.Context, environmentUUID EnvironmentPathParam, params *PostMetricsParams, body PostMetricsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostMetricsResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // PostMetricsWithBodyWithResponse request with any body PostMetricsWithBodyWithResponse(ctx context.Context, environmentUUID EnvironmentPathParam, params *PostMetricsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostMetricsResponse, error) PostMetricsWithResponse(ctx context.Context, environmentUUID EnvironmentPathParam, params *PostMetricsParams, body PostMetricsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostMetricsResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type ClusterQueryOptionalParam ¶ added in v0.1.21
type ClusterQueryOptionalParam string
ClusterQueryOptionalParam defines model for clusterQueryOptionalParam.
type EnvironmentPathParam ¶
type EnvironmentPathParam string
EnvironmentPathParam defines model for environmentPathParam.
type Error ¶
type Error struct { // Code The http error code Code string `json:"code"` // Details Additional details about the error Details *map[string]interface{} `json:"details,omitempty"` // Message The reason the request failed Message string `json:"message"` }
Error defines model for Error.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InternalServerError ¶
type InternalServerError Error
InternalServerError defines model for InternalServerError.
type Metrics ¶
type Metrics struct { MetricsData *[]MetricsData `json:"metricsData,omitempty"` TargetData *[]TargetData `json:"targetData,omitempty"` }
Metrics defines model for Metrics.
type MetricsData ¶
type MetricsData struct { Attributes []KeyValue `json:"attributes"` Count int `json:"count"` // MetricsType This can be of type FeatureMetrics MetricsType MetricsDataMetricsType `json:"metricsType"` // Timestamp time at when this data was recorded Timestamp int64 `json:"timestamp"` }
MetricsData defines model for MetricsData.
type MetricsDataMetricsType ¶ added in v0.1.0
type MetricsDataMetricsType string
MetricsDataMetricsType This can be of type FeatureMetrics
const (
MetricsDataMetricsTypeFFMETRICS MetricsDataMetricsType = "FFMETRICS"
)
Defines values for MetricsDataMetricsType.
type PostMetricsJSONRequestBody ¶
type PostMetricsJSONRequestBody Metrics
PostMetricsJSONRequestBody defines body for PostMetrics for application/json ContentType.
type PostMetricsParams ¶ added in v0.1.21
type PostMetricsParams struct { // Cluster Unique identifier for the cluster for the account Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"` }
PostMetricsParams defines parameters for PostMetrics.
type PostMetricsResponse ¶
type PostMetricsResponse struct { Body []byte HTTPResponse *http.Response JSON401 *Unauthenticated JSON403 *Unauthorized JSON500 *InternalServerError }
func ParsePostMetricsResponse ¶
func ParsePostMetricsResponse(rsp *http.Response) (*PostMetricsResponse, error)
ParsePostMetricsResponse parses an HTTP response from a PostMetricsWithResponse call
func (PostMetricsResponse) Status ¶
func (r PostMetricsResponse) Status() string
Status returns HTTPResponse.Status
func (PostMetricsResponse) StatusCode ¶
func (r PostMetricsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type TargetData ¶
type TargetData struct { Attributes []KeyValue `json:"attributes"` Identifier string `json:"identifier"` Name string `json:"name"` }
TargetData defines model for TargetData.
type Unauthenticated ¶
type Unauthenticated Error
Unauthenticated defines model for Unauthenticated.