Documentation ¶
Overview ¶
Package promapi contains generated code for OpenAPI specification.
Index ¶
- Variables
- func FailToCode(f FailErrorType) int
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type Alert
- func (s *Alert) Decode(d *jx.Decoder) error
- func (s *Alert) Encode(e *jx.Encoder)
- func (s *Alert) GetActiveAt() OptDateTime
- func (s *Alert) GetAnnotations() LabelSet
- func (s *Alert) GetLabels() LabelSet
- func (s *Alert) GetState() string
- func (s *Alert) GetValue() string
- func (s *Alert) MarshalJSON() ([]byte, error)
- func (s *Alert) SetActiveAt(val OptDateTime)
- func (s *Alert) SetAnnotations(val LabelSet)
- func (s *Alert) SetLabels(val LabelSet)
- func (s *Alert) SetState(val string)
- func (s *Alert) SetValue(val string)
- func (s *Alert) UnmarshalJSON(data []byte) error
- type AlertingRule
- func (s *AlertingRule) Decode(d *jx.Decoder) error
- func (s *AlertingRule) Encode(e *jx.Encoder)
- func (s *AlertingRule) GetAlerts() []Alert
- func (s *AlertingRule) GetAnnotations() LabelSet
- func (s *AlertingRule) GetDuration() string
- func (s *AlertingRule) GetEvaluationTime() float64
- func (s *AlertingRule) GetHealth() RuleHealth
- func (s *AlertingRule) GetLabels() LabelSet
- func (s *AlertingRule) GetLastError() string
- func (s *AlertingRule) GetLastEvaluation() time.Time
- func (s *AlertingRule) GetName() string
- func (s *AlertingRule) GetQuery() string
- func (s *AlertingRule) GetState() OptAlertingRuleState
- func (s *AlertingRule) GetType() string
- func (s *AlertingRule) MarshalJSON() ([]byte, error)
- func (s *AlertingRule) SetAlerts(val []Alert)
- func (s *AlertingRule) SetAnnotations(val LabelSet)
- func (s *AlertingRule) SetDuration(val string)
- func (s *AlertingRule) SetEvaluationTime(val float64)
- func (s *AlertingRule) SetHealth(val RuleHealth)
- func (s *AlertingRule) SetLabels(val LabelSet)
- func (s *AlertingRule) SetLastError(val string)
- func (s *AlertingRule) SetLastEvaluation(val time.Time)
- func (s *AlertingRule) SetName(val string)
- func (s *AlertingRule) SetQuery(val string)
- func (s *AlertingRule) SetState(val OptAlertingRuleState)
- func (s *AlertingRule) SetType(val string)
- func (s *AlertingRule) UnmarshalJSON(data []byte) error
- func (s *AlertingRule) Validate() error
- type AlertingRuleState
- func (AlertingRuleState) AllValues() []AlertingRuleState
- func (s *AlertingRuleState) Decode(d *jx.Decoder) error
- func (s AlertingRuleState) Encode(e *jx.Encoder)
- func (s AlertingRuleState) MarshalJSON() ([]byte, error)
- func (s AlertingRuleState) MarshalText() ([]byte, error)
- func (s *AlertingRuleState) UnmarshalJSON(data []byte) error
- func (s *AlertingRuleState) UnmarshalText(data []byte) error
- func (s AlertingRuleState) Validate() error
- type Bucket
- func (s *Bucket) Decode(d *jx.Decoder) error
- func (s *Bucket) Encode(e *jx.Encoder)
- func (s *Bucket) GetBoundaryType() int
- func (s *Bucket) GetCount() float64
- func (s *Bucket) GetLower() float64
- func (s *Bucket) GetUpper() float64
- func (s *Bucket) MarshalJSON() ([]byte, error)
- func (s *Bucket) SetBoundaryType(val int)
- func (s *Bucket) SetCount(val float64)
- func (s *Bucket) SetLower(val float64)
- func (s *Bucket) SetUpper(val float64)
- func (s *Bucket) UnmarshalJSON(data []byte) error
- func (s *Bucket) Validate() error
- type Client
- func (c *Client) GetLabelValues(ctx context.Context, params GetLabelValuesParams) (*LabelValuesResponse, error)
- func (c *Client) GetLabels(ctx context.Context, params GetLabelsParams) (*LabelsResponse, error)
- func (c *Client) GetMetadata(ctx context.Context, params GetMetadataParams) (*MetadataResponse, error)
- func (c *Client) GetQuery(ctx context.Context, params GetQueryParams) (*QueryResponse, error)
- func (c *Client) GetQueryExemplars(ctx context.Context, params GetQueryExemplarsParams) (*QueryExemplarsResponse, error)
- func (c *Client) GetQueryRange(ctx context.Context, params GetQueryRangeParams) (*QueryResponse, error)
- func (c *Client) GetRules(ctx context.Context, params GetRulesParams) (*RulesResponse, error)
- func (c *Client) GetSeries(ctx context.Context, params GetSeriesParams) (*SeriesResponse, error)
- func (c *Client) PostLabels(ctx context.Context, request *LabelsForm) (*LabelsResponse, error)
- func (c *Client) PostQuery(ctx context.Context, request *QueryForm) (*QueryResponse, error)
- func (c *Client) PostQueryExemplars(ctx context.Context, request *ExemplarsForm) (*QueryExemplarsResponse, error)
- func (c *Client) PostQueryRange(ctx context.Context, request *QueryRangeForm) (*QueryResponse, error)
- func (c *Client) PostSeries(ctx context.Context, request *SeriesForm) (*SeriesResponse, error)
- type ClientOption
- type Data
- func (s *Data) Decode(d *jx.Decoder) error
- func (s Data) Encode(e *jx.Encoder)
- func (s Data) GetMatrix() (v Matrix, ok bool)
- func (s Data) GetScalar() (v Scalar, ok bool)
- func (s Data) GetString() (v String, ok bool)
- func (s Data) GetVector() (v Vector, ok bool)
- func (s Data) IsMatrix() bool
- func (s Data) IsScalar() bool
- func (s Data) IsString() bool
- func (s Data) IsVector() bool
- func (s Data) MarshalJSON() ([]byte, error)
- func (s *Data) SetMatrix(v Matrix)
- func (s *Data) SetScalar(v Scalar)
- func (s *Data) SetString(v String)
- func (s *Data) SetVector(v Vector)
- func (s *Data) UnmarshalJSON(data []byte) error
- func (s Data) Validate() error
- type DataType
- type ErrorHandler
- type Exemplar
- func (s *Exemplar) Decode(d *jx.Decoder) error
- func (s *Exemplar) Encode(e *jx.Encoder)
- func (s *Exemplar) GetLabels() LabelSet
- func (s *Exemplar) GetTimestamp() OptFloat64
- func (s *Exemplar) GetValue() float64
- func (s *Exemplar) MarshalJSON() ([]byte, error)
- func (s *Exemplar) SetLabels(val LabelSet)
- func (s *Exemplar) SetTimestamp(val OptFloat64)
- func (s *Exemplar) SetValue(val float64)
- func (s *Exemplar) UnmarshalJSON(data []byte) error
- func (s *Exemplar) Validate() error
- type Exemplars
- type ExemplarsForm
- func (s *ExemplarsForm) GetEnd() PrometheusTimestamp
- func (s *ExemplarsForm) GetQuery() string
- func (s *ExemplarsForm) GetStart() PrometheusTimestamp
- func (s *ExemplarsForm) SetEnd(val PrometheusTimestamp)
- func (s *ExemplarsForm) SetQuery(val string)
- func (s *ExemplarsForm) SetStart(val PrometheusTimestamp)
- type ExemplarsSet
- func (s *ExemplarsSet) Decode(d *jx.Decoder) error
- func (s *ExemplarsSet) Encode(e *jx.Encoder)
- func (s *ExemplarsSet) GetExemplars() []Exemplar
- func (s *ExemplarsSet) GetSeriesLabels() OptLabelSet
- func (s *ExemplarsSet) MarshalJSON() ([]byte, error)
- func (s *ExemplarsSet) SetExemplars(val []Exemplar)
- func (s *ExemplarsSet) SetSeriesLabels(val OptLabelSet)
- func (s *ExemplarsSet) UnmarshalJSON(data []byte) error
- func (s *ExemplarsSet) Validate() error
- type FPoint
- func (s *FPoint) Decode(d *jx.Decoder) error
- func (s *FPoint) Encode(e *jx.Encoder)
- func (s *FPoint) GetT() float64
- func (s *FPoint) GetV() float64
- func (s *FPoint) MarshalJSON() ([]byte, error)
- func (s *FPoint) SetT(val float64)
- func (s *FPoint) SetV(val float64)
- func (s *FPoint) UnmarshalJSON(data []byte) error
- func (s *FPoint) Validate() error
- type Fail
- func (s *Fail) Decode(d *jx.Decoder) error
- func (s *Fail) Encode(e *jx.Encoder)
- func (s *Fail) GetData() OptData
- func (s *Fail) GetError() string
- func (s *Fail) GetErrorType() FailErrorType
- func (s *Fail) GetStatus() string
- func (s *Fail) MarshalJSON() ([]byte, error)
- func (s *Fail) SetData(val OptData)
- func (s *Fail) SetError(val string)
- func (s *Fail) SetErrorType(val FailErrorType)
- func (s *Fail) SetStatus(val string)
- func (s *Fail) UnmarshalJSON(data []byte) error
- func (s *Fail) Validate() error
- type FailErrorType
- func (FailErrorType) AllValues() []FailErrorType
- func (s *FailErrorType) Decode(d *jx.Decoder) error
- func (s FailErrorType) Encode(e *jx.Encoder)
- func (s FailErrorType) MarshalJSON() ([]byte, error)
- func (s FailErrorType) MarshalText() ([]byte, error)
- func (s *FailErrorType) UnmarshalJSON(data []byte) error
- func (s *FailErrorType) UnmarshalText(data []byte) error
- func (s FailErrorType) Validate() error
- type FailStatusCode
- type GetLabelValuesParams
- type GetLabelsParams
- type GetMetadataParams
- type GetQueryExemplarsParams
- type GetQueryParams
- type GetQueryRangeParams
- type GetRulesParams
- type GetRulesType
- type GetSeriesParams
- type HPoint
- func (s *HPoint) Decode(d *jx.Decoder) error
- func (s *HPoint) Encode(e *jx.Encoder)
- func (s *HPoint) GetT() float64
- func (s *HPoint) GetV1() Histogram
- func (s *HPoint) MarshalJSON() ([]byte, error)
- func (s *HPoint) SetT(val float64)
- func (s *HPoint) SetV1(val Histogram)
- func (s *HPoint) UnmarshalJSON(data []byte) error
- func (s *HPoint) Validate() error
- type Handler
- type Histogram
- func (s *Histogram) Decode(d *jx.Decoder) error
- func (s *Histogram) Encode(e *jx.Encoder)
- func (s *Histogram) GetBuckets() []Bucket
- func (s *Histogram) GetCount() float64
- func (s *Histogram) GetSum() float64
- func (s *Histogram) MarshalJSON() ([]byte, error)
- func (s *Histogram) SetBuckets(val []Bucket)
- func (s *Histogram) SetCount(val float64)
- func (s *Histogram) SetSum(val float64)
- func (s *Histogram) UnmarshalJSON(data []byte) error
- func (s *Histogram) Validate() error
- type HistogramOrValue
- func (s *HistogramOrValue) Decode(d *jx.Decoder) error
- func (s HistogramOrValue) Encode(e *jx.Encoder)
- func (s HistogramOrValue) GetHistogram() (v Histogram, ok bool)
- func (s HistogramOrValue) GetStringFloat64() (v float64, ok bool)
- func (s HistogramOrValue) IsHistogram() bool
- func (s HistogramOrValue) IsStringFloat64() bool
- func (s HistogramOrValue) MarshalJSON() ([]byte, error)
- func (s *HistogramOrValue) SetHistogram(v Histogram)
- func (s *HistogramOrValue) SetStringFloat64(v float64)
- func (s *HistogramOrValue) UnmarshalJSON(data []byte) error
- func (s HistogramOrValue) Validate() error
- type HistogramOrValueType
- type Invoker
- type LabelSet
- type LabelValues
- type LabelValuesResponse
- func (s *LabelValuesResponse) Decode(d *jx.Decoder) error
- func (s *LabelValuesResponse) Encode(e *jx.Encoder)
- func (s *LabelValuesResponse) GetData() LabelValues
- func (s *LabelValuesResponse) GetInfos() []string
- func (s *LabelValuesResponse) GetStatus() string
- func (s *LabelValuesResponse) GetWarnings() []string
- func (s *LabelValuesResponse) MarshalJSON() ([]byte, error)
- func (s *LabelValuesResponse) SetData(val LabelValues)
- func (s *LabelValuesResponse) SetInfos(val []string)
- func (s *LabelValuesResponse) SetStatus(val string)
- func (s *LabelValuesResponse) SetWarnings(val []string)
- func (s *LabelValuesResponse) UnmarshalJSON(data []byte) error
- func (s *LabelValuesResponse) Validate() error
- type Labeler
- type Labels
- type LabelsForm
- func (s *LabelsForm) GetEnd() OptPrometheusTimestamp
- func (s *LabelsForm) GetMatch() []string
- func (s *LabelsForm) GetStart() OptPrometheusTimestamp
- func (s *LabelsForm) SetEnd(val OptPrometheusTimestamp)
- func (s *LabelsForm) SetMatch(val []string)
- func (s *LabelsForm) SetStart(val OptPrometheusTimestamp)
- type LabelsResponse
- func (s *LabelsResponse) Decode(d *jx.Decoder) error
- func (s *LabelsResponse) Encode(e *jx.Encoder)
- func (s *LabelsResponse) GetData() Labels
- func (s *LabelsResponse) GetInfos() []string
- func (s *LabelsResponse) GetStatus() string
- func (s *LabelsResponse) GetWarnings() []string
- func (s *LabelsResponse) MarshalJSON() ([]byte, error)
- func (s *LabelsResponse) SetData(val Labels)
- func (s *LabelsResponse) SetInfos(val []string)
- func (s *LabelsResponse) SetStatus(val string)
- func (s *LabelsResponse) SetWarnings(val []string)
- func (s *LabelsResponse) UnmarshalJSON(data []byte) error
- func (s *LabelsResponse) Validate() error
- type Matrix
- func (s *Matrix) Decode(d *jx.Decoder) error
- func (s *Matrix) Encode(e *jx.Encoder)
- func (s *Matrix) GetResult() []MatrixResultItem
- func (s *Matrix) MarshalJSON() ([]byte, error)
- func (s *Matrix) SetResult(val []MatrixResultItem)
- func (s *Matrix) UnmarshalJSON(data []byte) error
- func (s *Matrix) Validate() error
- type MatrixResultItem
- func (s *MatrixResultItem) Decode(d *jx.Decoder) error
- func (s *MatrixResultItem) Encode(e *jx.Encoder)
- func (s *MatrixResultItem) GetHistograms() []HPoint
- func (s *MatrixResultItem) GetMetric() MatrixResultItemMetric
- func (s *MatrixResultItem) GetValues() []FPoint
- func (s *MatrixResultItem) MarshalJSON() ([]byte, error)
- func (s *MatrixResultItem) SetHistograms(val []HPoint)
- func (s *MatrixResultItem) SetMetric(val MatrixResultItemMetric)
- func (s *MatrixResultItem) SetValues(val []FPoint)
- func (s *MatrixResultItem) UnmarshalJSON(data []byte) error
- func (s *MatrixResultItem) Validate() error
- type MatrixResultItemMetric
- type Metadata
- type MetadataResponse
- func (s *MetadataResponse) Decode(d *jx.Decoder) error
- func (s *MetadataResponse) Encode(e *jx.Encoder)
- func (s *MetadataResponse) GetData() Metadata
- func (s *MetadataResponse) GetInfos() []string
- func (s *MetadataResponse) GetStatus() string
- func (s *MetadataResponse) GetWarnings() []string
- func (s *MetadataResponse) MarshalJSON() ([]byte, error)
- func (s *MetadataResponse) SetData(val Metadata)
- func (s *MetadataResponse) SetInfos(val []string)
- func (s *MetadataResponse) SetStatus(val string)
- func (s *MetadataResponse) SetWarnings(val []string)
- func (s *MetadataResponse) UnmarshalJSON(data []byte) error
- func (s *MetadataResponse) Validate() error
- type MetricMetadata
- func (s *MetricMetadata) Decode(d *jx.Decoder) error
- func (s *MetricMetadata) Encode(e *jx.Encoder)
- func (s *MetricMetadata) GetHelp() OptString
- func (s *MetricMetadata) GetType() OptMetricMetadataType
- func (s *MetricMetadata) GetUnit() OptString
- func (s *MetricMetadata) MarshalJSON() ([]byte, error)
- func (s *MetricMetadata) SetHelp(val OptString)
- func (s *MetricMetadata) SetType(val OptMetricMetadataType)
- func (s *MetricMetadata) SetUnit(val OptString)
- func (s *MetricMetadata) UnmarshalJSON(data []byte) error
- func (s *MetricMetadata) Validate() error
- type MetricMetadataType
- func (MetricMetadataType) AllValues() []MetricMetadataType
- func (s *MetricMetadataType) Decode(d *jx.Decoder) error
- func (s MetricMetadataType) Encode(e *jx.Encoder)
- func (s MetricMetadataType) MarshalJSON() ([]byte, error)
- func (s MetricMetadataType) MarshalText() ([]byte, error)
- func (s *MetricMetadataType) UnmarshalJSON(data []byte) error
- func (s *MetricMetadataType) UnmarshalText(data []byte) error
- func (s MetricMetadataType) Validate() error
- type Middleware
- type OperationName
- type OptAlertingRuleState
- func (o *OptAlertingRuleState) Decode(d *jx.Decoder) error
- func (o OptAlertingRuleState) Encode(e *jx.Encoder)
- func (o OptAlertingRuleState) Get() (v AlertingRuleState, ok bool)
- func (o OptAlertingRuleState) IsSet() bool
- func (s OptAlertingRuleState) MarshalJSON() ([]byte, error)
- func (o OptAlertingRuleState) Or(d AlertingRuleState) AlertingRuleState
- func (o *OptAlertingRuleState) Reset()
- func (o *OptAlertingRuleState) SetTo(v AlertingRuleState)
- func (s *OptAlertingRuleState) UnmarshalJSON(data []byte) error
- type OptData
- func (o *OptData) Decode(d *jx.Decoder) error
- func (o OptData) Encode(e *jx.Encoder)
- func (o OptData) Get() (v Data, ok bool)
- func (o OptData) IsSet() bool
- func (s OptData) MarshalJSON() ([]byte, error)
- func (o OptData) Or(d Data) Data
- func (o *OptData) Reset()
- func (o *OptData) SetTo(v Data)
- func (s *OptData) UnmarshalJSON(data []byte) error
- type OptDateTime
- func (o *OptDateTime) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error
- func (o OptDateTime) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))
- func (o OptDateTime) Get() (v time.Time, ok bool)
- func (o OptDateTime) IsSet() bool
- func (s OptDateTime) MarshalJSON() ([]byte, error)
- func (o OptDateTime) Or(d time.Time) time.Time
- func (o *OptDateTime) Reset()
- func (o *OptDateTime) SetTo(v time.Time)
- func (s *OptDateTime) UnmarshalJSON(data []byte) error
- type OptFloat64
- func (o *OptFloat64) Decode(d *jx.Decoder) error
- func (o OptFloat64) Encode(e *jx.Encoder)
- func (o OptFloat64) Get() (v float64, ok bool)
- func (o OptFloat64) IsSet() bool
- func (s OptFloat64) MarshalJSON() ([]byte, error)
- func (o OptFloat64) Or(d float64) float64
- func (o *OptFloat64) Reset()
- func (o *OptFloat64) SetTo(v float64)
- func (s *OptFloat64) UnmarshalJSON(data []byte) error
- type OptGetRulesType
- type OptInt
- func (o *OptInt) Decode(d *jx.Decoder) error
- func (o OptInt) Encode(e *jx.Encoder)
- func (o OptInt) Get() (v int, ok bool)
- func (o OptInt) IsSet() bool
- func (s OptInt) MarshalJSON() ([]byte, error)
- func (o OptInt) Or(d int) int
- func (o *OptInt) Reset()
- func (o *OptInt) SetTo(v int)
- func (s *OptInt) UnmarshalJSON(data []byte) error
- type OptLabelSet
- func (o *OptLabelSet) Decode(d *jx.Decoder) error
- func (o OptLabelSet) Encode(e *jx.Encoder)
- func (o OptLabelSet) Get() (v LabelSet, ok bool)
- func (o OptLabelSet) IsSet() bool
- func (s OptLabelSet) MarshalJSON() ([]byte, error)
- func (o OptLabelSet) Or(d LabelSet) LabelSet
- func (o *OptLabelSet) Reset()
- func (o *OptLabelSet) SetTo(v LabelSet)
- func (s *OptLabelSet) UnmarshalJSON(data []byte) error
- type OptMetricMetadataType
- func (o *OptMetricMetadataType) Decode(d *jx.Decoder) error
- func (o OptMetricMetadataType) Encode(e *jx.Encoder)
- func (o OptMetricMetadataType) Get() (v MetricMetadataType, ok bool)
- func (o OptMetricMetadataType) IsSet() bool
- func (s OptMetricMetadataType) MarshalJSON() ([]byte, error)
- func (o OptMetricMetadataType) Or(d MetricMetadataType) MetricMetadataType
- func (o *OptMetricMetadataType) Reset()
- func (o *OptMetricMetadataType) SetTo(v MetricMetadataType)
- func (s *OptMetricMetadataType) UnmarshalJSON(data []byte) error
- type OptPrometheusTimestamp
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type Option
- type PrometheusTimestamp
- type QueryExemplarsResponse
- func (s *QueryExemplarsResponse) Decode(d *jx.Decoder) error
- func (s *QueryExemplarsResponse) Encode(e *jx.Encoder)
- func (s *QueryExemplarsResponse) GetData() Exemplars
- func (s *QueryExemplarsResponse) GetInfos() []string
- func (s *QueryExemplarsResponse) GetStatus() string
- func (s *QueryExemplarsResponse) GetWarnings() []string
- func (s *QueryExemplarsResponse) MarshalJSON() ([]byte, error)
- func (s *QueryExemplarsResponse) SetData(val Exemplars)
- func (s *QueryExemplarsResponse) SetInfos(val []string)
- func (s *QueryExemplarsResponse) SetStatus(val string)
- func (s *QueryExemplarsResponse) SetWarnings(val []string)
- func (s *QueryExemplarsResponse) UnmarshalJSON(data []byte) error
- func (s *QueryExemplarsResponse) Validate() error
- type QueryForm
- func (s *QueryForm) GetLookbackDelta() OptString
- func (s *QueryForm) GetQuery() string
- func (s *QueryForm) GetStats() OptString
- func (s *QueryForm) GetTime() OptPrometheusTimestamp
- func (s *QueryForm) SetLookbackDelta(val OptString)
- func (s *QueryForm) SetQuery(val string)
- func (s *QueryForm) SetStats(val OptString)
- func (s *QueryForm) SetTime(val OptPrometheusTimestamp)
- type QueryRangeForm
- func (s *QueryRangeForm) GetEnd() PrometheusTimestamp
- func (s *QueryRangeForm) GetLookbackDelta() OptString
- func (s *QueryRangeForm) GetQuery() string
- func (s *QueryRangeForm) GetStart() PrometheusTimestamp
- func (s *QueryRangeForm) GetStats() OptString
- func (s *QueryRangeForm) GetStep() string
- func (s *QueryRangeForm) SetEnd(val PrometheusTimestamp)
- func (s *QueryRangeForm) SetLookbackDelta(val OptString)
- func (s *QueryRangeForm) SetQuery(val string)
- func (s *QueryRangeForm) SetStart(val PrometheusTimestamp)
- func (s *QueryRangeForm) SetStats(val OptString)
- func (s *QueryRangeForm) SetStep(val string)
- type QueryResponse
- func (s *QueryResponse) Decode(d *jx.Decoder) error
- func (s *QueryResponse) Encode(e *jx.Encoder)
- func (s *QueryResponse) GetData() Data
- func (s *QueryResponse) GetInfos() []string
- func (s *QueryResponse) GetStatus() string
- func (s *QueryResponse) GetWarnings() []string
- func (s *QueryResponse) MarshalJSON() ([]byte, error)
- func (s *QueryResponse) SetData(val Data)
- func (s *QueryResponse) SetInfos(val []string)
- func (s *QueryResponse) SetStatus(val string)
- func (s *QueryResponse) SetWarnings(val []string)
- func (s *QueryResponse) UnmarshalJSON(data []byte) error
- func (s *QueryResponse) Validate() error
- type RecordingRule
- func (s *RecordingRule) Decode(d *jx.Decoder) error
- func (s *RecordingRule) Encode(e *jx.Encoder)
- func (s *RecordingRule) GetEvaluationTime() time.Time
- func (s *RecordingRule) GetHealth() RuleHealth
- func (s *RecordingRule) GetLabels() LabelSet
- func (s *RecordingRule) GetLastError() string
- func (s *RecordingRule) GetLastEvaluation() float64
- func (s *RecordingRule) GetName() string
- func (s *RecordingRule) GetQuery() string
- func (s *RecordingRule) GetType() string
- func (s *RecordingRule) MarshalJSON() ([]byte, error)
- func (s *RecordingRule) SetEvaluationTime(val time.Time)
- func (s *RecordingRule) SetHealth(val RuleHealth)
- func (s *RecordingRule) SetLabels(val LabelSet)
- func (s *RecordingRule) SetLastError(val string)
- func (s *RecordingRule) SetLastEvaluation(val float64)
- func (s *RecordingRule) SetName(val string)
- func (s *RecordingRule) SetQuery(val string)
- func (s *RecordingRule) SetType(val string)
- func (s *RecordingRule) UnmarshalJSON(data []byte) error
- func (s *RecordingRule) Validate() error
- type Route
- type Rule
- func (s *Rule) Decode(d *jx.Decoder) error
- func (s Rule) Encode(e *jx.Encoder)
- func (s Rule) GetAlertingRule() (v AlertingRule, ok bool)
- func (s Rule) GetRecordingRule() (v RecordingRule, ok bool)
- func (s Rule) IsAlertingRule() bool
- func (s Rule) IsRecordingRule() bool
- func (s Rule) MarshalJSON() ([]byte, error)
- func (s *Rule) SetAlertingRule(v AlertingRule)
- func (s *Rule) SetRecordingRule(v RecordingRule)
- func (s *Rule) UnmarshalJSON(data []byte) error
- func (s Rule) Validate() error
- type RuleGroup
- func (s *RuleGroup) Decode(d *jx.Decoder) error
- func (s *RuleGroup) Encode(e *jx.Encoder)
- func (s *RuleGroup) GetEvaluationTime() OptFloat64
- func (s *RuleGroup) GetFile() OptString
- func (s *RuleGroup) GetInternal() OptFloat64
- func (s *RuleGroup) GetLastEvaluation() OptString
- func (s *RuleGroup) GetLimit() OptInt
- func (s *RuleGroup) GetName() OptString
- func (s *RuleGroup) GetRules() []Rule
- func (s *RuleGroup) MarshalJSON() ([]byte, error)
- func (s *RuleGroup) SetEvaluationTime(val OptFloat64)
- func (s *RuleGroup) SetFile(val OptString)
- func (s *RuleGroup) SetInternal(val OptFloat64)
- func (s *RuleGroup) SetLastEvaluation(val OptString)
- func (s *RuleGroup) SetLimit(val OptInt)
- func (s *RuleGroup) SetName(val OptString)
- func (s *RuleGroup) SetRules(val []Rule)
- func (s *RuleGroup) UnmarshalJSON(data []byte) error
- func (s *RuleGroup) Validate() error
- type RuleHealth
- func (RuleHealth) AllValues() []RuleHealth
- func (s *RuleHealth) Decode(d *jx.Decoder) error
- func (s RuleHealth) Encode(e *jx.Encoder)
- func (s RuleHealth) MarshalJSON() ([]byte, error)
- func (s RuleHealth) MarshalText() ([]byte, error)
- func (s *RuleHealth) UnmarshalJSON(data []byte) error
- func (s *RuleHealth) UnmarshalText(data []byte) error
- func (s RuleHealth) Validate() error
- type RuleType
- type Rules
- type RulesResponse
- func (s *RulesResponse) Decode(d *jx.Decoder) error
- func (s *RulesResponse) Encode(e *jx.Encoder)
- func (s *RulesResponse) GetData() Rules
- func (s *RulesResponse) GetInfos() []string
- func (s *RulesResponse) GetStatus() string
- func (s *RulesResponse) GetWarnings() []string
- func (s *RulesResponse) MarshalJSON() ([]byte, error)
- func (s *RulesResponse) SetData(val Rules)
- func (s *RulesResponse) SetInfos(val []string)
- func (s *RulesResponse) SetStatus(val string)
- func (s *RulesResponse) SetWarnings(val []string)
- func (s *RulesResponse) UnmarshalJSON(data []byte) error
- func (s *RulesResponse) Validate() error
- type Sample
- func (s *Sample) Decode(d *jx.Decoder) error
- func (s *Sample) Encode(e *jx.Encoder)
- func (s *Sample) GetHistogramOrValue() HistogramOrValue
- func (s *Sample) GetT() float64
- func (s *Sample) MarshalJSON() ([]byte, error)
- func (s *Sample) SetHistogramOrValue(val HistogramOrValue)
- func (s *Sample) SetT(val float64)
- func (s *Sample) UnmarshalJSON(data []byte) error
- func (s *Sample) Validate() error
- type Scalar
- type Series
- type SeriesForm
- func (s *SeriesForm) GetEnd() OptPrometheusTimestamp
- func (s *SeriesForm) GetMatch() []string
- func (s *SeriesForm) GetStart() OptPrometheusTimestamp
- func (s *SeriesForm) SetEnd(val OptPrometheusTimestamp)
- func (s *SeriesForm) SetMatch(val []string)
- func (s *SeriesForm) SetStart(val OptPrometheusTimestamp)
- func (s *SeriesForm) Validate() error
- type SeriesResponse
- func (s *SeriesResponse) Decode(d *jx.Decoder) error
- func (s *SeriesResponse) Encode(e *jx.Encoder)
- func (s *SeriesResponse) GetData() Series
- func (s *SeriesResponse) GetInfos() []string
- func (s *SeriesResponse) GetStatus() string
- func (s *SeriesResponse) GetWarnings() []string
- func (s *SeriesResponse) MarshalJSON() ([]byte, error)
- func (s *SeriesResponse) SetData(val Series)
- func (s *SeriesResponse) SetInfos(val []string)
- func (s *SeriesResponse) SetStatus(val string)
- func (s *SeriesResponse) SetWarnings(val []string)
- func (s *SeriesResponse) UnmarshalJSON(data []byte) error
- func (s *SeriesResponse) Validate() error
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type String
- type StringValue
- func (s *StringValue) Decode(d *jx.Decoder) error
- func (s *StringValue) Encode(e *jx.Encoder)
- func (s *StringValue) GetT() float64
- func (s *StringValue) GetV() string
- func (s *StringValue) MarshalJSON() ([]byte, error)
- func (s *StringValue) SetT(val float64)
- func (s *StringValue) SetV(val string)
- func (s *StringValue) UnmarshalJSON(data []byte) error
- func (s *StringValue) Validate() error
- type UnimplementedHandler
- func (UnimplementedHandler) GetLabelValues(ctx context.Context, params GetLabelValuesParams) (r *LabelValuesResponse, _ error)
- func (UnimplementedHandler) GetLabels(ctx context.Context, params GetLabelsParams) (r *LabelsResponse, _ error)
- func (UnimplementedHandler) GetMetadata(ctx context.Context, params GetMetadataParams) (r *MetadataResponse, _ error)
- func (UnimplementedHandler) GetQuery(ctx context.Context, params GetQueryParams) (r *QueryResponse, _ error)
- func (UnimplementedHandler) GetQueryExemplars(ctx context.Context, params GetQueryExemplarsParams) (r *QueryExemplarsResponse, _ error)
- func (UnimplementedHandler) GetQueryRange(ctx context.Context, params GetQueryRangeParams) (r *QueryResponse, _ error)
- func (UnimplementedHandler) GetRules(ctx context.Context, params GetRulesParams) (r *RulesResponse, _ error)
- func (UnimplementedHandler) GetSeries(ctx context.Context, params GetSeriesParams) (r *SeriesResponse, _ error)
- func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *FailStatusCode)
- func (UnimplementedHandler) PostLabels(ctx context.Context, req *LabelsForm) (r *LabelsResponse, _ error)
- func (UnimplementedHandler) PostQuery(ctx context.Context, req *QueryForm) (r *QueryResponse, _ error)
- func (UnimplementedHandler) PostQueryExemplars(ctx context.Context, req *ExemplarsForm) (r *QueryExemplarsResponse, _ error)
- func (UnimplementedHandler) PostQueryRange(ctx context.Context, req *QueryRangeForm) (r *QueryResponse, _ error)
- func (UnimplementedHandler) PostSeries(ctx context.Context, req *SeriesForm) (r *SeriesResponse, _ error)
- type Vector
- func (s *Vector) Decode(d *jx.Decoder) error
- func (s *Vector) Encode(e *jx.Encoder)
- func (s *Vector) GetResult() []VectorResultItem
- func (s *Vector) MarshalJSON() ([]byte, error)
- func (s *Vector) SetResult(val []VectorResultItem)
- func (s *Vector) UnmarshalJSON(data []byte) error
- func (s *Vector) Validate() error
- type VectorResultItem
- func (s *VectorResultItem) Decode(d *jx.Decoder) error
- func (s *VectorResultItem) Encode(e *jx.Encoder)
- func (s *VectorResultItem) GetMetric() VectorResultItemMetric
- func (s *VectorResultItem) GetValue() Sample
- func (s *VectorResultItem) MarshalJSON() ([]byte, error)
- func (s *VectorResultItem) SetMetric(val VectorResultItemMetric)
- func (s *VectorResultItem) SetValue(val Sample)
- func (s *VectorResultItem) UnmarshalJSON(data []byte) error
- func (s *VectorResultItem) Validate() error
- type VectorResultItemMetric
Constants ¶
This section is empty.
Variables ¶
var ( // MinTime is the default timestamp used for the begin of optional time ranges. // Exposed to let downstream projects to reference it. MinTime = time.Unix(math.MinInt64/1000+62135596801, 0).UTC() // MaxTime is the default timestamp used for the end of optional time ranges. // Exposed to let downstream projects to reference it. MaxTime = time.Unix(math.MaxInt64/1000-62135596801, 999999999).UTC() )
Functions ¶
func FailToCode ¶
func FailToCode(f FailErrorType) int
FailToCode converts FailErrorType to http status code.
Types ¶
type Alert ¶
type Alert struct { Labels LabelSet `json:"labels"` Annotations LabelSet `json:"annotations"` State string `json:"state"` ActiveAt OptDateTime `json:"activeAt"` Value string `json:"value"` }
Ref: #/components/schemas/Alert
func (*Alert) GetActiveAt ¶
func (s *Alert) GetActiveAt() OptDateTime
GetActiveAt returns the value of ActiveAt.
func (*Alert) GetAnnotations ¶
GetAnnotations returns the value of Annotations.
func (*Alert) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Alert) SetActiveAt ¶
func (s *Alert) SetActiveAt(val OptDateTime)
SetActiveAt sets the value of ActiveAt.
func (*Alert) SetAnnotations ¶
SetAnnotations sets the value of Annotations.
func (*Alert) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type AlertingRule ¶
type AlertingRule struct { State OptAlertingRuleState `json:"state"` Name string `json:"name"` Query string `json:"query"` Duration string `json:"duration"` Labels LabelSet `json:"labels"` Annotations LabelSet `json:"annotations"` Alerts []Alert `json:"alerts"` Health RuleHealth `json:"health"` LastError string `json:"lastError"` EvaluationTime float64 `json:"evaluationTime"` LastEvaluation time.Time `json:"lastEvaluation"` Type string `json:"type"` }
Ref: #/components/schemas/AlertingRule
func (*AlertingRule) Decode ¶
func (s *AlertingRule) Decode(d *jx.Decoder) error
Decode decodes AlertingRule from json.
func (*AlertingRule) Encode ¶
func (s *AlertingRule) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AlertingRule) GetAlerts ¶
func (s *AlertingRule) GetAlerts() []Alert
GetAlerts returns the value of Alerts.
func (*AlertingRule) GetAnnotations ¶
func (s *AlertingRule) GetAnnotations() LabelSet
GetAnnotations returns the value of Annotations.
func (*AlertingRule) GetDuration ¶
func (s *AlertingRule) GetDuration() string
GetDuration returns the value of Duration.
func (*AlertingRule) GetEvaluationTime ¶
func (s *AlertingRule) GetEvaluationTime() float64
GetEvaluationTime returns the value of EvaluationTime.
func (*AlertingRule) GetHealth ¶
func (s *AlertingRule) GetHealth() RuleHealth
GetHealth returns the value of Health.
func (*AlertingRule) GetLabels ¶
func (s *AlertingRule) GetLabels() LabelSet
GetLabels returns the value of Labels.
func (*AlertingRule) GetLastError ¶
func (s *AlertingRule) GetLastError() string
GetLastError returns the value of LastError.
func (*AlertingRule) GetLastEvaluation ¶
func (s *AlertingRule) GetLastEvaluation() time.Time
GetLastEvaluation returns the value of LastEvaluation.
func (*AlertingRule) GetName ¶
func (s *AlertingRule) GetName() string
GetName returns the value of Name.
func (*AlertingRule) GetQuery ¶
func (s *AlertingRule) GetQuery() string
GetQuery returns the value of Query.
func (*AlertingRule) GetState ¶
func (s *AlertingRule) GetState() OptAlertingRuleState
GetState returns the value of State.
func (*AlertingRule) GetType ¶ added in v0.10.0
func (s *AlertingRule) GetType() string
GetType returns the value of Type.
func (*AlertingRule) MarshalJSON ¶
func (s *AlertingRule) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AlertingRule) SetAlerts ¶
func (s *AlertingRule) SetAlerts(val []Alert)
SetAlerts sets the value of Alerts.
func (*AlertingRule) SetAnnotations ¶
func (s *AlertingRule) SetAnnotations(val LabelSet)
SetAnnotations sets the value of Annotations.
func (*AlertingRule) SetDuration ¶
func (s *AlertingRule) SetDuration(val string)
SetDuration sets the value of Duration.
func (*AlertingRule) SetEvaluationTime ¶
func (s *AlertingRule) SetEvaluationTime(val float64)
SetEvaluationTime sets the value of EvaluationTime.
func (*AlertingRule) SetHealth ¶
func (s *AlertingRule) SetHealth(val RuleHealth)
SetHealth sets the value of Health.
func (*AlertingRule) SetLabels ¶
func (s *AlertingRule) SetLabels(val LabelSet)
SetLabels sets the value of Labels.
func (*AlertingRule) SetLastError ¶
func (s *AlertingRule) SetLastError(val string)
SetLastError sets the value of LastError.
func (*AlertingRule) SetLastEvaluation ¶
func (s *AlertingRule) SetLastEvaluation(val time.Time)
SetLastEvaluation sets the value of LastEvaluation.
func (*AlertingRule) SetName ¶
func (s *AlertingRule) SetName(val string)
SetName sets the value of Name.
func (*AlertingRule) SetQuery ¶
func (s *AlertingRule) SetQuery(val string)
SetQuery sets the value of Query.
func (*AlertingRule) SetState ¶
func (s *AlertingRule) SetState(val OptAlertingRuleState)
SetState sets the value of State.
func (*AlertingRule) SetType ¶ added in v0.10.0
func (s *AlertingRule) SetType(val string)
SetType sets the value of Type.
func (*AlertingRule) UnmarshalJSON ¶
func (s *AlertingRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*AlertingRule) Validate ¶
func (s *AlertingRule) Validate() error
type AlertingRuleState ¶
type AlertingRuleState string
const ( AlertingRuleStatePending AlertingRuleState = "pending" AlertingRuleStateFiring AlertingRuleState = "firing" AlertingRuleStateInactive AlertingRuleState = "inactive" )
func (AlertingRuleState) AllValues ¶ added in v0.1.0
func (AlertingRuleState) AllValues() []AlertingRuleState
AllValues returns all AlertingRuleState values.
func (*AlertingRuleState) Decode ¶
func (s *AlertingRuleState) Decode(d *jx.Decoder) error
Decode decodes AlertingRuleState from json.
func (AlertingRuleState) Encode ¶
func (s AlertingRuleState) Encode(e *jx.Encoder)
Encode encodes AlertingRuleState as json.
func (AlertingRuleState) MarshalJSON ¶
func (s AlertingRuleState) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (AlertingRuleState) MarshalText ¶
func (s AlertingRuleState) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*AlertingRuleState) UnmarshalJSON ¶
func (s *AlertingRuleState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*AlertingRuleState) UnmarshalText ¶
func (s *AlertingRuleState) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (AlertingRuleState) Validate ¶
func (s AlertingRuleState) Validate() error
type Bucket ¶ added in v0.1.0
Ref: #/components/schemas/Bucket
func (*Bucket) GetBoundaryType ¶ added in v0.1.0
GetBoundaryType returns the value of BoundaryType.
func (*Bucket) MarshalJSON ¶ added in v0.1.0
MarshalJSON implements stdjson.Marshaler.
func (*Bucket) SetBoundaryType ¶ added in v0.1.0
SetBoundaryType sets the value of BoundaryType.
func (*Bucket) UnmarshalJSON ¶ added in v0.1.0
UnmarshalJSON implements stdjson.Unmarshaler.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) GetLabelValues ¶
func (c *Client) GetLabelValues(ctx context.Context, params GetLabelValuesParams) (*LabelValuesResponse, error)
GetLabelValues invokes getLabelValues operation.
GET /api/v1/label/{label}/values
func (*Client) GetLabels ¶
func (c *Client) GetLabels(ctx context.Context, params GetLabelsParams) (*LabelsResponse, error)
GetLabels invokes getLabels operation.
GET /api/v1/labels
func (*Client) GetMetadata ¶
func (c *Client) GetMetadata(ctx context.Context, params GetMetadataParams) (*MetadataResponse, error)
GetMetadata invokes getMetadata operation.
GET /api/v1/metadata
func (*Client) GetQuery ¶
func (c *Client) GetQuery(ctx context.Context, params GetQueryParams) (*QueryResponse, error)
GetQuery invokes getQuery operation.
Query Prometheus.
GET /api/v1/query
func (*Client) GetQueryExemplars ¶
func (c *Client) GetQueryExemplars(ctx context.Context, params GetQueryExemplarsParams) (*QueryExemplarsResponse, error)
GetQueryExemplars invokes getQueryExemplars operation.
Query Prometheus.
GET /api/v1/query_exemplars
func (*Client) GetQueryRange ¶
func (c *Client) GetQueryRange(ctx context.Context, params GetQueryRangeParams) (*QueryResponse, error)
GetQueryRange invokes getQueryRange operation.
Query Prometheus.
GET /api/v1/query_range
func (*Client) GetRules ¶
func (c *Client) GetRules(ctx context.Context, params GetRulesParams) (*RulesResponse, error)
GetRules invokes getRules operation.
GET /api/v1/rules
func (*Client) GetSeries ¶
func (c *Client) GetSeries(ctx context.Context, params GetSeriesParams) (*SeriesResponse, error)
GetSeries invokes getSeries operation.
Query Prometheus.
GET /api/v1/series
func (*Client) PostLabels ¶
func (c *Client) PostLabels(ctx context.Context, request *LabelsForm) (*LabelsResponse, error)
PostLabels invokes postLabels operation.
POST /api/v1/labels
func (*Client) PostQuery ¶
PostQuery invokes postQuery operation.
Query Prometheus.
POST /api/v1/query
func (*Client) PostQueryExemplars ¶
func (c *Client) PostQueryExemplars(ctx context.Context, request *ExemplarsForm) (*QueryExemplarsResponse, error)
PostQueryExemplars invokes postQueryExemplars operation.
Query Prometheus.
POST /api/v1/query_exemplars
func (*Client) PostQueryRange ¶
func (c *Client) PostQueryRange(ctx context.Context, request *QueryRangeForm) (*QueryResponse, error)
PostQueryRange invokes postQueryRange operation.
Query Prometheus.
POST /api/v1/query_range
func (*Client) PostSeries ¶
func (c *Client) PostSeries(ctx context.Context, request *SeriesForm) (*SeriesResponse, error)
PostSeries invokes postSeries operation.
Query Prometheus.
POST /api/v1/series
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
ClientOption is client config option.
func WithClient ¶
func WithClient(client ht.Client) ClientOption
WithClient specifies http client to use.
type Data ¶
type Data struct { Type DataType // switch on this field Matrix Matrix Vector Vector Scalar Scalar String String }
Ref: #/components/schemas/Data Data represents sum type.
func (Data) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Data) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Exemplar ¶
type Exemplar struct { Labels LabelSet `json:"labels"` Value float64 `json:"value"` Timestamp OptFloat64 `json:"timestamp"` }
Ref: #/components/schemas/Exemplar
func (*Exemplar) GetTimestamp ¶
func (s *Exemplar) GetTimestamp() OptFloat64
GetTimestamp returns the value of Timestamp.
func (*Exemplar) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Exemplar) SetTimestamp ¶
func (s *Exemplar) SetTimestamp(val OptFloat64)
SetTimestamp sets the value of Timestamp.
func (*Exemplar) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Exemplars ¶
type Exemplars []ExemplarsSet
func (Exemplars) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Exemplars) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ExemplarsForm ¶ added in v0.2.0
type ExemplarsForm struct { Query string `json:"query"` Start PrometheusTimestamp `json:"start"` End PrometheusTimestamp `json:"end"` }
Ref: #/components/schemas/ExemplarsForm
func (*ExemplarsForm) GetEnd ¶ added in v0.2.0
func (s *ExemplarsForm) GetEnd() PrometheusTimestamp
GetEnd returns the value of End.
func (*ExemplarsForm) GetQuery ¶ added in v0.2.0
func (s *ExemplarsForm) GetQuery() string
GetQuery returns the value of Query.
func (*ExemplarsForm) GetStart ¶ added in v0.2.0
func (s *ExemplarsForm) GetStart() PrometheusTimestamp
GetStart returns the value of Start.
func (*ExemplarsForm) SetEnd ¶ added in v0.2.0
func (s *ExemplarsForm) SetEnd(val PrometheusTimestamp)
SetEnd sets the value of End.
func (*ExemplarsForm) SetQuery ¶ added in v0.2.0
func (s *ExemplarsForm) SetQuery(val string)
SetQuery sets the value of Query.
func (*ExemplarsForm) SetStart ¶ added in v0.2.0
func (s *ExemplarsForm) SetStart(val PrometheusTimestamp)
SetStart sets the value of Start.
type ExemplarsSet ¶
type ExemplarsSet struct { SeriesLabels OptLabelSet `json:"seriesLabels"` Exemplars []Exemplar `json:"exemplars"` }
Ref: #/components/schemas/ExemplarsSet
func (*ExemplarsSet) Decode ¶
func (s *ExemplarsSet) Decode(d *jx.Decoder) error
Decode decodes ExemplarsSet from json.
func (*ExemplarsSet) Encode ¶
func (s *ExemplarsSet) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ExemplarsSet) GetExemplars ¶
func (s *ExemplarsSet) GetExemplars() []Exemplar
GetExemplars returns the value of Exemplars.
func (*ExemplarsSet) GetSeriesLabels ¶
func (s *ExemplarsSet) GetSeriesLabels() OptLabelSet
GetSeriesLabels returns the value of SeriesLabels.
func (*ExemplarsSet) MarshalJSON ¶
func (s *ExemplarsSet) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ExemplarsSet) SetExemplars ¶
func (s *ExemplarsSet) SetExemplars(val []Exemplar)
SetExemplars sets the value of Exemplars.
func (*ExemplarsSet) SetSeriesLabels ¶
func (s *ExemplarsSet) SetSeriesLabels(val OptLabelSet)
SetSeriesLabels sets the value of SeriesLabels.
func (*ExemplarsSet) UnmarshalJSON ¶
func (s *ExemplarsSet) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ExemplarsSet) Validate ¶
func (s *ExemplarsSet) Validate() error
type FPoint ¶ added in v0.1.0
Ref: #/components/schemas/FPoint
func (*FPoint) MarshalJSON ¶ added in v0.1.0
MarshalJSON implements stdjson.Marshaler.
func (*FPoint) UnmarshalJSON ¶ added in v0.1.0
UnmarshalJSON implements stdjson.Unmarshaler.
type Fail ¶
type Fail struct { Status string `json:"status"` Error string `json:"error"` ErrorType FailErrorType `json:"errorType"` Data OptData `json:"data"` }
May still contain data. Ref: #/components/schemas/Fail
func (*Fail) GetErrorType ¶
func (s *Fail) GetErrorType() FailErrorType
GetErrorType returns the value of ErrorType.
func (*Fail) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Fail) SetErrorType ¶
func (s *Fail) SetErrorType(val FailErrorType)
SetErrorType sets the value of ErrorType.
func (*Fail) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type FailErrorType ¶
type FailErrorType string
const ( FailErrorTypeTimeout FailErrorType = "timeout" FailErrorTypeCanceled FailErrorType = "canceled" FailErrorTypeExecution FailErrorType = "execution" FailErrorTypeBadData FailErrorType = "bad_data" FailErrorTypeInternal FailErrorType = "internal" FailErrorTypeNotFound FailErrorType = "not_found" )
func (FailErrorType) AllValues ¶ added in v0.1.0
func (FailErrorType) AllValues() []FailErrorType
AllValues returns all FailErrorType values.
func (*FailErrorType) Decode ¶
func (s *FailErrorType) Decode(d *jx.Decoder) error
Decode decodes FailErrorType from json.
func (FailErrorType) Encode ¶
func (s FailErrorType) Encode(e *jx.Encoder)
Encode encodes FailErrorType as json.
func (FailErrorType) MarshalJSON ¶
func (s FailErrorType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (FailErrorType) MarshalText ¶
func (s FailErrorType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*FailErrorType) UnmarshalJSON ¶
func (s *FailErrorType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*FailErrorType) UnmarshalText ¶
func (s *FailErrorType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (FailErrorType) Validate ¶
func (s FailErrorType) Validate() error
type FailStatusCode ¶
FailStatusCode wraps Fail with StatusCode.
func (*FailStatusCode) Error ¶
func (s *FailStatusCode) Error() string
func (*FailStatusCode) GetResponse ¶
func (s *FailStatusCode) GetResponse() Fail
GetResponse returns the value of Response.
func (*FailStatusCode) GetStatusCode ¶
func (s *FailStatusCode) GetStatusCode() int
GetStatusCode returns the value of StatusCode.
func (*FailStatusCode) SetResponse ¶
func (s *FailStatusCode) SetResponse(val Fail)
SetResponse sets the value of Response.
func (*FailStatusCode) SetStatusCode ¶
func (s *FailStatusCode) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
func (*FailStatusCode) Validate ¶
func (s *FailStatusCode) Validate() error
type GetLabelValuesParams ¶
type GetLabelValuesParams struct { // Label to query values. Label string // Start timestamp. Start OptPrometheusTimestamp // End timestamp. End OptPrometheusTimestamp // Repeated series selector argument that selects the series from which to read the label names. Match []string // Maximum number of returned series. Optional. 0 means disabled. Limit OptInt }
GetLabelValuesParams is parameters of getLabelValues operation.
type GetLabelsParams ¶
type GetLabelsParams struct { // Start timestamp. Start OptPrometheusTimestamp // End timestamp. End OptPrometheusTimestamp // Repeated series selector argument that selects the series from which to read the label names. Match []string // Maximum number of returned series. Optional. 0 means disabled. Limit OptInt }
GetLabelsParams is parameters of getLabels operation.
type GetMetadataParams ¶
type GetMetadataParams struct { // Maximum number of metrics to return. Limit OptInt // FIXME(tdakkota): undocumented. LimitPerMetric OptInt // A metric name to filter metadata for. // All metric metadata is retrieved if left empty. Metric OptString }
GetMetadataParams is parameters of getMetadata operation.
type GetQueryExemplarsParams ¶
type GetQueryExemplarsParams struct { // Prometheus expression query string. Query string // Start timestamp. Start PrometheusTimestamp // End timestamp. End PrometheusTimestamp }
GetQueryExemplarsParams is parameters of getQueryExemplars operation.
type GetQueryParams ¶
type GetQueryParams struct { // Prometheus expression query string. Query string // Evaluation timestamp. Time OptPrometheusTimestamp // Lookback delta duration in duration format or float number of seconds. LookbackDelta OptString // Statistics to return. Stats OptString }
GetQueryParams is parameters of getQuery operation.
type GetQueryRangeParams ¶
type GetQueryRangeParams struct { // Prometheus expression query string. Query string // Start timestamp, inclusive. Start PrometheusTimestamp // End timestamp, inclusive. End PrometheusTimestamp // Query resolution step width in duration format or float number of seconds. Step string // Lookback delta duration in duration format or float number of seconds. LookbackDelta OptString // Statistics to return. Stats OptString }
GetQueryRangeParams is parameters of getQueryRange operation.
type GetRulesParams ¶
type GetRulesParams struct { // Return only the alerting rules (e.g. type=alert) or the recording rules (e.g. type=record). // When the parameter is absent or empty, no filtering is done. Type OptGetRulesType // Only return rules with the given rule name. // If the parameter is repeated, rules with any of the provided names are returned. // If we've filtered out all the rules of a group, the group is not returned. // When the parameter is absent or empty, no filtering is done. RuleName []string // Only return rules with the given rule group name. // If the parameter is repeated, rules with any of the provided rule group names are returned. // When the parameter is absent or empty, no filtering is done. RuleGroup []string // Only return rules with the given filepath. // If the parameter is repeated, rules with any of the provided filepaths are returned. // When the parameter is absent or empty, no filtering is done. File []string }
GetRulesParams is parameters of getRules operation.
type GetRulesType ¶
type GetRulesType string
const ( GetRulesTypeAlert GetRulesType = "alert" GetRulesTypeRecord GetRulesType = "record" )
func (GetRulesType) AllValues ¶ added in v0.1.0
func (GetRulesType) AllValues() []GetRulesType
AllValues returns all GetRulesType values.
func (GetRulesType) MarshalText ¶
func (s GetRulesType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*GetRulesType) UnmarshalText ¶
func (s *GetRulesType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (GetRulesType) Validate ¶
func (s GetRulesType) Validate() error
type GetSeriesParams ¶
type GetSeriesParams struct { // Start timestamp. Start OptPrometheusTimestamp // End timestamp. End OptPrometheusTimestamp // Repeated series selector argument that selects the series from which to read the label names. Match []string // Maximum number of returned series. Optional. 0 means disabled. Limit OptInt }
GetSeriesParams is parameters of getSeries operation.
type HPoint ¶ added in v0.1.0
Ref: #/components/schemas/HPoint
func (*HPoint) MarshalJSON ¶ added in v0.1.0
MarshalJSON implements stdjson.Marshaler.
func (*HPoint) UnmarshalJSON ¶ added in v0.1.0
UnmarshalJSON implements stdjson.Unmarshaler.
type Handler ¶
type Handler interface { // GetLabelValues implements getLabelValues operation. // // GET /api/v1/label/{label}/values GetLabelValues(ctx context.Context, params GetLabelValuesParams) (*LabelValuesResponse, error) // GetLabels implements getLabels operation. // // GET /api/v1/labels GetLabels(ctx context.Context, params GetLabelsParams) (*LabelsResponse, error) // GetMetadata implements getMetadata operation. // // GET /api/v1/metadata GetMetadata(ctx context.Context, params GetMetadataParams) (*MetadataResponse, error) // GetQuery implements getQuery operation. // // Query Prometheus. // // GET /api/v1/query GetQuery(ctx context.Context, params GetQueryParams) (*QueryResponse, error) // GetQueryExemplars implements getQueryExemplars operation. // // Query Prometheus. // // GET /api/v1/query_exemplars GetQueryExemplars(ctx context.Context, params GetQueryExemplarsParams) (*QueryExemplarsResponse, error) // GetQueryRange implements getQueryRange operation. // // Query Prometheus. // // GET /api/v1/query_range GetQueryRange(ctx context.Context, params GetQueryRangeParams) (*QueryResponse, error) // GetRules implements getRules operation. // // GET /api/v1/rules GetRules(ctx context.Context, params GetRulesParams) (*RulesResponse, error) // GetSeries implements getSeries operation. // // Query Prometheus. // // GET /api/v1/series GetSeries(ctx context.Context, params GetSeriesParams) (*SeriesResponse, error) // PostLabels implements postLabels operation. // // POST /api/v1/labels PostLabels(ctx context.Context, req *LabelsForm) (*LabelsResponse, error) // PostQuery implements postQuery operation. // // Query Prometheus. // // POST /api/v1/query PostQuery(ctx context.Context, req *QueryForm) (*QueryResponse, error) // PostQueryExemplars implements postQueryExemplars operation. // // Query Prometheus. // // POST /api/v1/query_exemplars PostQueryExemplars(ctx context.Context, req *ExemplarsForm) (*QueryExemplarsResponse, error) // PostQueryRange implements postQueryRange operation. // // Query Prometheus. // // POST /api/v1/query_range PostQueryRange(ctx context.Context, req *QueryRangeForm) (*QueryResponse, error) // PostSeries implements postSeries operation. // // Query Prometheus. // // POST /api/v1/series PostSeries(ctx context.Context, req *SeriesForm) (*SeriesResponse, error) // NewError creates *FailStatusCode from error returned by handler. // // Used for common default response. NewError(ctx context.Context, err error) *FailStatusCode }
Handler handles operations described by OpenAPI v3 specification.
type Histogram ¶ added in v0.1.0
type Histogram struct { Count float64 `json:"count"` Sum float64 `json:"sum"` Buckets []Bucket `json:"buckets"` }
Ref: #/components/schemas/Histogram
func (*Histogram) GetBuckets ¶ added in v0.1.0
GetBuckets returns the value of Buckets.
func (*Histogram) MarshalJSON ¶ added in v0.1.0
MarshalJSON implements stdjson.Marshaler.
func (*Histogram) SetBuckets ¶ added in v0.1.0
SetBuckets sets the value of Buckets.
func (*Histogram) UnmarshalJSON ¶ added in v0.1.0
UnmarshalJSON implements stdjson.Unmarshaler.
type HistogramOrValue ¶ added in v0.1.0
type HistogramOrValue struct { Type HistogramOrValueType // switch on this field Histogram Histogram StringFloat64 float64 }
HistogramOrValue represents sum type.
func NewHistogramHistogramOrValue ¶ added in v0.1.0
func NewHistogramHistogramOrValue(v Histogram) HistogramOrValue
NewHistogramHistogramOrValue returns new HistogramOrValue from Histogram.
func NewStringFloat64HistogramOrValue ¶ added in v0.2.0
func NewStringFloat64HistogramOrValue(v float64) HistogramOrValue
NewStringFloat64HistogramOrValue returns new HistogramOrValue from float64.
func (*HistogramOrValue) Decode ¶ added in v0.1.0
func (s *HistogramOrValue) Decode(d *jx.Decoder) error
Decode decodes HistogramOrValue from json.
func (HistogramOrValue) Encode ¶ added in v0.1.0
func (s HistogramOrValue) Encode(e *jx.Encoder)
Encode encodes HistogramOrValue as json.
func (HistogramOrValue) GetHistogram ¶ added in v0.1.0
func (s HistogramOrValue) GetHistogram() (v Histogram, ok bool)
GetHistogram returns Histogram and true boolean if HistogramOrValue is Histogram.
func (HistogramOrValue) GetStringFloat64 ¶ added in v0.2.0
func (s HistogramOrValue) GetStringFloat64() (v float64, ok bool)
GetStringFloat64 returns float64 and true boolean if HistogramOrValue is float64.
func (HistogramOrValue) IsHistogram ¶ added in v0.1.0
func (s HistogramOrValue) IsHistogram() bool
IsHistogram reports whether HistogramOrValue is Histogram.
func (HistogramOrValue) IsStringFloat64 ¶ added in v0.2.0
func (s HistogramOrValue) IsStringFloat64() bool
IsStringFloat64 reports whether HistogramOrValue is float64.
func (HistogramOrValue) MarshalJSON ¶ added in v0.1.0
func (s HistogramOrValue) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*HistogramOrValue) SetHistogram ¶ added in v0.1.0
func (s *HistogramOrValue) SetHistogram(v Histogram)
SetHistogram sets HistogramOrValue to Histogram.
func (*HistogramOrValue) SetStringFloat64 ¶ added in v0.2.0
func (s *HistogramOrValue) SetStringFloat64(v float64)
SetStringFloat64 sets HistogramOrValue to float64.
func (*HistogramOrValue) UnmarshalJSON ¶ added in v0.1.0
func (s *HistogramOrValue) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (HistogramOrValue) Validate ¶ added in v0.1.0
func (s HistogramOrValue) Validate() error
type HistogramOrValueType ¶ added in v0.1.0
type HistogramOrValueType string
HistogramOrValueType is oneOf type of HistogramOrValue.
const ( HistogramHistogramOrValue HistogramOrValueType = "Histogram" StringFloat64HistogramOrValue HistogramOrValueType = "float64" )
Possible values for HistogramOrValueType.
type Invoker ¶ added in v0.1.0
type Invoker interface { // GetLabelValues invokes getLabelValues operation. // // GET /api/v1/label/{label}/values GetLabelValues(ctx context.Context, params GetLabelValuesParams) (*LabelValuesResponse, error) // GetLabels invokes getLabels operation. // // GET /api/v1/labels GetLabels(ctx context.Context, params GetLabelsParams) (*LabelsResponse, error) // GetMetadata invokes getMetadata operation. // // GET /api/v1/metadata GetMetadata(ctx context.Context, params GetMetadataParams) (*MetadataResponse, error) // GetQuery invokes getQuery operation. // // Query Prometheus. // // GET /api/v1/query GetQuery(ctx context.Context, params GetQueryParams) (*QueryResponse, error) // GetQueryExemplars invokes getQueryExemplars operation. // // Query Prometheus. // // GET /api/v1/query_exemplars GetQueryExemplars(ctx context.Context, params GetQueryExemplarsParams) (*QueryExemplarsResponse, error) // GetQueryRange invokes getQueryRange operation. // // Query Prometheus. // // GET /api/v1/query_range GetQueryRange(ctx context.Context, params GetQueryRangeParams) (*QueryResponse, error) // GetRules invokes getRules operation. // // GET /api/v1/rules GetRules(ctx context.Context, params GetRulesParams) (*RulesResponse, error) // GetSeries invokes getSeries operation. // // Query Prometheus. // // GET /api/v1/series GetSeries(ctx context.Context, params GetSeriesParams) (*SeriesResponse, error) // PostLabels invokes postLabels operation. // // POST /api/v1/labels PostLabels(ctx context.Context, request *LabelsForm) (*LabelsResponse, error) // PostQuery invokes postQuery operation. // // Query Prometheus. // // POST /api/v1/query PostQuery(ctx context.Context, request *QueryForm) (*QueryResponse, error) // PostQueryExemplars invokes postQueryExemplars operation. // // Query Prometheus. // // POST /api/v1/query_exemplars PostQueryExemplars(ctx context.Context, request *ExemplarsForm) (*QueryExemplarsResponse, error) // PostQueryRange invokes postQueryRange operation. // // Query Prometheus. // // POST /api/v1/query_range PostQueryRange(ctx context.Context, request *QueryRangeForm) (*QueryResponse, error) // PostSeries invokes postSeries operation. // // Query Prometheus. // // POST /api/v1/series PostSeries(ctx context.Context, request *SeriesForm) (*SeriesResponse, error) }
Invoker invokes operations described by OpenAPI v3 specification.
type LabelSet ¶
Ref: #/components/schemas/LabelSet
func (LabelSet) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*LabelSet) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type LabelValues ¶
type LabelValues []string
func (*LabelValues) Decode ¶
func (s *LabelValues) Decode(d *jx.Decoder) error
Decode decodes LabelValues from json.
func (LabelValues) Encode ¶
func (s LabelValues) Encode(e *jx.Encoder)
Encode encodes LabelValues as json.
func (LabelValues) MarshalJSON ¶
func (s LabelValues) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*LabelValues) UnmarshalJSON ¶
func (s *LabelValues) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (LabelValues) Validate ¶
func (s LabelValues) Validate() error
type LabelValuesResponse ¶
type LabelValuesResponse struct { // Always 'success'. Status string `json:"status"` // Only if there were warnings while executing the request. There will still be data in the data // field. Warnings []string `json:"warnings"` // Only set if there were info-level annnotations while executing the request. Infos []string `json:"infos"` Data LabelValues `json:"data"` }
Merged schema.
func (*LabelValuesResponse) Decode ¶
func (s *LabelValuesResponse) Decode(d *jx.Decoder) error
Decode decodes LabelValuesResponse from json.
func (*LabelValuesResponse) Encode ¶
func (s *LabelValuesResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*LabelValuesResponse) GetData ¶
func (s *LabelValuesResponse) GetData() LabelValues
GetData returns the value of Data.
func (*LabelValuesResponse) GetInfos ¶ added in v0.15.0
func (s *LabelValuesResponse) GetInfos() []string
GetInfos returns the value of Infos.
func (*LabelValuesResponse) GetStatus ¶
func (s *LabelValuesResponse) GetStatus() string
GetStatus returns the value of Status.
func (*LabelValuesResponse) GetWarnings ¶
func (s *LabelValuesResponse) GetWarnings() []string
GetWarnings returns the value of Warnings.
func (*LabelValuesResponse) MarshalJSON ¶
func (s *LabelValuesResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*LabelValuesResponse) SetData ¶
func (s *LabelValuesResponse) SetData(val LabelValues)
SetData sets the value of Data.
func (*LabelValuesResponse) SetInfos ¶ added in v0.15.0
func (s *LabelValuesResponse) SetInfos(val []string)
SetInfos sets the value of Infos.
func (*LabelValuesResponse) SetStatus ¶
func (s *LabelValuesResponse) SetStatus(val string)
SetStatus sets the value of Status.
func (*LabelValuesResponse) SetWarnings ¶
func (s *LabelValuesResponse) SetWarnings(val []string)
SetWarnings sets the value of Warnings.
func (*LabelValuesResponse) UnmarshalJSON ¶
func (s *LabelValuesResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*LabelValuesResponse) Validate ¶
func (s *LabelValuesResponse) Validate() error
type Labeler ¶ added in v0.10.0
type Labeler struct {
// contains filtered or unexported fields
}
Labeler is used to allow adding custom attributes to the server request metrics.
func LabelerFromContext ¶ added in v0.10.0
LabelerFromContext retrieves the Labeler from the provided context, if present.
If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.
func (*Labeler) AttributeSet ¶ added in v0.10.0
AttributeSet returns the attributes added to the Labeler as an attribute.Set.
type Labels ¶
type Labels []string
func (Labels) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Labels) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type LabelsForm ¶ added in v0.1.0
type LabelsForm struct { Start OptPrometheusTimestamp `json:"start"` End OptPrometheusTimestamp `json:"end"` Match []string `json:"match[]"` }
Ref: #/components/schemas/LabelsForm
func (*LabelsForm) GetEnd ¶ added in v0.1.0
func (s *LabelsForm) GetEnd() OptPrometheusTimestamp
GetEnd returns the value of End.
func (*LabelsForm) GetMatch ¶ added in v0.1.0
func (s *LabelsForm) GetMatch() []string
GetMatch returns the value of Match.
func (*LabelsForm) GetStart ¶ added in v0.1.0
func (s *LabelsForm) GetStart() OptPrometheusTimestamp
GetStart returns the value of Start.
func (*LabelsForm) SetEnd ¶ added in v0.1.0
func (s *LabelsForm) SetEnd(val OptPrometheusTimestamp)
SetEnd sets the value of End.
func (*LabelsForm) SetMatch ¶ added in v0.1.0
func (s *LabelsForm) SetMatch(val []string)
SetMatch sets the value of Match.
func (*LabelsForm) SetStart ¶ added in v0.1.0
func (s *LabelsForm) SetStart(val OptPrometheusTimestamp)
SetStart sets the value of Start.
type LabelsResponse ¶
type LabelsResponse struct { // Always 'success'. Status string `json:"status"` // Only if there were warnings while executing the request. There will still be data in the data // field. Warnings []string `json:"warnings"` // Only set if there were info-level annnotations while executing the request. Infos []string `json:"infos"` Data Labels `json:"data"` }
Merged schema.
func (*LabelsResponse) Decode ¶
func (s *LabelsResponse) Decode(d *jx.Decoder) error
Decode decodes LabelsResponse from json.
func (*LabelsResponse) Encode ¶
func (s *LabelsResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*LabelsResponse) GetData ¶
func (s *LabelsResponse) GetData() Labels
GetData returns the value of Data.
func (*LabelsResponse) GetInfos ¶ added in v0.15.0
func (s *LabelsResponse) GetInfos() []string
GetInfos returns the value of Infos.
func (*LabelsResponse) GetStatus ¶
func (s *LabelsResponse) GetStatus() string
GetStatus returns the value of Status.
func (*LabelsResponse) GetWarnings ¶
func (s *LabelsResponse) GetWarnings() []string
GetWarnings returns the value of Warnings.
func (*LabelsResponse) MarshalJSON ¶
func (s *LabelsResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*LabelsResponse) SetData ¶
func (s *LabelsResponse) SetData(val Labels)
SetData sets the value of Data.
func (*LabelsResponse) SetInfos ¶ added in v0.15.0
func (s *LabelsResponse) SetInfos(val []string)
SetInfos sets the value of Infos.
func (*LabelsResponse) SetStatus ¶
func (s *LabelsResponse) SetStatus(val string)
SetStatus sets the value of Status.
func (*LabelsResponse) SetWarnings ¶
func (s *LabelsResponse) SetWarnings(val []string)
SetWarnings sets the value of Warnings.
func (*LabelsResponse) UnmarshalJSON ¶
func (s *LabelsResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*LabelsResponse) Validate ¶
func (s *LabelsResponse) Validate() error
type Matrix ¶
type Matrix struct {
Result []MatrixResultItem `json:"result"`
}
Ref: #/components/schemas/Matrix
func (*Matrix) GetResult ¶
func (s *Matrix) GetResult() []MatrixResultItem
GetResult returns the value of Result.
func (*Matrix) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Matrix) SetResult ¶
func (s *Matrix) SetResult(val []MatrixResultItem)
SetResult sets the value of Result.
func (*Matrix) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type MatrixResultItem ¶
type MatrixResultItem struct { Metric MatrixResultItemMetric `json:"metric"` Values []FPoint `json:"values"` Histograms []HPoint `json:"histograms"` }
func (*MatrixResultItem) Decode ¶
func (s *MatrixResultItem) Decode(d *jx.Decoder) error
Decode decodes MatrixResultItem from json.
func (*MatrixResultItem) Encode ¶
func (s *MatrixResultItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*MatrixResultItem) GetHistograms ¶ added in v0.1.0
func (s *MatrixResultItem) GetHistograms() []HPoint
GetHistograms returns the value of Histograms.
func (*MatrixResultItem) GetMetric ¶
func (s *MatrixResultItem) GetMetric() MatrixResultItemMetric
GetMetric returns the value of Metric.
func (*MatrixResultItem) GetValues ¶
func (s *MatrixResultItem) GetValues() []FPoint
GetValues returns the value of Values.
func (*MatrixResultItem) MarshalJSON ¶
func (s *MatrixResultItem) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MatrixResultItem) SetHistograms ¶ added in v0.1.0
func (s *MatrixResultItem) SetHistograms(val []HPoint)
SetHistograms sets the value of Histograms.
func (*MatrixResultItem) SetMetric ¶
func (s *MatrixResultItem) SetMetric(val MatrixResultItemMetric)
SetMetric sets the value of Metric.
func (*MatrixResultItem) SetValues ¶
func (s *MatrixResultItem) SetValues(val []FPoint)
SetValues sets the value of Values.
func (*MatrixResultItem) UnmarshalJSON ¶
func (s *MatrixResultItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*MatrixResultItem) Validate ¶
func (s *MatrixResultItem) Validate() error
type MatrixResultItemMetric ¶
func (*MatrixResultItemMetric) Decode ¶
func (s *MatrixResultItemMetric) Decode(d *jx.Decoder) error
Decode decodes MatrixResultItemMetric from json.
func (MatrixResultItemMetric) Encode ¶
func (s MatrixResultItemMetric) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (MatrixResultItemMetric) MarshalJSON ¶
func (s MatrixResultItemMetric) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MatrixResultItemMetric) UnmarshalJSON ¶
func (s *MatrixResultItemMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Metadata ¶
type Metadata map[string][]MetricMetadata
Ref: #/components/schemas/Metadata
func (Metadata) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Metadata) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type MetadataResponse ¶
type MetadataResponse struct { // Always 'success'. Status string `json:"status"` // Only if there were warnings while executing the request. There will still be data in the data // field. Warnings []string `json:"warnings"` // Only set if there were info-level annnotations while executing the request. Infos []string `json:"infos"` Data Metadata `json:"data"` }
Merged schema.
func (*MetadataResponse) Decode ¶
func (s *MetadataResponse) Decode(d *jx.Decoder) error
Decode decodes MetadataResponse from json.
func (*MetadataResponse) Encode ¶
func (s *MetadataResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*MetadataResponse) GetData ¶
func (s *MetadataResponse) GetData() Metadata
GetData returns the value of Data.
func (*MetadataResponse) GetInfos ¶ added in v0.15.0
func (s *MetadataResponse) GetInfos() []string
GetInfos returns the value of Infos.
func (*MetadataResponse) GetStatus ¶
func (s *MetadataResponse) GetStatus() string
GetStatus returns the value of Status.
func (*MetadataResponse) GetWarnings ¶
func (s *MetadataResponse) GetWarnings() []string
GetWarnings returns the value of Warnings.
func (*MetadataResponse) MarshalJSON ¶
func (s *MetadataResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MetadataResponse) SetData ¶
func (s *MetadataResponse) SetData(val Metadata)
SetData sets the value of Data.
func (*MetadataResponse) SetInfos ¶ added in v0.15.0
func (s *MetadataResponse) SetInfos(val []string)
SetInfos sets the value of Infos.
func (*MetadataResponse) SetStatus ¶
func (s *MetadataResponse) SetStatus(val string)
SetStatus sets the value of Status.
func (*MetadataResponse) SetWarnings ¶
func (s *MetadataResponse) SetWarnings(val []string)
SetWarnings sets the value of Warnings.
func (*MetadataResponse) UnmarshalJSON ¶
func (s *MetadataResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*MetadataResponse) Validate ¶
func (s *MetadataResponse) Validate() error
type MetricMetadata ¶
type MetricMetadata struct { Type OptMetricMetadataType `json:"type"` Help OptString `json:"help"` Unit OptString `json:"unit"` }
Ref: #/components/schemas/MetricMetadata
func (*MetricMetadata) Decode ¶
func (s *MetricMetadata) Decode(d *jx.Decoder) error
Decode decodes MetricMetadata from json.
func (*MetricMetadata) Encode ¶
func (s *MetricMetadata) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*MetricMetadata) GetHelp ¶
func (s *MetricMetadata) GetHelp() OptString
GetHelp returns the value of Help.
func (*MetricMetadata) GetType ¶
func (s *MetricMetadata) GetType() OptMetricMetadataType
GetType returns the value of Type.
func (*MetricMetadata) GetUnit ¶
func (s *MetricMetadata) GetUnit() OptString
GetUnit returns the value of Unit.
func (*MetricMetadata) MarshalJSON ¶
func (s *MetricMetadata) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MetricMetadata) SetHelp ¶
func (s *MetricMetadata) SetHelp(val OptString)
SetHelp sets the value of Help.
func (*MetricMetadata) SetType ¶
func (s *MetricMetadata) SetType(val OptMetricMetadataType)
SetType sets the value of Type.
func (*MetricMetadata) SetUnit ¶
func (s *MetricMetadata) SetUnit(val OptString)
SetUnit sets the value of Unit.
func (*MetricMetadata) UnmarshalJSON ¶
func (s *MetricMetadata) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*MetricMetadata) Validate ¶
func (s *MetricMetadata) Validate() error
type MetricMetadataType ¶
type MetricMetadataType string
const ( MetricMetadataTypeCounter MetricMetadataType = "counter" MetricMetadataTypeGauge MetricMetadataType = "gauge" MetricMetadataTypeHistogram MetricMetadataType = "histogram" MetricMetadataTypeGaugehistogram MetricMetadataType = "gaugehistogram" MetricMetadataTypeSummary MetricMetadataType = "summary" MetricMetadataTypeInfo MetricMetadataType = "info" MetricMetadataTypeStateset MetricMetadataType = "stateset" MetricMetadataTypeUnknown MetricMetadataType = "unknown" )
func (MetricMetadataType) AllValues ¶ added in v0.1.0
func (MetricMetadataType) AllValues() []MetricMetadataType
AllValues returns all MetricMetadataType values.
func (*MetricMetadataType) Decode ¶
func (s *MetricMetadataType) Decode(d *jx.Decoder) error
Decode decodes MetricMetadataType from json.
func (MetricMetadataType) Encode ¶
func (s MetricMetadataType) Encode(e *jx.Encoder)
Encode encodes MetricMetadataType as json.
func (MetricMetadataType) MarshalJSON ¶
func (s MetricMetadataType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (MetricMetadataType) MarshalText ¶
func (s MetricMetadataType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*MetricMetadataType) UnmarshalJSON ¶
func (s *MetricMetadataType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*MetricMetadataType) UnmarshalText ¶
func (s *MetricMetadataType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (MetricMetadataType) Validate ¶
func (s MetricMetadataType) Validate() error
type OperationName ¶ added in v0.16.0
type OperationName = string
OperationName is the ogen operation name
const ( GetLabelValuesOperation OperationName = "GetLabelValues" GetLabelsOperation OperationName = "GetLabels" GetMetadataOperation OperationName = "GetMetadata" GetQueryOperation OperationName = "GetQuery" GetQueryExemplarsOperation OperationName = "GetQueryExemplars" GetQueryRangeOperation OperationName = "GetQueryRange" GetRulesOperation OperationName = "GetRules" GetSeriesOperation OperationName = "GetSeries" PostLabelsOperation OperationName = "PostLabels" PostQueryOperation OperationName = "PostQuery" PostQueryExemplarsOperation OperationName = "PostQueryExemplars" PostQueryRangeOperation OperationName = "PostQueryRange" PostSeriesOperation OperationName = "PostSeries" )
type OptAlertingRuleState ¶
type OptAlertingRuleState struct { Value AlertingRuleState Set bool }
OptAlertingRuleState is optional AlertingRuleState.
func NewOptAlertingRuleState ¶
func NewOptAlertingRuleState(v AlertingRuleState) OptAlertingRuleState
NewOptAlertingRuleState returns new OptAlertingRuleState with value set to v.
func (*OptAlertingRuleState) Decode ¶
func (o *OptAlertingRuleState) Decode(d *jx.Decoder) error
Decode decodes AlertingRuleState from json.
func (OptAlertingRuleState) Encode ¶
func (o OptAlertingRuleState) Encode(e *jx.Encoder)
Encode encodes AlertingRuleState as json.
func (OptAlertingRuleState) Get ¶
func (o OptAlertingRuleState) Get() (v AlertingRuleState, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptAlertingRuleState) IsSet ¶
func (o OptAlertingRuleState) IsSet() bool
IsSet returns true if OptAlertingRuleState was set.
func (OptAlertingRuleState) MarshalJSON ¶
func (s OptAlertingRuleState) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptAlertingRuleState) Or ¶
func (o OptAlertingRuleState) Or(d AlertingRuleState) AlertingRuleState
Or returns value if set, or given parameter if does not.
func (*OptAlertingRuleState) SetTo ¶
func (o *OptAlertingRuleState) SetTo(v AlertingRuleState)
SetTo sets value to v.
func (*OptAlertingRuleState) UnmarshalJSON ¶
func (s *OptAlertingRuleState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptData ¶
OptData is optional Data.
func NewOptData ¶
NewOptData returns new OptData with value set to v.
func (OptData) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptData) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptDateTime ¶
OptDateTime is optional time.Time.
func NewOptDateTime ¶
func NewOptDateTime(v time.Time) OptDateTime
NewOptDateTime returns new OptDateTime with value set to v.
func (OptDateTime) Get ¶
func (o OptDateTime) Get() (v time.Time, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptDateTime) IsSet ¶
func (o OptDateTime) IsSet() bool
IsSet returns true if OptDateTime was set.
func (OptDateTime) MarshalJSON ¶
func (s OptDateTime) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptDateTime) Or ¶
func (o OptDateTime) Or(d time.Time) time.Time
Or returns value if set, or given parameter if does not.
func (*OptDateTime) UnmarshalJSON ¶
func (s *OptDateTime) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptFloat64 ¶
OptFloat64 is optional float64.
func NewOptFloat64 ¶
func NewOptFloat64(v float64) OptFloat64
NewOptFloat64 returns new OptFloat64 with value set to v.
func (*OptFloat64) Decode ¶
func (o *OptFloat64) Decode(d *jx.Decoder) error
Decode decodes float64 from json.
func (OptFloat64) Encode ¶
func (o OptFloat64) Encode(e *jx.Encoder)
Encode encodes float64 as json.
func (OptFloat64) Get ¶
func (o OptFloat64) Get() (v float64, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptFloat64) IsSet ¶
func (o OptFloat64) IsSet() bool
IsSet returns true if OptFloat64 was set.
func (OptFloat64) MarshalJSON ¶
func (s OptFloat64) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptFloat64) Or ¶
func (o OptFloat64) Or(d float64) float64
Or returns value if set, or given parameter if does not.
func (*OptFloat64) UnmarshalJSON ¶
func (s *OptFloat64) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptGetRulesType ¶
type OptGetRulesType struct { Value GetRulesType Set bool }
OptGetRulesType is optional GetRulesType.
func NewOptGetRulesType ¶
func NewOptGetRulesType(v GetRulesType) OptGetRulesType
NewOptGetRulesType returns new OptGetRulesType with value set to v.
func (OptGetRulesType) Get ¶
func (o OptGetRulesType) Get() (v GetRulesType, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptGetRulesType) IsSet ¶
func (o OptGetRulesType) IsSet() bool
IsSet returns true if OptGetRulesType was set.
func (OptGetRulesType) Or ¶
func (o OptGetRulesType) Or(d GetRulesType) GetRulesType
Or returns value if set, or given parameter if does not.
func (*OptGetRulesType) SetTo ¶
func (o *OptGetRulesType) SetTo(v GetRulesType)
SetTo sets value to v.
type OptInt ¶
OptInt is optional int.
func (OptInt) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLabelSet ¶
OptLabelSet is optional LabelSet.
func NewOptLabelSet ¶
func NewOptLabelSet(v LabelSet) OptLabelSet
NewOptLabelSet returns new OptLabelSet with value set to v.
func (*OptLabelSet) Decode ¶
func (o *OptLabelSet) Decode(d *jx.Decoder) error
Decode decodes LabelSet from json.
func (OptLabelSet) Encode ¶
func (o OptLabelSet) Encode(e *jx.Encoder)
Encode encodes LabelSet as json.
func (OptLabelSet) Get ¶
func (o OptLabelSet) Get() (v LabelSet, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptLabelSet) IsSet ¶
func (o OptLabelSet) IsSet() bool
IsSet returns true if OptLabelSet was set.
func (OptLabelSet) MarshalJSON ¶
func (s OptLabelSet) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptLabelSet) Or ¶
func (o OptLabelSet) Or(d LabelSet) LabelSet
Or returns value if set, or given parameter if does not.
func (*OptLabelSet) UnmarshalJSON ¶
func (s *OptLabelSet) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptMetricMetadataType ¶
type OptMetricMetadataType struct { Value MetricMetadataType Set bool }
OptMetricMetadataType is optional MetricMetadataType.
func NewOptMetricMetadataType ¶
func NewOptMetricMetadataType(v MetricMetadataType) OptMetricMetadataType
NewOptMetricMetadataType returns new OptMetricMetadataType with value set to v.
func (*OptMetricMetadataType) Decode ¶
func (o *OptMetricMetadataType) Decode(d *jx.Decoder) error
Decode decodes MetricMetadataType from json.
func (OptMetricMetadataType) Encode ¶
func (o OptMetricMetadataType) Encode(e *jx.Encoder)
Encode encodes MetricMetadataType as json.
func (OptMetricMetadataType) Get ¶
func (o OptMetricMetadataType) Get() (v MetricMetadataType, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptMetricMetadataType) IsSet ¶
func (o OptMetricMetadataType) IsSet() bool
IsSet returns true if OptMetricMetadataType was set.
func (OptMetricMetadataType) MarshalJSON ¶
func (s OptMetricMetadataType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptMetricMetadataType) Or ¶
func (o OptMetricMetadataType) Or(d MetricMetadataType) MetricMetadataType
Or returns value if set, or given parameter if does not.
func (*OptMetricMetadataType) SetTo ¶
func (o *OptMetricMetadataType) SetTo(v MetricMetadataType)
SetTo sets value to v.
func (*OptMetricMetadataType) UnmarshalJSON ¶
func (s *OptMetricMetadataType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptPrometheusTimestamp ¶
type OptPrometheusTimestamp struct { Value PrometheusTimestamp Set bool }
OptPrometheusTimestamp is optional PrometheusTimestamp.
func NewOptPrometheusTimestamp ¶
func NewOptPrometheusTimestamp(v PrometheusTimestamp) OptPrometheusTimestamp
NewOptPrometheusTimestamp returns new OptPrometheusTimestamp with value set to v.
func (OptPrometheusTimestamp) Get ¶
func (o OptPrometheusTimestamp) Get() (v PrometheusTimestamp, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptPrometheusTimestamp) IsSet ¶
func (o OptPrometheusTimestamp) IsSet() bool
IsSet returns true if OptPrometheusTimestamp was set.
func (OptPrometheusTimestamp) Or ¶
func (o OptPrometheusTimestamp) Or(d PrometheusTimestamp) PrometheusTimestamp
Or returns value if set, or given parameter if does not.
func (*OptPrometheusTimestamp) SetTo ¶
func (o *OptPrometheusTimestamp) SetTo(v PrometheusTimestamp)
SetTo sets value to v.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
func (OptString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Option ¶
type Option interface { ServerOption ClientOption }
Option is config option.
func WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter.
If none is specified, the otel.GetMeterProvider() is used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer.
If none is specified, the global provider is used.
type PrometheusTimestamp ¶
type PrometheusTimestamp string
type QueryExemplarsResponse ¶
type QueryExemplarsResponse struct { // Always 'success'. Status string `json:"status"` // Only if there were warnings while executing the request. There will still be data in the data // field. Warnings []string `json:"warnings"` // Only set if there were info-level annnotations while executing the request. Infos []string `json:"infos"` Data Exemplars `json:"data"` }
Merged schema.
func (*QueryExemplarsResponse) Decode ¶
func (s *QueryExemplarsResponse) Decode(d *jx.Decoder) error
Decode decodes QueryExemplarsResponse from json.
func (*QueryExemplarsResponse) Encode ¶
func (s *QueryExemplarsResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*QueryExemplarsResponse) GetData ¶
func (s *QueryExemplarsResponse) GetData() Exemplars
GetData returns the value of Data.
func (*QueryExemplarsResponse) GetInfos ¶ added in v0.15.0
func (s *QueryExemplarsResponse) GetInfos() []string
GetInfos returns the value of Infos.
func (*QueryExemplarsResponse) GetStatus ¶
func (s *QueryExemplarsResponse) GetStatus() string
GetStatus returns the value of Status.
func (*QueryExemplarsResponse) GetWarnings ¶
func (s *QueryExemplarsResponse) GetWarnings() []string
GetWarnings returns the value of Warnings.
func (*QueryExemplarsResponse) MarshalJSON ¶
func (s *QueryExemplarsResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*QueryExemplarsResponse) SetData ¶
func (s *QueryExemplarsResponse) SetData(val Exemplars)
SetData sets the value of Data.
func (*QueryExemplarsResponse) SetInfos ¶ added in v0.15.0
func (s *QueryExemplarsResponse) SetInfos(val []string)
SetInfos sets the value of Infos.
func (*QueryExemplarsResponse) SetStatus ¶
func (s *QueryExemplarsResponse) SetStatus(val string)
SetStatus sets the value of Status.
func (*QueryExemplarsResponse) SetWarnings ¶
func (s *QueryExemplarsResponse) SetWarnings(val []string)
SetWarnings sets the value of Warnings.
func (*QueryExemplarsResponse) UnmarshalJSON ¶
func (s *QueryExemplarsResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*QueryExemplarsResponse) Validate ¶
func (s *QueryExemplarsResponse) Validate() error
type QueryForm ¶
type QueryForm struct { Query string `json:"query"` Time OptPrometheusTimestamp `json:"time"` LookbackDelta OptString `json:"lookback_delta"` Stats OptString `json:"stats"` }
Ref: #/components/schemas/QueryForm
func (*QueryForm) GetLookbackDelta ¶ added in v0.1.0
GetLookbackDelta returns the value of LookbackDelta.
func (*QueryForm) GetTime ¶
func (s *QueryForm) GetTime() OptPrometheusTimestamp
GetTime returns the value of Time.
func (*QueryForm) SetLookbackDelta ¶ added in v0.1.0
SetLookbackDelta sets the value of LookbackDelta.
func (*QueryForm) SetTime ¶
func (s *QueryForm) SetTime(val OptPrometheusTimestamp)
SetTime sets the value of Time.
type QueryRangeForm ¶
type QueryRangeForm struct { // Prometheus expression query string. Query string `json:"query"` Start PrometheusTimestamp `json:"start"` End PrometheusTimestamp `json:"end"` // Query resolution step width in duration format or float number of seconds. Step string `json:"step"` LookbackDelta OptString `json:"lookback_delta"` Stats OptString `json:"stats"` }
Ref: #/components/schemas/QueryRangeForm
func (*QueryRangeForm) GetEnd ¶
func (s *QueryRangeForm) GetEnd() PrometheusTimestamp
GetEnd returns the value of End.
func (*QueryRangeForm) GetLookbackDelta ¶ added in v0.1.0
func (s *QueryRangeForm) GetLookbackDelta() OptString
GetLookbackDelta returns the value of LookbackDelta.
func (*QueryRangeForm) GetQuery ¶
func (s *QueryRangeForm) GetQuery() string
GetQuery returns the value of Query.
func (*QueryRangeForm) GetStart ¶
func (s *QueryRangeForm) GetStart() PrometheusTimestamp
GetStart returns the value of Start.
func (*QueryRangeForm) GetStats ¶ added in v0.1.0
func (s *QueryRangeForm) GetStats() OptString
GetStats returns the value of Stats.
func (*QueryRangeForm) GetStep ¶
func (s *QueryRangeForm) GetStep() string
GetStep returns the value of Step.
func (*QueryRangeForm) SetEnd ¶
func (s *QueryRangeForm) SetEnd(val PrometheusTimestamp)
SetEnd sets the value of End.
func (*QueryRangeForm) SetLookbackDelta ¶ added in v0.1.0
func (s *QueryRangeForm) SetLookbackDelta(val OptString)
SetLookbackDelta sets the value of LookbackDelta.
func (*QueryRangeForm) SetQuery ¶
func (s *QueryRangeForm) SetQuery(val string)
SetQuery sets the value of Query.
func (*QueryRangeForm) SetStart ¶
func (s *QueryRangeForm) SetStart(val PrometheusTimestamp)
SetStart sets the value of Start.
func (*QueryRangeForm) SetStats ¶ added in v0.1.0
func (s *QueryRangeForm) SetStats(val OptString)
SetStats sets the value of Stats.
func (*QueryRangeForm) SetStep ¶
func (s *QueryRangeForm) SetStep(val string)
SetStep sets the value of Step.
type QueryResponse ¶
type QueryResponse struct { // Always 'success'. Status string `json:"status"` // Only if there were warnings while executing the request. There will still be data in the data // field. Warnings []string `json:"warnings"` // Only set if there were info-level annnotations while executing the request. Infos []string `json:"infos"` Data Data `json:"data"` }
Merged schema.
func (*QueryResponse) Decode ¶
func (s *QueryResponse) Decode(d *jx.Decoder) error
Decode decodes QueryResponse from json.
func (*QueryResponse) Encode ¶
func (s *QueryResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*QueryResponse) GetData ¶
func (s *QueryResponse) GetData() Data
GetData returns the value of Data.
func (*QueryResponse) GetInfos ¶ added in v0.15.0
func (s *QueryResponse) GetInfos() []string
GetInfos returns the value of Infos.
func (*QueryResponse) GetStatus ¶
func (s *QueryResponse) GetStatus() string
GetStatus returns the value of Status.
func (*QueryResponse) GetWarnings ¶
func (s *QueryResponse) GetWarnings() []string
GetWarnings returns the value of Warnings.
func (*QueryResponse) MarshalJSON ¶
func (s *QueryResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*QueryResponse) SetData ¶
func (s *QueryResponse) SetData(val Data)
SetData sets the value of Data.
func (*QueryResponse) SetInfos ¶ added in v0.15.0
func (s *QueryResponse) SetInfos(val []string)
SetInfos sets the value of Infos.
func (*QueryResponse) SetStatus ¶
func (s *QueryResponse) SetStatus(val string)
SetStatus sets the value of Status.
func (*QueryResponse) SetWarnings ¶
func (s *QueryResponse) SetWarnings(val []string)
SetWarnings sets the value of Warnings.
func (*QueryResponse) UnmarshalJSON ¶
func (s *QueryResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*QueryResponse) Validate ¶
func (s *QueryResponse) Validate() error
type RecordingRule ¶
type RecordingRule struct { Name string `json:"name"` Query string `json:"query"` Labels LabelSet `json:"labels"` Health RuleHealth `json:"health"` LastError string `json:"lastError"` EvaluationTime time.Time `json:"evaluationTime"` LastEvaluation float64 `json:"lastEvaluation"` Type string `json:"type"` }
Ref: #/components/schemas/RecordingRule
func (*RecordingRule) Decode ¶
func (s *RecordingRule) Decode(d *jx.Decoder) error
Decode decodes RecordingRule from json.
func (*RecordingRule) Encode ¶
func (s *RecordingRule) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*RecordingRule) GetEvaluationTime ¶
func (s *RecordingRule) GetEvaluationTime() time.Time
GetEvaluationTime returns the value of EvaluationTime.
func (*RecordingRule) GetHealth ¶
func (s *RecordingRule) GetHealth() RuleHealth
GetHealth returns the value of Health.
func (*RecordingRule) GetLabels ¶
func (s *RecordingRule) GetLabels() LabelSet
GetLabels returns the value of Labels.
func (*RecordingRule) GetLastError ¶
func (s *RecordingRule) GetLastError() string
GetLastError returns the value of LastError.
func (*RecordingRule) GetLastEvaluation ¶
func (s *RecordingRule) GetLastEvaluation() float64
GetLastEvaluation returns the value of LastEvaluation.
func (*RecordingRule) GetName ¶
func (s *RecordingRule) GetName() string
GetName returns the value of Name.
func (*RecordingRule) GetQuery ¶
func (s *RecordingRule) GetQuery() string
GetQuery returns the value of Query.
func (*RecordingRule) GetType ¶ added in v0.10.0
func (s *RecordingRule) GetType() string
GetType returns the value of Type.
func (*RecordingRule) MarshalJSON ¶
func (s *RecordingRule) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*RecordingRule) SetEvaluationTime ¶
func (s *RecordingRule) SetEvaluationTime(val time.Time)
SetEvaluationTime sets the value of EvaluationTime.
func (*RecordingRule) SetHealth ¶
func (s *RecordingRule) SetHealth(val RuleHealth)
SetHealth sets the value of Health.
func (*RecordingRule) SetLabels ¶
func (s *RecordingRule) SetLabels(val LabelSet)
SetLabels sets the value of Labels.
func (*RecordingRule) SetLastError ¶
func (s *RecordingRule) SetLastError(val string)
SetLastError sets the value of LastError.
func (*RecordingRule) SetLastEvaluation ¶
func (s *RecordingRule) SetLastEvaluation(val float64)
SetLastEvaluation sets the value of LastEvaluation.
func (*RecordingRule) SetName ¶
func (s *RecordingRule) SetName(val string)
SetName sets the value of Name.
func (*RecordingRule) SetQuery ¶
func (s *RecordingRule) SetQuery(val string)
SetQuery sets the value of Query.
func (*RecordingRule) SetType ¶ added in v0.10.0
func (s *RecordingRule) SetType(val string)
SetType sets the value of Type.
func (*RecordingRule) UnmarshalJSON ¶
func (s *RecordingRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*RecordingRule) Validate ¶
func (s *RecordingRule) Validate() error
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type Rule ¶
type Rule struct { Type RuleType // switch on this field AlertingRule AlertingRule RecordingRule RecordingRule }
Ref: #/components/schemas/Rule Rule represents sum type.
func NewAlertingRuleRule ¶
func NewAlertingRuleRule(v AlertingRule) Rule
NewAlertingRuleRule returns new Rule from AlertingRule.
func NewRecordingRuleRule ¶
func NewRecordingRuleRule(v RecordingRule) Rule
NewRecordingRuleRule returns new Rule from RecordingRule.
func (Rule) GetAlertingRule ¶
func (s Rule) GetAlertingRule() (v AlertingRule, ok bool)
GetAlertingRule returns AlertingRule and true boolean if Rule is AlertingRule.
func (Rule) GetRecordingRule ¶
func (s Rule) GetRecordingRule() (v RecordingRule, ok bool)
GetRecordingRule returns RecordingRule and true boolean if Rule is RecordingRule.
func (Rule) IsAlertingRule ¶
IsAlertingRule reports whether Rule is AlertingRule.
func (Rule) IsRecordingRule ¶
IsRecordingRule reports whether Rule is RecordingRule.
func (Rule) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Rule) SetAlertingRule ¶
func (s *Rule) SetAlertingRule(v AlertingRule)
SetAlertingRule sets Rule to AlertingRule.
func (*Rule) SetRecordingRule ¶
func (s *Rule) SetRecordingRule(v RecordingRule)
SetRecordingRule sets Rule to RecordingRule.
func (*Rule) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type RuleGroup ¶
type RuleGroup struct { Name OptString `json:"name"` File OptString `json:"file"` // In order to preserve rule ordering, while exposing type (alerting or recording) // specific properties, both alerting and recording rules are exposed in the // same array. Rules []Rule `json:"rules"` Internal OptFloat64 `json:"internal"` Limit OptInt `json:"limit"` EvaluationTime OptFloat64 `json:"evaluationTime"` LastEvaluation OptString `json:"lastEvaluation"` }
Ref: #/components/schemas/RuleGroup
func (*RuleGroup) GetEvaluationTime ¶
func (s *RuleGroup) GetEvaluationTime() OptFloat64
GetEvaluationTime returns the value of EvaluationTime.
func (*RuleGroup) GetInternal ¶
func (s *RuleGroup) GetInternal() OptFloat64
GetInternal returns the value of Internal.
func (*RuleGroup) GetLastEvaluation ¶
GetLastEvaluation returns the value of LastEvaluation.
func (*RuleGroup) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*RuleGroup) SetEvaluationTime ¶
func (s *RuleGroup) SetEvaluationTime(val OptFloat64)
SetEvaluationTime sets the value of EvaluationTime.
func (*RuleGroup) SetInternal ¶
func (s *RuleGroup) SetInternal(val OptFloat64)
SetInternal sets the value of Internal.
func (*RuleGroup) SetLastEvaluation ¶
SetLastEvaluation sets the value of LastEvaluation.
func (*RuleGroup) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type RuleHealth ¶
type RuleHealth string
Ref: #/components/schemas/RuleHealth
const ( RuleHealthUnknown RuleHealth = "unknown" RuleHealthOk RuleHealth = "ok" RuleHealthErr RuleHealth = "err" )
func (RuleHealth) AllValues ¶ added in v0.1.0
func (RuleHealth) AllValues() []RuleHealth
AllValues returns all RuleHealth values.
func (*RuleHealth) Decode ¶
func (s *RuleHealth) Decode(d *jx.Decoder) error
Decode decodes RuleHealth from json.
func (RuleHealth) Encode ¶
func (s RuleHealth) Encode(e *jx.Encoder)
Encode encodes RuleHealth as json.
func (RuleHealth) MarshalJSON ¶
func (s RuleHealth) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (RuleHealth) MarshalText ¶
func (s RuleHealth) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*RuleHealth) UnmarshalJSON ¶
func (s *RuleHealth) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*RuleHealth) UnmarshalText ¶
func (s *RuleHealth) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (RuleHealth) Validate ¶
func (s RuleHealth) Validate() error
type Rules ¶
type Rules struct {
Groups []RuleGroup `json:"groups"`
}
Ref: #/components/schemas/Rules
func (*Rules) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Rules) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type RulesResponse ¶
type RulesResponse struct { // Always 'success'. Status string `json:"status"` // Only if there were warnings while executing the request. There will still be data in the data // field. Warnings []string `json:"warnings"` // Only set if there were info-level annnotations while executing the request. Infos []string `json:"infos"` Data Rules `json:"data"` }
Merged schema.
func (*RulesResponse) Decode ¶
func (s *RulesResponse) Decode(d *jx.Decoder) error
Decode decodes RulesResponse from json.
func (*RulesResponse) Encode ¶
func (s *RulesResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*RulesResponse) GetData ¶
func (s *RulesResponse) GetData() Rules
GetData returns the value of Data.
func (*RulesResponse) GetInfos ¶ added in v0.15.0
func (s *RulesResponse) GetInfos() []string
GetInfos returns the value of Infos.
func (*RulesResponse) GetStatus ¶
func (s *RulesResponse) GetStatus() string
GetStatus returns the value of Status.
func (*RulesResponse) GetWarnings ¶
func (s *RulesResponse) GetWarnings() []string
GetWarnings returns the value of Warnings.
func (*RulesResponse) MarshalJSON ¶
func (s *RulesResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*RulesResponse) SetData ¶
func (s *RulesResponse) SetData(val Rules)
SetData sets the value of Data.
func (*RulesResponse) SetInfos ¶ added in v0.15.0
func (s *RulesResponse) SetInfos(val []string)
SetInfos sets the value of Infos.
func (*RulesResponse) SetStatus ¶
func (s *RulesResponse) SetStatus(val string)
SetStatus sets the value of Status.
func (*RulesResponse) SetWarnings ¶
func (s *RulesResponse) SetWarnings(val []string)
SetWarnings sets the value of Warnings.
func (*RulesResponse) UnmarshalJSON ¶
func (s *RulesResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*RulesResponse) Validate ¶
func (s *RulesResponse) Validate() error
type Sample ¶ added in v0.1.0
type Sample struct { T float64 HistogramOrValue HistogramOrValue }
Ref: #/components/schemas/Sample
func (*Sample) GetHistogramOrValue ¶ added in v0.1.0
func (s *Sample) GetHistogramOrValue() HistogramOrValue
GetHistogramOrValue returns the value of HistogramOrValue.
func (*Sample) MarshalJSON ¶ added in v0.1.0
MarshalJSON implements stdjson.Marshaler.
func (*Sample) SetHistogramOrValue ¶ added in v0.1.0
func (s *Sample) SetHistogramOrValue(val HistogramOrValue)
SetHistogramOrValue sets the value of HistogramOrValue.
func (*Sample) UnmarshalJSON ¶ added in v0.1.0
UnmarshalJSON implements stdjson.Unmarshaler.
type Scalar ¶
type Scalar struct {
Result FPoint `json:"result"`
}
Ref: #/components/schemas/Scalar
func (*Scalar) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Scalar) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Series ¶
type Series []LabelSet
func (Series) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Series) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type SeriesForm ¶ added in v0.1.0
type SeriesForm struct { Start OptPrometheusTimestamp `json:"start"` End OptPrometheusTimestamp `json:"end"` Match []string `json:"match[]"` }
Ref: #/components/schemas/SeriesForm
func (*SeriesForm) GetEnd ¶ added in v0.1.0
func (s *SeriesForm) GetEnd() OptPrometheusTimestamp
GetEnd returns the value of End.
func (*SeriesForm) GetMatch ¶ added in v0.1.0
func (s *SeriesForm) GetMatch() []string
GetMatch returns the value of Match.
func (*SeriesForm) GetStart ¶ added in v0.1.0
func (s *SeriesForm) GetStart() OptPrometheusTimestamp
GetStart returns the value of Start.
func (*SeriesForm) SetEnd ¶ added in v0.1.0
func (s *SeriesForm) SetEnd(val OptPrometheusTimestamp)
SetEnd sets the value of End.
func (*SeriesForm) SetMatch ¶ added in v0.1.0
func (s *SeriesForm) SetMatch(val []string)
SetMatch sets the value of Match.
func (*SeriesForm) SetStart ¶ added in v0.1.0
func (s *SeriesForm) SetStart(val OptPrometheusTimestamp)
SetStart sets the value of Start.
func (*SeriesForm) Validate ¶ added in v0.1.0
func (s *SeriesForm) Validate() error
type SeriesResponse ¶
type SeriesResponse struct { // Always 'success'. Status string `json:"status"` // Only if there were warnings while executing the request. There will still be data in the data // field. Warnings []string `json:"warnings"` // Only set if there were info-level annnotations while executing the request. Infos []string `json:"infos"` Data Series `json:"data"` }
Merged schema.
func (*SeriesResponse) Decode ¶
func (s *SeriesResponse) Decode(d *jx.Decoder) error
Decode decodes SeriesResponse from json.
func (*SeriesResponse) Encode ¶
func (s *SeriesResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*SeriesResponse) GetData ¶
func (s *SeriesResponse) GetData() Series
GetData returns the value of Data.
func (*SeriesResponse) GetInfos ¶ added in v0.15.0
func (s *SeriesResponse) GetInfos() []string
GetInfos returns the value of Infos.
func (*SeriesResponse) GetStatus ¶
func (s *SeriesResponse) GetStatus() string
GetStatus returns the value of Status.
func (*SeriesResponse) GetWarnings ¶
func (s *SeriesResponse) GetWarnings() []string
GetWarnings returns the value of Warnings.
func (*SeriesResponse) MarshalJSON ¶
func (s *SeriesResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SeriesResponse) SetData ¶
func (s *SeriesResponse) SetData(val Series)
SetData sets the value of Data.
func (*SeriesResponse) SetInfos ¶ added in v0.15.0
func (s *SeriesResponse) SetInfos(val []string)
SetInfos sets the value of Infos.
func (*SeriesResponse) SetStatus ¶
func (s *SeriesResponse) SetStatus(val string)
SetStatus sets the value of Status.
func (*SeriesResponse) SetWarnings ¶
func (s *SeriesResponse) SetWarnings(val []string)
SetWarnings sets the value of Warnings.
func (*SeriesResponse) UnmarshalJSON ¶
func (s *SeriesResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*SeriesResponse) Validate ¶
func (s *SeriesResponse) Validate() error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.
func NewServer ¶
func NewServer(h Handler, opts ...ServerOption) (*Server, error)
NewServer creates new Server.
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
ServerOption is server config option.
func WithErrorHandler ¶
func WithErrorHandler(h ErrorHandler) ServerOption
WithErrorHandler specifies error handler to use.
func WithMaxMultipartMemory ¶
func WithMaxMultipartMemory(max int64) ServerOption
WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.
func WithMethodNotAllowed ¶
func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
WithMethodNotAllowed specifies Method Not Allowed handler to use.
func WithMiddleware ¶
func WithMiddleware(m ...Middleware) ServerOption
WithMiddleware specifies middlewares to use.
func WithNotFound ¶
func WithNotFound(notFound http.HandlerFunc) ServerOption
WithNotFound specifies Not Found handler to use.
func WithPathPrefix ¶
func WithPathPrefix(prefix string) ServerOption
WithPathPrefix specifies server path prefix.
type String ¶
type String struct {
Result StringValue `json:"result"`
}
Ref: #/components/schemas/String
func (*String) GetResult ¶
func (s *String) GetResult() StringValue
GetResult returns the value of Result.
func (*String) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*String) SetResult ¶
func (s *String) SetResult(val StringValue)
SetResult sets the value of Result.
func (*String) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type StringValue ¶ added in v0.1.0
Ref: #/components/schemas/StringValue
func (*StringValue) Decode ¶ added in v0.1.0
func (s *StringValue) Decode(d *jx.Decoder) error
Decode decodes StringValue from json.
func (*StringValue) Encode ¶ added in v0.1.0
func (s *StringValue) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*StringValue) GetT ¶ added in v0.1.0
func (s *StringValue) GetT() float64
GetT returns the value of T.
func (*StringValue) GetV ¶ added in v0.1.0
func (s *StringValue) GetV() string
GetV returns the value of V.
func (*StringValue) MarshalJSON ¶ added in v0.1.0
func (s *StringValue) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*StringValue) SetT ¶ added in v0.1.0
func (s *StringValue) SetT(val float64)
SetT sets the value of T.
func (*StringValue) SetV ¶ added in v0.1.0
func (s *StringValue) SetV(val string)
SetV sets the value of V.
func (*StringValue) UnmarshalJSON ¶ added in v0.1.0
func (s *StringValue) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*StringValue) Validate ¶ added in v0.1.0
func (s *StringValue) Validate() error
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) GetLabelValues ¶
func (UnimplementedHandler) GetLabelValues(ctx context.Context, params GetLabelValuesParams) (r *LabelValuesResponse, _ error)
GetLabelValues implements getLabelValues operation.
GET /api/v1/label/{label}/values
func (UnimplementedHandler) GetLabels ¶
func (UnimplementedHandler) GetLabels(ctx context.Context, params GetLabelsParams) (r *LabelsResponse, _ error)
GetLabels implements getLabels operation.
GET /api/v1/labels
func (UnimplementedHandler) GetMetadata ¶
func (UnimplementedHandler) GetMetadata(ctx context.Context, params GetMetadataParams) (r *MetadataResponse, _ error)
GetMetadata implements getMetadata operation.
GET /api/v1/metadata
func (UnimplementedHandler) GetQuery ¶
func (UnimplementedHandler) GetQuery(ctx context.Context, params GetQueryParams) (r *QueryResponse, _ error)
GetQuery implements getQuery operation.
Query Prometheus.
GET /api/v1/query
func (UnimplementedHandler) GetQueryExemplars ¶
func (UnimplementedHandler) GetQueryExemplars(ctx context.Context, params GetQueryExemplarsParams) (r *QueryExemplarsResponse, _ error)
GetQueryExemplars implements getQueryExemplars operation.
Query Prometheus.
GET /api/v1/query_exemplars
func (UnimplementedHandler) GetQueryRange ¶
func (UnimplementedHandler) GetQueryRange(ctx context.Context, params GetQueryRangeParams) (r *QueryResponse, _ error)
GetQueryRange implements getQueryRange operation.
Query Prometheus.
GET /api/v1/query_range
func (UnimplementedHandler) GetRules ¶
func (UnimplementedHandler) GetRules(ctx context.Context, params GetRulesParams) (r *RulesResponse, _ error)
GetRules implements getRules operation.
GET /api/v1/rules
func (UnimplementedHandler) GetSeries ¶
func (UnimplementedHandler) GetSeries(ctx context.Context, params GetSeriesParams) (r *SeriesResponse, _ error)
GetSeries implements getSeries operation.
Query Prometheus.
GET /api/v1/series
func (UnimplementedHandler) NewError ¶
func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *FailStatusCode)
NewError creates *FailStatusCode from error returned by handler.
Used for common default response.
func (UnimplementedHandler) PostLabels ¶
func (UnimplementedHandler) PostLabels(ctx context.Context, req *LabelsForm) (r *LabelsResponse, _ error)
PostLabels implements postLabels operation.
POST /api/v1/labels
func (UnimplementedHandler) PostQuery ¶
func (UnimplementedHandler) PostQuery(ctx context.Context, req *QueryForm) (r *QueryResponse, _ error)
PostQuery implements postQuery operation.
Query Prometheus.
POST /api/v1/query
func (UnimplementedHandler) PostQueryExemplars ¶
func (UnimplementedHandler) PostQueryExemplars(ctx context.Context, req *ExemplarsForm) (r *QueryExemplarsResponse, _ error)
PostQueryExemplars implements postQueryExemplars operation.
Query Prometheus.
POST /api/v1/query_exemplars
func (UnimplementedHandler) PostQueryRange ¶
func (UnimplementedHandler) PostQueryRange(ctx context.Context, req *QueryRangeForm) (r *QueryResponse, _ error)
PostQueryRange implements postQueryRange operation.
Query Prometheus.
POST /api/v1/query_range
func (UnimplementedHandler) PostSeries ¶
func (UnimplementedHandler) PostSeries(ctx context.Context, req *SeriesForm) (r *SeriesResponse, _ error)
PostSeries implements postSeries operation.
Query Prometheus.
POST /api/v1/series
type Vector ¶
type Vector struct {
Result []VectorResultItem `json:"result"`
}
Ref: #/components/schemas/Vector
func (*Vector) GetResult ¶
func (s *Vector) GetResult() []VectorResultItem
GetResult returns the value of Result.
func (*Vector) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Vector) SetResult ¶
func (s *Vector) SetResult(val []VectorResultItem)
SetResult sets the value of Result.
func (*Vector) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type VectorResultItem ¶
type VectorResultItem struct { Metric VectorResultItemMetric `json:"metric"` Value Sample `json:"value"` }
func (*VectorResultItem) Decode ¶
func (s *VectorResultItem) Decode(d *jx.Decoder) error
Decode decodes VectorResultItem from json.
func (*VectorResultItem) Encode ¶
func (s *VectorResultItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*VectorResultItem) GetMetric ¶
func (s *VectorResultItem) GetMetric() VectorResultItemMetric
GetMetric returns the value of Metric.
func (*VectorResultItem) GetValue ¶
func (s *VectorResultItem) GetValue() Sample
GetValue returns the value of Value.
func (*VectorResultItem) MarshalJSON ¶
func (s *VectorResultItem) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*VectorResultItem) SetMetric ¶
func (s *VectorResultItem) SetMetric(val VectorResultItemMetric)
SetMetric sets the value of Metric.
func (*VectorResultItem) SetValue ¶
func (s *VectorResultItem) SetValue(val Sample)
SetValue sets the value of Value.
func (*VectorResultItem) UnmarshalJSON ¶
func (s *VectorResultItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*VectorResultItem) Validate ¶
func (s *VectorResultItem) Validate() error
type VectorResultItemMetric ¶
func (*VectorResultItemMetric) Decode ¶
func (s *VectorResultItemMetric) Decode(d *jx.Decoder) error
Decode decodes VectorResultItemMetric from json.
func (VectorResultItemMetric) Encode ¶
func (s VectorResultItemMetric) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (VectorResultItemMetric) MarshalJSON ¶
func (s VectorResultItemMetric) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*VectorResultItemMetric) UnmarshalJSON ¶
func (s *VectorResultItemMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
Source Files ¶
- errors.go
- oas_cfg_gen.go
- oas_client_gen.go
- oas_defaults_gen.go
- oas_handlers_gen.go
- oas_json_gen.go
- oas_labeler_gen.go
- oas_middleware_gen.go
- oas_operations_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go
- promapi.go