Documentation
¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type Client
- func (c *Client) DetectedFieldValues(ctx context.Context, params DetectedFieldValuesParams) (*DetectedFieldValues, error)
- func (c *Client) DetectedFields(ctx context.Context, params DetectedFieldsParams) (*DetectedFields, error)
- func (c *Client) DetectedLabels(ctx context.Context, params DetectedLabelsParams) (*DetectedLabels, error)
- func (c *Client) DrilldownLimits(ctx context.Context) (*DrilldownLimits, error)
- func (c *Client) IndexStats(ctx context.Context, params IndexStatsParams) (*IndexStats, error)
- func (c *Client) LabelValues(ctx context.Context, params LabelValuesParams) (*Values, error)
- func (c *Client) Labels(ctx context.Context, params LabelsParams) (*Labels, error)
- func (c *Client) Patterns(ctx context.Context, params PatternsParams) (*Patterns, error)
- func (c *Client) Push(ctx context.Context, request PushReq) error
- func (c *Client) Query(ctx context.Context, params QueryParams) (*QueryResponse, error)
- func (c *Client) QueryRange(ctx context.Context, params QueryRangeParams) (*QueryResponse, error)
- func (c *Client) QueryVolume(ctx context.Context, params QueryVolumeParams) (*QueryResponse, error)
- func (c *Client) QueryVolumeRange(ctx context.Context, params QueryVolumeRangeParams) (*QueryResponse, error)
- func (c *Client) Series(ctx context.Context, params SeriesParams) (*Maps, error)
- type ClientOption
- type DetectedField
- func (s *DetectedField) Decode(d *jx.Decoder) error
- func (s *DetectedField) Encode(e *jx.Encoder)
- func (s *DetectedField) GetCardinality() OptInt
- func (s *DetectedField) GetJsonPath() OptNilStringArray
- func (s *DetectedField) GetLabel() OptString
- func (s *DetectedField) GetParsers() OptNilStringArray
- func (s *DetectedField) GetType() OptString
- func (s *DetectedField) MarshalJSON() ([]byte, error)
- func (s *DetectedField) SetCardinality(val OptInt)
- func (s *DetectedField) SetJsonPath(val OptNilStringArray)
- func (s *DetectedField) SetLabel(val OptString)
- func (s *DetectedField) SetParsers(val OptNilStringArray)
- func (s *DetectedField) SetType(val OptString)
- func (s *DetectedField) UnmarshalJSON(data []byte) error
- func (s *DetectedField) Validate() error
- type DetectedFieldValues
- func (s *DetectedFieldValues) Decode(d *jx.Decoder) error
- func (s *DetectedFieldValues) Encode(e *jx.Encoder)
- func (s *DetectedFieldValues) GetLimit() OptUint64
- func (s *DetectedFieldValues) GetValues() OptNilStringArray
- func (s *DetectedFieldValues) MarshalJSON() ([]byte, error)
- func (s *DetectedFieldValues) SetLimit(val OptUint64)
- func (s *DetectedFieldValues) SetValues(val OptNilStringArray)
- func (s *DetectedFieldValues) UnmarshalJSON(data []byte) error
- func (s *DetectedFieldValues) Validate() error
- type DetectedFieldValuesParams
- type DetectedFields
- func (s *DetectedFields) Decode(d *jx.Decoder) error
- func (s *DetectedFields) Encode(e *jx.Encoder)
- func (s *DetectedFields) GetFields() []DetectedField
- func (s *DetectedFields) GetLimit() OptUint64
- func (s *DetectedFields) MarshalJSON() ([]byte, error)
- func (s *DetectedFields) SetFields(val []DetectedField)
- func (s *DetectedFields) SetLimit(val OptUint64)
- func (s *DetectedFields) UnmarshalJSON(data []byte) error
- func (s *DetectedFields) Validate() error
- type DetectedFieldsParams
- type DetectedLabel
- func (s *DetectedLabel) Decode(d *jx.Decoder) error
- func (s *DetectedLabel) Encode(e *jx.Encoder)
- func (s *DetectedLabel) GetCardinality() int
- func (s *DetectedLabel) GetLabel() string
- func (s *DetectedLabel) MarshalJSON() ([]byte, error)
- func (s *DetectedLabel) SetCardinality(val int)
- func (s *DetectedLabel) SetLabel(val string)
- func (s *DetectedLabel) UnmarshalJSON(data []byte) error
- type DetectedLabels
- func (s *DetectedLabels) Decode(d *jx.Decoder) error
- func (s *DetectedLabels) Encode(e *jx.Encoder)
- func (s *DetectedLabels) GetDetectedLabels() []DetectedLabel
- func (s *DetectedLabels) GetLimit() OptUint64
- func (s *DetectedLabels) MarshalJSON() ([]byte, error)
- func (s *DetectedLabels) SetDetectedLabels(val []DetectedLabel)
- func (s *DetectedLabels) SetLimit(val OptUint64)
- func (s *DetectedLabels) UnmarshalJSON(data []byte) error
- type DetectedLabelsParams
- type Direction
- type DrilldownLimits
- func (s *DrilldownLimits) Decode(d *jx.Decoder) error
- func (s *DrilldownLimits) Encode(e *jx.Encoder)
- func (s *DrilldownLimits) GetLimits() DrilldownLimitsLimits
- func (s *DrilldownLimits) GetPatternIngesterEnabled() OptBool
- func (s *DrilldownLimits) GetVersion() string
- func (s *DrilldownLimits) MarshalJSON() ([]byte, error)
- func (s *DrilldownLimits) SetLimits(val DrilldownLimitsLimits)
- func (s *DrilldownLimits) SetPatternIngesterEnabled(val OptBool)
- func (s *DrilldownLimits) SetVersion(val string)
- func (s *DrilldownLimits) UnmarshalJSON(data []byte) error
- type DrilldownLimitsLimits
- func (s *DrilldownLimitsLimits) Decode(d *jx.Decoder) error
- func (s *DrilldownLimitsLimits) Encode(e *jx.Encoder)
- func (s *DrilldownLimitsLimits) GetVolumeEnabled() OptBool
- func (s *DrilldownLimitsLimits) MarshalJSON() ([]byte, error)
- func (s *DrilldownLimitsLimits) SetVolumeEnabled(val OptBool)
- func (s *DrilldownLimitsLimits) UnmarshalJSON(data []byte) error
- type Error
- type ErrorHandler
- type ErrorStatusCode
- 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() string
- func (s *FPoint) MarshalJSON() ([]byte, error)
- func (s *FPoint) SetT(val float64)
- func (s *FPoint) SetV(val string)
- func (s *FPoint) UnmarshalJSON(data []byte) error
- func (s *FPoint) Validate() error
- type Handler
- type IndexStats
- func (s *IndexStats) Decode(d *jx.Decoder) error
- func (s *IndexStats) Encode(e *jx.Encoder)
- func (s *IndexStats) GetBytes() int
- func (s *IndexStats) GetChunks() int
- func (s *IndexStats) GetEntries() int
- func (s *IndexStats) GetStreams() int
- func (s *IndexStats) MarshalJSON() ([]byte, error)
- func (s *IndexStats) SetBytes(val int)
- func (s *IndexStats) SetChunks(val int)
- func (s *IndexStats) SetEntries(val int)
- func (s *IndexStats) SetStreams(val int)
- func (s *IndexStats) UnmarshalJSON(data []byte) error
- type IndexStatsParams
- type Invoker
- type LabelSet
- type LabelValuesParams
- type Labeler
- type Labels
- func (s *Labels) Decode(d *jx.Decoder) error
- func (s *Labels) Encode(e *jx.Encoder)
- func (s *Labels) GetData() []string
- func (s *Labels) GetStatus() string
- func (s *Labels) MarshalJSON() ([]byte, error)
- func (s *Labels) SetData(val []string)
- func (s *Labels) SetStatus(val string)
- func (s *Labels) UnmarshalJSON(data []byte) error
- func (s *Labels) Validate() error
- type LabelsParams
- type LogEntry
- func (s *LogEntry) Decode(d *jx.Decoder) error
- func (s *LogEntry) Encode(e *jx.Encoder)
- func (s *LogEntry) GetT() uint64
- func (s *LogEntry) GetV() string
- func (s *LogEntry) MarshalJSON() ([]byte, error)
- func (s *LogEntry) SetT(val uint64)
- func (s *LogEntry) SetV(val string)
- func (s *LogEntry) UnmarshalJSON(data []byte) error
- type LokiTime
- type Maps
- func (s *Maps) Decode(d *jx.Decoder) error
- func (s *Maps) Encode(e *jx.Encoder)
- func (s *Maps) GetData() []MapsDataItem
- func (s *Maps) GetStatus() string
- func (s *Maps) MarshalJSON() ([]byte, error)
- func (s *Maps) SetData(val []MapsDataItem)
- func (s *Maps) SetStatus(val string)
- func (s *Maps) UnmarshalJSON(data []byte) error
- func (s *Maps) Validate() error
- type MapsDataItem
- type Matrix
- type MatrixResult
- func (s *MatrixResult) Decode(d *jx.Decoder) error
- func (s *MatrixResult) Encode(e *jx.Encoder)
- func (s *MatrixResult) GetResult() Matrix
- func (s *MatrixResult) GetStats() *Stats
- func (s *MatrixResult) MarshalJSON() ([]byte, error)
- func (s *MatrixResult) SetResult(val Matrix)
- func (s *MatrixResult) SetStats(val *Stats)
- func (s *MatrixResult) UnmarshalJSON(data []byte) error
- func (s *MatrixResult) Validate() error
- type Middleware
- type OperationName
- type OptBool
- func (o *OptBool) Decode(d *jx.Decoder) error
- func (o OptBool) Encode(e *jx.Encoder)
- func (o OptBool) Get() (v bool, ok bool)
- func (o OptBool) IsSet() bool
- func (s OptBool) MarshalJSON() ([]byte, error)
- func (o OptBool) Or(d bool) bool
- func (o *OptBool) Reset()
- func (o *OptBool) SetTo(v bool)
- func (s *OptBool) UnmarshalJSON(data []byte) error
- type OptDirection
- 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 OptLokiTime
- type OptNilStringArray
- func (o *OptNilStringArray) Decode(d *jx.Decoder) error
- func (o OptNilStringArray) Encode(e *jx.Encoder)
- func (o OptNilStringArray) Get() (v []string, ok bool)
- func (o OptNilStringArray) IsEmpty() bool
- func (o OptNilStringArray) IsNull() bool
- func (o OptNilStringArray) IsSet() bool
- func (s OptNilStringArray) MarshalJSON() ([]byte, error)
- func (o OptNilStringArray) Or(d []string) []string
- func (o *OptNilStringArray) Reset()
- func (o *OptNilStringArray) SetTo(v []string)
- func (o *OptNilStringArray) SetToNull()
- func (s *OptNilStringArray) UnmarshalJSON(data []byte) error
- type OptPrometheusDuration
- 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 OptUint64
- func (o *OptUint64) Decode(d *jx.Decoder) error
- func (o OptUint64) Encode(e *jx.Encoder)
- func (o OptUint64) Get() (v uint64, ok bool)
- func (o OptUint64) IsSet() bool
- func (s OptUint64) MarshalJSON() ([]byte, error)
- func (o OptUint64) Or(d uint64) uint64
- func (o *OptUint64) Reset()
- func (o *OptUint64) SetTo(v uint64)
- func (s *OptUint64) UnmarshalJSON(data []byte) error
- type Option
- type PatternSample
- func (s *PatternSample) Decode(d *jx.Decoder) error
- func (s *PatternSample) Encode(e *jx.Encoder)
- func (s *PatternSample) GetT() float64
- func (s *PatternSample) GetV() int
- func (s *PatternSample) MarshalJSON() ([]byte, error)
- func (s *PatternSample) SetT(val float64)
- func (s *PatternSample) SetV(val int)
- func (s *PatternSample) UnmarshalJSON(data []byte) error
- func (s *PatternSample) Validate() error
- type PatternSeries
- func (s *PatternSeries) Decode(d *jx.Decoder) error
- func (s *PatternSeries) Encode(e *jx.Encoder)
- func (s *PatternSeries) GetLevel() string
- func (s *PatternSeries) GetPattern() string
- func (s *PatternSeries) GetSamples() []PatternSample
- func (s *PatternSeries) MarshalJSON() ([]byte, error)
- func (s *PatternSeries) SetLevel(val string)
- func (s *PatternSeries) SetPattern(val string)
- func (s *PatternSeries) SetSamples(val []PatternSample)
- func (s *PatternSeries) UnmarshalJSON(data []byte) error
- func (s *PatternSeries) Validate() error
- type Patterns
- func (s *Patterns) Decode(d *jx.Decoder) error
- func (s *Patterns) Encode(e *jx.Encoder)
- func (s *Patterns) GetSeries() []PatternSeries
- func (s *Patterns) MarshalJSON() ([]byte, error)
- func (s *Patterns) SetSeries(val []PatternSeries)
- func (s *Patterns) UnmarshalJSON(data []byte) error
- func (s *Patterns) Validate() error
- type PatternsParams
- type PrometheusDuration
- type Push
- type PushNoContent
- type PushReq
- type PushReqApplicationXProtobuf
- type QueryParams
- type QueryRangeParams
- type QueryResponse
- func (s *QueryResponse) Decode(d *jx.Decoder) error
- func (s *QueryResponse) Encode(e *jx.Encoder)
- func (s *QueryResponse) GetData() QueryResponseData
- func (s *QueryResponse) GetStatus() string
- func (s *QueryResponse) MarshalJSON() ([]byte, error)
- func (s *QueryResponse) SetData(val QueryResponseData)
- func (s *QueryResponse) SetStatus(val string)
- func (s *QueryResponse) UnmarshalJSON(data []byte) error
- func (s *QueryResponse) Validate() error
- type QueryResponseData
- func (s *QueryResponseData) Decode(d *jx.Decoder) error
- func (s QueryResponseData) Encode(e *jx.Encoder)
- func (s QueryResponseData) GetMatrixResult() (v MatrixResult, ok bool)
- func (s QueryResponseData) GetScalarResult() (v ScalarResult, ok bool)
- func (s QueryResponseData) GetStreamsResult() (v StreamsResult, ok bool)
- func (s QueryResponseData) GetVectorResult() (v VectorResult, ok bool)
- func (s QueryResponseData) IsMatrixResult() bool
- func (s QueryResponseData) IsScalarResult() bool
- func (s QueryResponseData) IsStreamsResult() bool
- func (s QueryResponseData) IsVectorResult() bool
- func (s QueryResponseData) MarshalJSON() ([]byte, error)
- func (s *QueryResponseData) SetMatrixResult(v MatrixResult)
- func (s *QueryResponseData) SetScalarResult(v ScalarResult)
- func (s *QueryResponseData) SetStreamsResult(v StreamsResult)
- func (s *QueryResponseData) SetVectorResult(v VectorResult)
- func (s *QueryResponseData) UnmarshalJSON(data []byte) error
- func (s QueryResponseData) Validate() error
- type QueryResponseDataType
- type QueryVolumeParams
- type QueryVolumeRangeParams
- type Route
- type Sample
- func (s *Sample) Decode(d *jx.Decoder) error
- func (s *Sample) Encode(e *jx.Encoder)
- func (s *Sample) GetMetric() OptLabelSet
- func (s *Sample) GetValue() FPoint
- func (s *Sample) MarshalJSON() ([]byte, error)
- func (s *Sample) SetMetric(val OptLabelSet)
- func (s *Sample) SetValue(val FPoint)
- func (s *Sample) UnmarshalJSON(data []byte) error
- func (s *Sample) Validate() error
- type ScalarResult
- func (s *ScalarResult) Decode(d *jx.Decoder) error
- func (s *ScalarResult) Encode(e *jx.Encoder)
- func (s *ScalarResult) GetResult() FPoint
- func (s *ScalarResult) GetStats() *Stats
- func (s *ScalarResult) MarshalJSON() ([]byte, error)
- func (s *ScalarResult) SetResult(val FPoint)
- func (s *ScalarResult) SetStats(val *Stats)
- func (s *ScalarResult) UnmarshalJSON(data []byte) error
- func (s *ScalarResult) Validate() error
- type Series
- func (s *Series) Decode(d *jx.Decoder) error
- func (s *Series) Encode(e *jx.Encoder)
- func (s *Series) GetMetric() OptLabelSet
- func (s *Series) GetValues() []FPoint
- func (s *Series) MarshalJSON() ([]byte, error)
- func (s *Series) SetMetric(val OptLabelSet)
- func (s *Series) SetValues(val []FPoint)
- func (s *Series) UnmarshalJSON(data []byte) error
- func (s *Series) Validate() error
- type SeriesParams
- 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 Stats
- type Stream
- func (s *Stream) Decode(d *jx.Decoder) error
- func (s *Stream) Encode(e *jx.Encoder)
- func (s *Stream) GetStream() OptLabelSet
- func (s *Stream) GetValues() []LogEntry
- func (s *Stream) MarshalJSON() ([]byte, error)
- func (s *Stream) SetStream(val OptLabelSet)
- func (s *Stream) SetValues(val []LogEntry)
- func (s *Stream) UnmarshalJSON(data []byte) error
- func (s *Stream) Validate() error
- type Streams
- type StreamsResult
- func (s *StreamsResult) Decode(d *jx.Decoder) error
- func (s *StreamsResult) Encode(e *jx.Encoder)
- func (s *StreamsResult) GetResult() Streams
- func (s *StreamsResult) GetStats() *Stats
- func (s *StreamsResult) MarshalJSON() ([]byte, error)
- func (s *StreamsResult) SetResult(val Streams)
- func (s *StreamsResult) SetStats(val *Stats)
- func (s *StreamsResult) UnmarshalJSON(data []byte) error
- func (s *StreamsResult) Validate() error
- type UnimplementedHandler
- func (UnimplementedHandler) DetectedFieldValues(ctx context.Context, params DetectedFieldValuesParams) (r *DetectedFieldValues, _ error)
- func (UnimplementedHandler) DetectedFields(ctx context.Context, params DetectedFieldsParams) (r *DetectedFields, _ error)
- func (UnimplementedHandler) DetectedLabels(ctx context.Context, params DetectedLabelsParams) (r *DetectedLabels, _ error)
- func (UnimplementedHandler) DrilldownLimits(ctx context.Context) (r *DrilldownLimits, _ error)
- func (UnimplementedHandler) IndexStats(ctx context.Context, params IndexStatsParams) (r *IndexStats, _ error)
- func (UnimplementedHandler) LabelValues(ctx context.Context, params LabelValuesParams) (r *Values, _ error)
- func (UnimplementedHandler) Labels(ctx context.Context, params LabelsParams) (r *Labels, _ error)
- func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ErrorStatusCode)
- func (UnimplementedHandler) Patterns(ctx context.Context, params PatternsParams) (r *Patterns, _ error)
- func (UnimplementedHandler) Push(ctx context.Context, req PushReq) error
- func (UnimplementedHandler) Query(ctx context.Context, params QueryParams) (r *QueryResponse, _ error)
- func (UnimplementedHandler) QueryRange(ctx context.Context, params QueryRangeParams) (r *QueryResponse, _ error)
- func (UnimplementedHandler) QueryVolume(ctx context.Context, params QueryVolumeParams) (r *QueryResponse, _ error)
- func (UnimplementedHandler) QueryVolumeRange(ctx context.Context, params QueryVolumeRangeParams) (r *QueryResponse, _ error)
- func (UnimplementedHandler) Series(ctx context.Context, params SeriesParams) (r *Maps, _ error)
- type Values
- func (s *Values) Decode(d *jx.Decoder) error
- func (s *Values) Encode(e *jx.Encoder)
- func (s *Values) GetData() []string
- func (s *Values) GetStatus() string
- func (s *Values) MarshalJSON() ([]byte, error)
- func (s *Values) SetData(val []string)
- func (s *Values) SetStatus(val string)
- func (s *Values) UnmarshalJSON(data []byte) error
- func (s *Values) Validate() error
- type Vector
- type VectorResult
- func (s *VectorResult) Decode(d *jx.Decoder) error
- func (s *VectorResult) Encode(e *jx.Encoder)
- func (s *VectorResult) GetResult() Vector
- func (s *VectorResult) GetStats() *Stats
- func (s *VectorResult) MarshalJSON() ([]byte, error)
- func (s *VectorResult) SetResult(val Vector)
- func (s *VectorResult) SetStats(val *Stats)
- func (s *VectorResult) UnmarshalJSON(data []byte) error
- func (s *VectorResult) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
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) DetectedFieldValues ¶
func (c *Client) DetectedFieldValues(ctx context.Context, params DetectedFieldValuesParams) (*DetectedFieldValues, error)
DetectedFieldValues invokes detectedFieldValues operation.
Get detected field values.
GET /loki/api/v1/detected_field/{field}/values
func (*Client) DetectedFields ¶
func (c *Client) DetectedFields(ctx context.Context, params DetectedFieldsParams) (*DetectedFields, error)
DetectedFields invokes detectedFields operation.
Get detected fields.
GET /loki/api/v1/detected_fields
func (*Client) DetectedLabels ¶
func (c *Client) DetectedLabels(ctx context.Context, params DetectedLabelsParams) (*DetectedLabels, error)
DetectedLabels invokes detectedLabels operation.
Get detected labels. Used by Grafana to test Logs Drilldown availability.
GET /loki/api/v1/detected_labels
func (*Client) DrilldownLimits ¶
func (c *Client) DrilldownLimits(ctx context.Context) (*DrilldownLimits, error)
DrilldownLimits invokes drilldownLimits operation.
Get drilldown limits. Used by Grafana to get limits from Loki.
GET /loki/api/v1/drilldown-limits
func (*Client) IndexStats ¶
func (c *Client) IndexStats(ctx context.Context, params IndexStatsParams) (*IndexStats, error)
IndexStats invokes indexStats operation.
Get index stats.
GET /loki/api/v1/index/stats
func (*Client) LabelValues ¶
LabelValues invokes labelValues operation.
Get values of label.
GET /loki/api/v1/label/{name}/values
func (*Client) Labels ¶
Labels invokes labels operation.
Get labels. Used by Grafana to test connection to Loki.
GET /loki/api/v1/labels
func (*Client) Patterns ¶
Patterns invokes patterns operation.
Endpoint can be used to query loki for patterns detected in the logs. This helps understand the structure of the logs Loki has ingested.
GET /loki/api/v1/patterns
func (*Client) Query ¶
func (c *Client) Query(ctx context.Context, params QueryParams) (*QueryResponse, error)
Query invokes query operation.
Query.
GET /loki/api/v1/query
func (*Client) QueryRange ¶
func (c *Client) QueryRange(ctx context.Context, params QueryRangeParams) (*QueryResponse, error)
QueryRange invokes queryRange operation.
Query range.
GET /loki/api/v1/query_range
func (*Client) QueryVolume ¶
func (c *Client) QueryVolume(ctx context.Context, params QueryVolumeParams) (*QueryResponse, error)
QueryVolume invokes queryVolume operation.
Query the index for volume information about label and label-value combinations.
GET /loki/api/v1/index/volume
func (*Client) QueryVolumeRange ¶
func (c *Client) QueryVolumeRange(ctx context.Context, params QueryVolumeRangeParams) (*QueryResponse, error)
QueryVolumeRange invokes queryVolumeRange operation.
Query the index for volume information about label and label-value combinations.
GET /loki/api/v1/index/volume_range
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 DetectedField ¶
type DetectedField struct {
Label OptString `json:"label"`
Type OptString `json:"type"`
Cardinality OptInt `json:"cardinality"`
Parsers OptNilStringArray `json:"parsers"`
JsonPath OptNilStringArray `json:"jsonPath"`
}
Ref: #/components/schemas/DetectedField
func (*DetectedField) Decode ¶
func (s *DetectedField) Decode(d *jx.Decoder) error
Decode decodes DetectedField from json.
func (*DetectedField) Encode ¶
func (s *DetectedField) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*DetectedField) GetCardinality ¶
func (s *DetectedField) GetCardinality() OptInt
GetCardinality returns the value of Cardinality.
func (*DetectedField) GetJsonPath ¶
func (s *DetectedField) GetJsonPath() OptNilStringArray
GetJsonPath returns the value of JsonPath.
func (*DetectedField) GetLabel ¶
func (s *DetectedField) GetLabel() OptString
GetLabel returns the value of Label.
func (*DetectedField) GetParsers ¶
func (s *DetectedField) GetParsers() OptNilStringArray
GetParsers returns the value of Parsers.
func (*DetectedField) GetType ¶
func (s *DetectedField) GetType() OptString
GetType returns the value of Type.
func (*DetectedField) MarshalJSON ¶
func (s *DetectedField) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*DetectedField) SetCardinality ¶
func (s *DetectedField) SetCardinality(val OptInt)
SetCardinality sets the value of Cardinality.
func (*DetectedField) SetJsonPath ¶
func (s *DetectedField) SetJsonPath(val OptNilStringArray)
SetJsonPath sets the value of JsonPath.
func (*DetectedField) SetLabel ¶
func (s *DetectedField) SetLabel(val OptString)
SetLabel sets the value of Label.
func (*DetectedField) SetParsers ¶
func (s *DetectedField) SetParsers(val OptNilStringArray)
SetParsers sets the value of Parsers.
func (*DetectedField) SetType ¶
func (s *DetectedField) SetType(val OptString)
SetType sets the value of Type.
func (*DetectedField) UnmarshalJSON ¶
func (s *DetectedField) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*DetectedField) Validate ¶
func (s *DetectedField) Validate() error
type DetectedFieldValues ¶
type DetectedFieldValues struct {
Values OptNilStringArray `json:"values"`
Limit OptUint64 `json:"limit"`
}
Ref: #/components/schemas/DetectedFieldValues
func (*DetectedFieldValues) Decode ¶
func (s *DetectedFieldValues) Decode(d *jx.Decoder) error
Decode decodes DetectedFieldValues from json.
func (*DetectedFieldValues) Encode ¶
func (s *DetectedFieldValues) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*DetectedFieldValues) GetLimit ¶
func (s *DetectedFieldValues) GetLimit() OptUint64
GetLimit returns the value of Limit.
func (*DetectedFieldValues) GetValues ¶
func (s *DetectedFieldValues) GetValues() OptNilStringArray
GetValues returns the value of Values.
func (*DetectedFieldValues) MarshalJSON ¶
func (s *DetectedFieldValues) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*DetectedFieldValues) SetLimit ¶
func (s *DetectedFieldValues) SetLimit(val OptUint64)
SetLimit sets the value of Limit.
func (*DetectedFieldValues) SetValues ¶
func (s *DetectedFieldValues) SetValues(val OptNilStringArray)
SetValues sets the value of Values.
func (*DetectedFieldValues) UnmarshalJSON ¶
func (s *DetectedFieldValues) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*DetectedFieldValues) Validate ¶
func (s *DetectedFieldValues) Validate() error
type DetectedFieldValuesParams ¶
type DetectedFieldValuesParams struct {
// Field to query.
Field string
// The LogQL matchers to check (that is, `{job="foo", env=~".+"}`).
Query OptString `json:",omitempty,omitzero"`
// The start time for the query as a nanosecond Unix epoch. Defaults to 6 hours ago.
Start OptLokiTime `json:",omitempty,omitzero"`
// The end time for the query as a nanosecond Unix epoch. Defaults to now.
End OptLokiTime `json:",omitempty,omitzero"`
// A `duration` used to calculate `start` relative to `end`. If `end` is in the future, `start` is
// calculated as this duration before now. Any value specified for start supersedes this parameter.
Since OptPrometheusDuration `json:",omitempty,omitzero"`
}
DetectedFieldValuesParams is parameters of detectedFieldValues operation.
type DetectedFields ¶
type DetectedFields struct {
Fields []DetectedField `json:"fields"`
Limit OptUint64 `json:"limit"`
}
Ref: #/components/schemas/DetectedFields
func (*DetectedFields) Decode ¶
func (s *DetectedFields) Decode(d *jx.Decoder) error
Decode decodes DetectedFields from json.
func (*DetectedFields) Encode ¶
func (s *DetectedFields) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*DetectedFields) GetFields ¶
func (s *DetectedFields) GetFields() []DetectedField
GetFields returns the value of Fields.
func (*DetectedFields) GetLimit ¶
func (s *DetectedFields) GetLimit() OptUint64
GetLimit returns the value of Limit.
func (*DetectedFields) MarshalJSON ¶
func (s *DetectedFields) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*DetectedFields) SetFields ¶
func (s *DetectedFields) SetFields(val []DetectedField)
SetFields sets the value of Fields.
func (*DetectedFields) SetLimit ¶
func (s *DetectedFields) SetLimit(val OptUint64)
SetLimit sets the value of Limit.
func (*DetectedFields) UnmarshalJSON ¶
func (s *DetectedFields) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*DetectedFields) Validate ¶
func (s *DetectedFields) Validate() error
type DetectedFieldsParams ¶
type DetectedFieldsParams struct {
// The LogQL matchers to check (that is, `{job="foo", env=~".+"}`).
Query OptString `json:",omitempty,omitzero"`
// The start time for the query as a nanosecond Unix epoch. Defaults to 6 hours ago.
Start OptLokiTime `json:",omitempty,omitzero"`
// The end time for the query as a nanosecond Unix epoch. Defaults to now.
End OptLokiTime `json:",omitempty,omitzero"`
// A `duration` used to calculate `start` relative to `end`. If `end` is in the future, `start` is
// calculated as this duration before now. Any value specified for start supersedes this parameter.
Since OptPrometheusDuration `json:",omitempty,omitzero"`
}
DetectedFieldsParams is parameters of detectedFields operation.
type DetectedLabel ¶
Ref: #/components/schemas/DetectedLabel
func (*DetectedLabel) Decode ¶
func (s *DetectedLabel) Decode(d *jx.Decoder) error
Decode decodes DetectedLabel from json.
func (*DetectedLabel) Encode ¶
func (s *DetectedLabel) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*DetectedLabel) GetCardinality ¶
func (s *DetectedLabel) GetCardinality() int
GetCardinality returns the value of Cardinality.
func (*DetectedLabel) GetLabel ¶
func (s *DetectedLabel) GetLabel() string
GetLabel returns the value of Label.
func (*DetectedLabel) MarshalJSON ¶
func (s *DetectedLabel) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*DetectedLabel) SetCardinality ¶
func (s *DetectedLabel) SetCardinality(val int)
SetCardinality sets the value of Cardinality.
func (*DetectedLabel) SetLabel ¶
func (s *DetectedLabel) SetLabel(val string)
SetLabel sets the value of Label.
func (*DetectedLabel) UnmarshalJSON ¶
func (s *DetectedLabel) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type DetectedLabels ¶
type DetectedLabels struct {
DetectedLabels []DetectedLabel `json:"detectedLabels"`
Limit OptUint64 `json:"limit"`
}
Ref: #/components/schemas/DetectedLabels
func (*DetectedLabels) Decode ¶
func (s *DetectedLabels) Decode(d *jx.Decoder) error
Decode decodes DetectedLabels from json.
func (*DetectedLabels) Encode ¶
func (s *DetectedLabels) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*DetectedLabels) GetDetectedLabels ¶
func (s *DetectedLabels) GetDetectedLabels() []DetectedLabel
GetDetectedLabels returns the value of DetectedLabels.
func (*DetectedLabels) GetLimit ¶
func (s *DetectedLabels) GetLimit() OptUint64
GetLimit returns the value of Limit.
func (*DetectedLabels) MarshalJSON ¶
func (s *DetectedLabels) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*DetectedLabels) SetDetectedLabels ¶
func (s *DetectedLabels) SetDetectedLabels(val []DetectedLabel)
SetDetectedLabels sets the value of DetectedLabels.
func (*DetectedLabels) SetLimit ¶
func (s *DetectedLabels) SetLimit(val OptUint64)
SetLimit sets the value of Limit.
func (*DetectedLabels) UnmarshalJSON ¶
func (s *DetectedLabels) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type DetectedLabelsParams ¶
type DetectedLabelsParams struct {
// The LogQL matchers to check (that is, `{job="foo", env=~".+"}`).
Query OptString `json:",omitempty,omitzero"`
// The start time for the query as a nanosecond Unix epoch. Defaults to 6 hours ago.
Start OptLokiTime `json:",omitempty,omitzero"`
// The end time for the query as a nanosecond Unix epoch. Defaults to now.
End OptLokiTime `json:",omitempty,omitzero"`
// A `duration` used to calculate `start` relative to `end`. If `end` is in the future, `start` is
// calculated as this duration before now. Any value specified for start supersedes this parameter.
Since OptPrometheusDuration `json:",omitempty,omitzero"`
}
DetectedLabelsParams is parameters of detectedLabels operation.
type Direction ¶
type Direction string
Ref: #/components/schemas/Direction
func (Direction) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*Direction) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type DrilldownLimits ¶
type DrilldownLimits struct {
Limits DrilldownLimitsLimits `json:"limits"`
PatternIngesterEnabled OptBool `json:"pattern_ingester_enabled"`
Version string `json:"version"`
}
Ref: #/components/schemas/DrilldownLimits
func (*DrilldownLimits) Decode ¶
func (s *DrilldownLimits) Decode(d *jx.Decoder) error
Decode decodes DrilldownLimits from json.
func (*DrilldownLimits) Encode ¶
func (s *DrilldownLimits) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*DrilldownLimits) GetLimits ¶
func (s *DrilldownLimits) GetLimits() DrilldownLimitsLimits
GetLimits returns the value of Limits.
func (*DrilldownLimits) GetPatternIngesterEnabled ¶
func (s *DrilldownLimits) GetPatternIngesterEnabled() OptBool
GetPatternIngesterEnabled returns the value of PatternIngesterEnabled.
func (*DrilldownLimits) GetVersion ¶
func (s *DrilldownLimits) GetVersion() string
GetVersion returns the value of Version.
func (*DrilldownLimits) MarshalJSON ¶
func (s *DrilldownLimits) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*DrilldownLimits) SetLimits ¶
func (s *DrilldownLimits) SetLimits(val DrilldownLimitsLimits)
SetLimits sets the value of Limits.
func (*DrilldownLimits) SetPatternIngesterEnabled ¶
func (s *DrilldownLimits) SetPatternIngesterEnabled(val OptBool)
SetPatternIngesterEnabled sets the value of PatternIngesterEnabled.
func (*DrilldownLimits) SetVersion ¶
func (s *DrilldownLimits) SetVersion(val string)
SetVersion sets the value of Version.
func (*DrilldownLimits) UnmarshalJSON ¶
func (s *DrilldownLimits) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type DrilldownLimitsLimits ¶
type DrilldownLimitsLimits struct {
VolumeEnabled OptBool `json:"volume_enabled"`
}
func (*DrilldownLimitsLimits) Decode ¶
func (s *DrilldownLimitsLimits) Decode(d *jx.Decoder) error
Decode decodes DrilldownLimitsLimits from json.
func (*DrilldownLimitsLimits) Encode ¶
func (s *DrilldownLimitsLimits) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*DrilldownLimitsLimits) GetVolumeEnabled ¶
func (s *DrilldownLimitsLimits) GetVolumeEnabled() OptBool
GetVolumeEnabled returns the value of VolumeEnabled.
func (*DrilldownLimitsLimits) MarshalJSON ¶
func (s *DrilldownLimitsLimits) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*DrilldownLimitsLimits) SetVolumeEnabled ¶
func (s *DrilldownLimitsLimits) SetVolumeEnabled(val OptBool)
SetVolumeEnabled sets the value of VolumeEnabled.
func (*DrilldownLimitsLimits) UnmarshalJSON ¶
func (s *DrilldownLimitsLimits) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Error ¶
type Error string
func (Error) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Error) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ErrorStatusCode ¶
ErrorStatusCode wraps Error with StatusCode.
func (*ErrorStatusCode) Error ¶
func (s *ErrorStatusCode) Error() string
func (*ErrorStatusCode) GetResponse ¶
func (s *ErrorStatusCode) GetResponse() Error
GetResponse returns the value of Response.
func (*ErrorStatusCode) GetStatusCode ¶
func (s *ErrorStatusCode) GetStatusCode() int
GetStatusCode returns the value of StatusCode.
func (*ErrorStatusCode) SetResponse ¶
func (s *ErrorStatusCode) SetResponse(val Error)
SetResponse sets the value of Response.
func (*ErrorStatusCode) SetStatusCode ¶
func (s *ErrorStatusCode) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
type FPoint ¶
Ref: #/components/schemas/FPoint
func (*FPoint) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*FPoint) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Handler ¶
type Handler interface {
// DetectedFieldValues implements detectedFieldValues operation.
//
// Get detected field values.
//
// GET /loki/api/v1/detected_field/{field}/values
DetectedFieldValues(ctx context.Context, params DetectedFieldValuesParams) (*DetectedFieldValues, error)
// DetectedFields implements detectedFields operation.
//
// Get detected fields.
//
// GET /loki/api/v1/detected_fields
DetectedFields(ctx context.Context, params DetectedFieldsParams) (*DetectedFields, error)
// DetectedLabels implements detectedLabels operation.
//
// Get detected labels. Used by Grafana to test Logs Drilldown availability.
//
// GET /loki/api/v1/detected_labels
DetectedLabels(ctx context.Context, params DetectedLabelsParams) (*DetectedLabels, error)
// DrilldownLimits implements drilldownLimits operation.
//
// Get drilldown limits. Used by Grafana to get limits from Loki.
//
// GET /loki/api/v1/drilldown-limits
DrilldownLimits(ctx context.Context) (*DrilldownLimits, error)
// IndexStats implements indexStats operation.
//
// Get index stats.
//
// GET /loki/api/v1/index/stats
IndexStats(ctx context.Context, params IndexStatsParams) (*IndexStats, error)
// LabelValues implements labelValues operation.
//
// Get values of label.
//
// GET /loki/api/v1/label/{name}/values
LabelValues(ctx context.Context, params LabelValuesParams) (*Values, error)
// Labels implements labels operation.
//
// Get labels. Used by Grafana to test connection to Loki.
//
// GET /loki/api/v1/labels
Labels(ctx context.Context, params LabelsParams) (*Labels, error)
// Patterns implements patterns operation.
//
// Endpoint can be used to query loki for patterns detected in the logs. This helps understand the
// structure of the logs Loki has ingested.
//
// GET /loki/api/v1/patterns
Patterns(ctx context.Context, params PatternsParams) (*Patterns, error)
// Push implements push operation.
//
// Push data.
//
// POST /loki/api/v1/push
Push(ctx context.Context, req PushReq) error
// Query implements query operation.
//
// Query.
//
// GET /loki/api/v1/query
Query(ctx context.Context, params QueryParams) (*QueryResponse, error)
// QueryRange implements queryRange operation.
//
// Query range.
//
// GET /loki/api/v1/query_range
QueryRange(ctx context.Context, params QueryRangeParams) (*QueryResponse, error)
// QueryVolume implements queryVolume operation.
//
// Query the index for volume information about label and label-value combinations.
//
// GET /loki/api/v1/index/volume
QueryVolume(ctx context.Context, params QueryVolumeParams) (*QueryResponse, error)
// QueryVolumeRange implements queryVolumeRange operation.
//
// Query the index for volume information about label and label-value combinations.
//
// GET /loki/api/v1/index/volume_range
QueryVolumeRange(ctx context.Context, params QueryVolumeRangeParams) (*QueryResponse, error)
// Series implements series operation.
//
// Get series.
//
// GET /loki/api/v1/series
Series(ctx context.Context, params SeriesParams) (*Maps, error)
// NewError creates *ErrorStatusCode from error returned by handler.
//
// Used for common default response.
NewError(ctx context.Context, err error) *ErrorStatusCode
}
Handler handles operations described by OpenAPI v3 specification.
type IndexStats ¶
type IndexStats struct {
Streams int `json:"streams"`
Chunks int `json:"chunks"`
Entries int `json:"entries"`
Bytes int `json:"bytes"`
}
Ref: #/components/schemas/IndexStats
func (*IndexStats) Decode ¶
func (s *IndexStats) Decode(d *jx.Decoder) error
Decode decodes IndexStats from json.
func (*IndexStats) Encode ¶
func (s *IndexStats) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*IndexStats) GetBytes ¶
func (s *IndexStats) GetBytes() int
GetBytes returns the value of Bytes.
func (*IndexStats) GetChunks ¶
func (s *IndexStats) GetChunks() int
GetChunks returns the value of Chunks.
func (*IndexStats) GetEntries ¶
func (s *IndexStats) GetEntries() int
GetEntries returns the value of Entries.
func (*IndexStats) GetStreams ¶
func (s *IndexStats) GetStreams() int
GetStreams returns the value of Streams.
func (*IndexStats) MarshalJSON ¶
func (s *IndexStats) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*IndexStats) SetBytes ¶
func (s *IndexStats) SetBytes(val int)
SetBytes sets the value of Bytes.
func (*IndexStats) SetChunks ¶
func (s *IndexStats) SetChunks(val int)
SetChunks sets the value of Chunks.
func (*IndexStats) SetEntries ¶
func (s *IndexStats) SetEntries(val int)
SetEntries sets the value of Entries.
func (*IndexStats) SetStreams ¶
func (s *IndexStats) SetStreams(val int)
SetStreams sets the value of Streams.
func (*IndexStats) UnmarshalJSON ¶
func (s *IndexStats) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type IndexStatsParams ¶
type IndexStatsParams struct {
Start OptLokiTime `json:",omitempty,omitzero"`
End OptLokiTime `json:",omitempty,omitzero"`
// The LogQL matchers to check.
Query string
}
IndexStatsParams is parameters of indexStats operation.
type Invoker ¶
type Invoker interface {
// DetectedFieldValues invokes detectedFieldValues operation.
//
// Get detected field values.
//
// GET /loki/api/v1/detected_field/{field}/values
DetectedFieldValues(ctx context.Context, params DetectedFieldValuesParams) (*DetectedFieldValues, error)
// DetectedFields invokes detectedFields operation.
//
// Get detected fields.
//
// GET /loki/api/v1/detected_fields
DetectedFields(ctx context.Context, params DetectedFieldsParams) (*DetectedFields, error)
// DetectedLabels invokes detectedLabels operation.
//
// Get detected labels. Used by Grafana to test Logs Drilldown availability.
//
// GET /loki/api/v1/detected_labels
DetectedLabels(ctx context.Context, params DetectedLabelsParams) (*DetectedLabels, error)
// DrilldownLimits invokes drilldownLimits operation.
//
// Get drilldown limits. Used by Grafana to get limits from Loki.
//
// GET /loki/api/v1/drilldown-limits
DrilldownLimits(ctx context.Context) (*DrilldownLimits, error)
// IndexStats invokes indexStats operation.
//
// Get index stats.
//
// GET /loki/api/v1/index/stats
IndexStats(ctx context.Context, params IndexStatsParams) (*IndexStats, error)
// LabelValues invokes labelValues operation.
//
// Get values of label.
//
// GET /loki/api/v1/label/{name}/values
LabelValues(ctx context.Context, params LabelValuesParams) (*Values, error)
// Labels invokes labels operation.
//
// Get labels. Used by Grafana to test connection to Loki.
//
// GET /loki/api/v1/labels
Labels(ctx context.Context, params LabelsParams) (*Labels, error)
// Patterns invokes patterns operation.
//
// Endpoint can be used to query loki for patterns detected in the logs. This helps understand the
// structure of the logs Loki has ingested.
//
// GET /loki/api/v1/patterns
Patterns(ctx context.Context, params PatternsParams) (*Patterns, error)
// Push invokes push operation.
//
// Push data.
//
// POST /loki/api/v1/push
Push(ctx context.Context, request PushReq) error
// Query invokes query operation.
//
// Query.
//
// GET /loki/api/v1/query
Query(ctx context.Context, params QueryParams) (*QueryResponse, error)
// QueryRange invokes queryRange operation.
//
// Query range.
//
// GET /loki/api/v1/query_range
QueryRange(ctx context.Context, params QueryRangeParams) (*QueryResponse, error)
// QueryVolume invokes queryVolume operation.
//
// Query the index for volume information about label and label-value combinations.
//
// GET /loki/api/v1/index/volume
QueryVolume(ctx context.Context, params QueryVolumeParams) (*QueryResponse, error)
// QueryVolumeRange invokes queryVolumeRange operation.
//
// Query the index for volume information about label and label-value combinations.
//
// GET /loki/api/v1/index/volume_range
QueryVolumeRange(ctx context.Context, params QueryVolumeRangeParams) (*QueryResponse, error)
// Series invokes series operation.
//
// Get series.
//
// GET /loki/api/v1/series
Series(ctx context.Context, params SeriesParams) (*Maps, 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 LabelValuesParams ¶
type LabelValuesParams struct {
// The start time for the query as a nanosecond Unix epoch. Defaults to 6 hours ago.
Start OptLokiTime `json:",omitempty,omitzero"`
// The end time for the query as a nanosecond Unix epoch. Defaults to now.
End OptLokiTime `json:",omitempty,omitzero"`
// A `duration` used to calculate `start` relative to `end`. If `end` is in the future, `start` is
// calculated as this duration before now. Any value specified for start supersedes this parameter.
Since OptPrometheusDuration `json:",omitempty,omitzero"`
// A set of log stream selector that selects the streams to match and return label values for `{name}`.
Query OptString `json:",omitempty,omitzero"`
// Label name.
Name string
}
LabelValuesParams is parameters of labelValues operation.
type Labeler ¶
type Labeler struct {
// contains filtered or unexported fields
}
Labeler is used to allow adding custom attributes to the server request metrics.
func LabelerFromContext ¶
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 ¶
AttributeSet returns the attributes added to the Labeler as an attribute.Set.
type Labels ¶
Array of label names. Ref: #/components/schemas/Labels
func (*Labels) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Labels) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type LabelsParams ¶
type LabelsParams struct {
// The start time for the query as a nanosecond Unix epoch. Defaults to 6 hours ago.
Start OptLokiTime `json:",omitempty,omitzero"`
// The end time for the query as a nanosecond Unix epoch. Defaults to now.
End OptLokiTime `json:",omitempty,omitzero"`
// A `duration` used to calculate `start` relative to `end`. If `end` is in the future, `start` is
// calculated as this duration before now. Any value specified for start supersedes this parameter.
Since OptPrometheusDuration `json:",omitempty,omitzero"`
}
LabelsParams is parameters of labels operation.
type LogEntry ¶
Ref: #/components/schemas/LogEntry
func (*LogEntry) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*LogEntry) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Maps ¶
type Maps struct {
Data []MapsDataItem `json:"data"`
Status string `json:"status"`
}
Array of maps. Ref: #/components/schemas/Maps
func (*Maps) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Maps) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type MapsDataItem ¶
func (*MapsDataItem) Decode ¶
func (s *MapsDataItem) Decode(d *jx.Decoder) error
Decode decodes MapsDataItem from json.
func (MapsDataItem) Encode ¶
func (s MapsDataItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (MapsDataItem) MarshalJSON ¶
func (s MapsDataItem) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MapsDataItem) UnmarshalJSON ¶
func (s *MapsDataItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Matrix ¶
type Matrix []Series
func (Matrix) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Matrix) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type MatrixResult ¶
Ref: #/components/schemas/MatrixResult
func (*MatrixResult) Decode ¶
func (s *MatrixResult) Decode(d *jx.Decoder) error
Decode decodes MatrixResult from json.
func (*MatrixResult) Encode ¶
func (s *MatrixResult) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*MatrixResult) GetResult ¶
func (s *MatrixResult) GetResult() Matrix
GetResult returns the value of Result.
func (*MatrixResult) GetStats ¶
func (s *MatrixResult) GetStats() *Stats
GetStats returns the value of Stats.
func (*MatrixResult) MarshalJSON ¶
func (s *MatrixResult) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MatrixResult) SetResult ¶
func (s *MatrixResult) SetResult(val Matrix)
SetResult sets the value of Result.
func (*MatrixResult) SetStats ¶
func (s *MatrixResult) SetStats(val *Stats)
SetStats sets the value of Stats.
func (*MatrixResult) UnmarshalJSON ¶
func (s *MatrixResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*MatrixResult) Validate ¶
func (s *MatrixResult) Validate() error
type OperationName ¶
type OperationName = string
OperationName is the ogen operation name
const ( DetectedFieldValuesOperation OperationName = "DetectedFieldValues" DetectedFieldsOperation OperationName = "DetectedFields" DetectedLabelsOperation OperationName = "DetectedLabels" DrilldownLimitsOperation OperationName = "DrilldownLimits" IndexStatsOperation OperationName = "IndexStats" LabelValuesOperation OperationName = "LabelValues" LabelsOperation OperationName = "Labels" PatternsOperation OperationName = "Patterns" PushOperation OperationName = "Push" QueryOperation OperationName = "Query" QueryRangeOperation OperationName = "QueryRange" QueryVolumeOperation OperationName = "QueryVolume" QueryVolumeRangeOperation OperationName = "QueryVolumeRange" SeriesOperation OperationName = "Series" )
type OptBool ¶
OptBool is optional bool.
func NewOptBool ¶
NewOptBool returns new OptBool with value set to v.
func (OptBool) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptBool) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptDirection ¶
OptDirection is optional Direction.
func NewOptDirection ¶
func NewOptDirection(v Direction) OptDirection
NewOptDirection returns new OptDirection with value set to v.
func (OptDirection) Get ¶
func (o OptDirection) Get() (v Direction, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptDirection) IsSet ¶
func (o OptDirection) IsSet() bool
IsSet returns true if OptDirection was set.
func (OptDirection) Or ¶
func (o OptDirection) Or(d Direction) Direction
Or returns value if set, or given parameter if does not.
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 OptLokiTime ¶
OptLokiTime is optional LokiTime.
func NewOptLokiTime ¶
func NewOptLokiTime(v LokiTime) OptLokiTime
NewOptLokiTime returns new OptLokiTime with value set to v.
func (OptLokiTime) Get ¶
func (o OptLokiTime) Get() (v LokiTime, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptLokiTime) IsSet ¶
func (o OptLokiTime) IsSet() bool
IsSet returns true if OptLokiTime was set.
func (OptLokiTime) Or ¶
func (o OptLokiTime) Or(d LokiTime) LokiTime
Or returns value if set, or given parameter if does not.
type OptNilStringArray ¶
OptNilStringArray is optional nullable []string.
func NewOptNilStringArray ¶
func NewOptNilStringArray(v []string) OptNilStringArray
NewOptNilStringArray returns new OptNilStringArray with value set to v.
func (*OptNilStringArray) Decode ¶
func (o *OptNilStringArray) Decode(d *jx.Decoder) error
Decode decodes []string from json.
func (OptNilStringArray) Encode ¶
func (o OptNilStringArray) Encode(e *jx.Encoder)
Encode encodes []string as json.
func (OptNilStringArray) Get ¶
func (o OptNilStringArray) Get() (v []string, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilStringArray) IsEmpty ¶
func (o OptNilStringArray) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilStringArray) IsNull ¶
func (o OptNilStringArray) IsNull() bool
IsNull returns true if value is Null.
func (OptNilStringArray) IsSet ¶
func (o OptNilStringArray) IsSet() bool
IsSet returns true if OptNilStringArray was set.
func (OptNilStringArray) MarshalJSON ¶
func (s OptNilStringArray) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilStringArray) Or ¶
func (o OptNilStringArray) Or(d []string) []string
Or returns value if set, or given parameter if does not.
func (*OptNilStringArray) SetTo ¶
func (o *OptNilStringArray) SetTo(v []string)
SetTo sets value to v.
func (*OptNilStringArray) SetToNull ¶
func (o *OptNilStringArray) SetToNull()
SetToNull sets value to null.
func (*OptNilStringArray) UnmarshalJSON ¶
func (s *OptNilStringArray) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptPrometheusDuration ¶
type OptPrometheusDuration struct {
Value PrometheusDuration
Set bool
}
OptPrometheusDuration is optional PrometheusDuration.
func NewOptPrometheusDuration ¶
func NewOptPrometheusDuration(v PrometheusDuration) OptPrometheusDuration
NewOptPrometheusDuration returns new OptPrometheusDuration with value set to v.
func (OptPrometheusDuration) Get ¶
func (o OptPrometheusDuration) Get() (v PrometheusDuration, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptPrometheusDuration) IsSet ¶
func (o OptPrometheusDuration) IsSet() bool
IsSet returns true if OptPrometheusDuration was set.
func (OptPrometheusDuration) Or ¶
func (o OptPrometheusDuration) Or(d PrometheusDuration) PrometheusDuration
Or returns value if set, or given parameter if does not.
func (*OptPrometheusDuration) SetTo ¶
func (o *OptPrometheusDuration) SetTo(v PrometheusDuration)
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 OptUint64 ¶
OptUint64 is optional uint64.
func NewOptUint64 ¶
NewOptUint64 returns new OptUint64 with value set to v.
func (OptUint64) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptUint64) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Option ¶
type Option interface {
ServerOption
ClientOption
}
Option is config option.
func WithAttributes ¶
WithAttributes specifies default otel attributes.
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 PatternSample ¶
Ref: #/components/schemas/PatternSample
func (*PatternSample) Decode ¶
func (s *PatternSample) Decode(d *jx.Decoder) error
Decode decodes PatternSample from json.
func (*PatternSample) Encode ¶
func (s *PatternSample) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PatternSample) MarshalJSON ¶
func (s *PatternSample) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PatternSample) UnmarshalJSON ¶
func (s *PatternSample) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*PatternSample) Validate ¶
func (s *PatternSample) Validate() error
type PatternSeries ¶
type PatternSeries struct {
Pattern string `json:"pattern"`
Samples []PatternSample `json:"samples"`
Level string `json:"level"`
}
Ref: #/components/schemas/PatternSeries
func (*PatternSeries) Decode ¶
func (s *PatternSeries) Decode(d *jx.Decoder) error
Decode decodes PatternSeries from json.
func (*PatternSeries) Encode ¶
func (s *PatternSeries) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PatternSeries) GetLevel ¶
func (s *PatternSeries) GetLevel() string
GetLevel returns the value of Level.
func (*PatternSeries) GetPattern ¶
func (s *PatternSeries) GetPattern() string
GetPattern returns the value of Pattern.
func (*PatternSeries) GetSamples ¶
func (s *PatternSeries) GetSamples() []PatternSample
GetSamples returns the value of Samples.
func (*PatternSeries) MarshalJSON ¶
func (s *PatternSeries) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PatternSeries) SetLevel ¶
func (s *PatternSeries) SetLevel(val string)
SetLevel sets the value of Level.
func (*PatternSeries) SetPattern ¶
func (s *PatternSeries) SetPattern(val string)
SetPattern sets the value of Pattern.
func (*PatternSeries) SetSamples ¶
func (s *PatternSeries) SetSamples(val []PatternSample)
SetSamples sets the value of Samples.
func (*PatternSeries) UnmarshalJSON ¶
func (s *PatternSeries) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*PatternSeries) Validate ¶
func (s *PatternSeries) Validate() error
type Patterns ¶
type Patterns struct {
Series []PatternSeries `json:"series"`
}
Ref: #/components/schemas/Patterns
func (*Patterns) GetSeries ¶
func (s *Patterns) GetSeries() []PatternSeries
GetSeries returns the value of Series.
func (*Patterns) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Patterns) SetSeries ¶
func (s *Patterns) SetSeries(val []PatternSeries)
SetSeries sets the value of Series.
func (*Patterns) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type PatternsParams ¶
type PatternsParams struct {
Start OptLokiTime `json:",omitempty,omitzero"`
End OptLokiTime `json:",omitempty,omitzero"`
// A `duration` used to calculate `start` relative to `end`. If `end` is in the future, `start` is
// calculated as this duration before now. Any value specified for start supersedes this parameter.
Since OptPrometheusDuration `json:",omitempty,omitzero"`
// The LogQL query to perform.
Query string
// Query resolution step width in `duration` format or float number of seconds. `duration` refers to
// Prometheus duration strings of the form `[0-9]+[smhdwy]`. For example, `5m` refers to a duration of
// 5 minutes. Defaults to a dynamic value based on start and end.
Step OptPrometheusDuration `json:",omitempty,omitzero"`
}
PatternsParams is parameters of patterns operation.
type PrometheusDuration ¶
type PrometheusDuration string
func (PrometheusDuration) Validate ¶
func (s PrometheusDuration) Validate() error
type Push ¶
type Push struct {
Streams []Stream `json:"streams"`
}
Ref: #/components/schemas/Push
func (*Push) GetStreams ¶
GetStreams returns the value of Streams.
func (*Push) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Push) SetStreams ¶
SetStreams sets the value of Streams.
func (*Push) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type QueryParams ¶
type QueryParams struct {
// The LogQL query to perform.
Query string
// The max number of entries to return. It defaults to `100`. Only applies to query types which produce
// a stream (log lines) response.
Limit OptInt `json:",omitempty,omitzero"`
// The evaluation time for the query as a nanosecond Unix epoch or another supported format. Defaults
// to now.
Time OptLokiTime `json:",omitempty,omitzero"`
// Determines the sort order of logs. Supported values are `forward` or `backward`. Defaults to
// `backward`.
Direction OptDirection `json:",omitempty,omitzero"`
}
QueryParams is parameters of query operation.
type QueryRangeParams ¶
type QueryRangeParams struct {
Start OptLokiTime `json:",omitempty,omitzero"`
End OptLokiTime `json:",omitempty,omitzero"`
// A `duration` used to calculate `start` relative to `end`. If `end` is in the future, `start` is
// calculated as this duration before now. Any value specified for start supersedes this parameter.
Since OptPrometheusDuration `json:",omitempty,omitzero"`
// The LogQL query to perform.
Query string
// Query resolution step width in `duration` format or float number of seconds. `duration` refers to
// Prometheus duration strings of the form `[0-9]+[smhdwy]`. For example, `5m` refers to a duration of
// 5 minutes. Defaults to a dynamic value based on start and end. Only applies to query types which
// produce a matrix response.
Step OptPrometheusDuration `json:",omitempty,omitzero"`
// The max number of entries to return. It defaults to `100`. Only applies to query types which produce
// a stream (log lines) response.
Limit OptInt `json:",omitempty,omitzero"`
// Determines the sort order of logs. Supported values are `forward` or `backward`. Defaults to
// `backward`.
Direction OptDirection `json:",omitempty,omitzero"`
}
QueryRangeParams is parameters of queryRange operation.
type QueryResponse ¶
type QueryResponse struct {
Status string `json:"status"`
Data QueryResponseData `json:"data"`
}
Ref: #/components/schemas/QueryResponse
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() QueryResponseData
GetData returns the value of Data.
func (*QueryResponse) GetStatus ¶
func (s *QueryResponse) GetStatus() string
GetStatus returns the value of Status.
func (*QueryResponse) MarshalJSON ¶
func (s *QueryResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*QueryResponse) SetData ¶
func (s *QueryResponse) SetData(val QueryResponseData)
SetData sets the value of Data.
func (*QueryResponse) SetStatus ¶
func (s *QueryResponse) SetStatus(val string)
SetStatus sets the value of Status.
func (*QueryResponse) UnmarshalJSON ¶
func (s *QueryResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*QueryResponse) Validate ¶
func (s *QueryResponse) Validate() error
type QueryResponseData ¶
type QueryResponseData struct {
// Type selects the active sum variant, switch on this field.
Type QueryResponseDataType
StreamsResult StreamsResult
ScalarResult ScalarResult
VectorResult VectorResult
MatrixResult MatrixResult
}
Ref: #/components/schemas/QueryResponseData QueryResponseData represents sum type.
func NewMatrixResultQueryResponseData ¶
func NewMatrixResultQueryResponseData(v MatrixResult) QueryResponseData
NewMatrixResultQueryResponseData returns new QueryResponseData from MatrixResult.
func NewScalarResultQueryResponseData ¶
func NewScalarResultQueryResponseData(v ScalarResult) QueryResponseData
NewScalarResultQueryResponseData returns new QueryResponseData from ScalarResult.
func NewStreamsResultQueryResponseData ¶
func NewStreamsResultQueryResponseData(v StreamsResult) QueryResponseData
NewStreamsResultQueryResponseData returns new QueryResponseData from StreamsResult.
func NewVectorResultQueryResponseData ¶
func NewVectorResultQueryResponseData(v VectorResult) QueryResponseData
NewVectorResultQueryResponseData returns new QueryResponseData from VectorResult.
func (*QueryResponseData) Decode ¶
func (s *QueryResponseData) Decode(d *jx.Decoder) error
Decode decodes QueryResponseData from json.
func (QueryResponseData) Encode ¶
func (s QueryResponseData) Encode(e *jx.Encoder)
Encode encodes QueryResponseData as json.
func (QueryResponseData) GetMatrixResult ¶
func (s QueryResponseData) GetMatrixResult() (v MatrixResult, ok bool)
GetMatrixResult returns MatrixResult and true boolean if QueryResponseData is MatrixResult.
func (QueryResponseData) GetScalarResult ¶
func (s QueryResponseData) GetScalarResult() (v ScalarResult, ok bool)
GetScalarResult returns ScalarResult and true boolean if QueryResponseData is ScalarResult.
func (QueryResponseData) GetStreamsResult ¶
func (s QueryResponseData) GetStreamsResult() (v StreamsResult, ok bool)
GetStreamsResult returns StreamsResult and true boolean if QueryResponseData is StreamsResult.
func (QueryResponseData) GetVectorResult ¶
func (s QueryResponseData) GetVectorResult() (v VectorResult, ok bool)
GetVectorResult returns VectorResult and true boolean if QueryResponseData is VectorResult.
func (QueryResponseData) IsMatrixResult ¶
func (s QueryResponseData) IsMatrixResult() bool
IsMatrixResult reports whether QueryResponseData is MatrixResult.
func (QueryResponseData) IsScalarResult ¶
func (s QueryResponseData) IsScalarResult() bool
IsScalarResult reports whether QueryResponseData is ScalarResult.
func (QueryResponseData) IsStreamsResult ¶
func (s QueryResponseData) IsStreamsResult() bool
IsStreamsResult reports whether QueryResponseData is StreamsResult.
func (QueryResponseData) IsVectorResult ¶
func (s QueryResponseData) IsVectorResult() bool
IsVectorResult reports whether QueryResponseData is VectorResult.
func (QueryResponseData) MarshalJSON ¶
func (s QueryResponseData) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*QueryResponseData) SetMatrixResult ¶
func (s *QueryResponseData) SetMatrixResult(v MatrixResult)
SetMatrixResult sets QueryResponseData to MatrixResult.
func (*QueryResponseData) SetScalarResult ¶
func (s *QueryResponseData) SetScalarResult(v ScalarResult)
SetScalarResult sets QueryResponseData to ScalarResult.
func (*QueryResponseData) SetStreamsResult ¶
func (s *QueryResponseData) SetStreamsResult(v StreamsResult)
SetStreamsResult sets QueryResponseData to StreamsResult.
func (*QueryResponseData) SetVectorResult ¶
func (s *QueryResponseData) SetVectorResult(v VectorResult)
SetVectorResult sets QueryResponseData to VectorResult.
func (*QueryResponseData) UnmarshalJSON ¶
func (s *QueryResponseData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (QueryResponseData) Validate ¶
func (s QueryResponseData) Validate() error
type QueryResponseDataType ¶
type QueryResponseDataType string
QueryResponseDataType is oneOf type of QueryResponseData.
const ( StreamsResultQueryResponseData QueryResponseDataType = "streams" ScalarResultQueryResponseData QueryResponseDataType = "scalar" VectorResultQueryResponseData QueryResponseDataType = "vector" MatrixResultQueryResponseData QueryResponseDataType = "matrix" )
Possible values for QueryResponseDataType.
type QueryVolumeParams ¶
type QueryVolumeParams struct {
// The LogQL matchers to check (that is, `{job="foo", env=~".+"}`).
Query OptString `json:",omitempty,omitzero"`
// Start timestamp.
Start OptLokiTime `json:",omitempty,omitzero"`
// End timestamp.
End OptLokiTime `json:",omitempty,omitzero"`
// A `duration` used to calculate `start` relative to `end`. If `end` is in the future, `start` is
// calculated as this duration before now. Any value specified for start supersedes this parameter.
Since OptPrometheusDuration `json:",omitempty,omitzero"`
// How many metric series to return. The parameter is optional, the default is `100`.
Limit OptInt `json:",omitempty,omitzero"`
// A comma separated list of labels to aggregate into. When not provided, volumes will be aggregated
// into the matching labels or label-value pairs.
TargetLabels OptString `json:",omitempty,omitzero"`
// Whether to aggregate into labels or label-value pairs. This parameter is optional, the default is
// label-value pairs.
AggregateBy OptString `json:",omitempty,omitzero"`
}
QueryVolumeParams is parameters of queryVolume operation.
type QueryVolumeRangeParams ¶
type QueryVolumeRangeParams struct {
// The LogQL matchers to check (that is, `{job="foo", env=~".+"}`).
Query OptString `json:",omitempty,omitzero"`
// Start timestamp.
Start OptLokiTime `json:",omitempty,omitzero"`
// End timestamp.
End OptLokiTime `json:",omitempty,omitzero"`
// A `duration` used to calculate `start` relative to `end`. If `end` is in the future, `start` is
// calculated as this duration before now. Any value specified for start supersedes this parameter.
Since OptPrometheusDuration `json:",omitempty,omitzero"`
// Query resolution step width in duration format or float number of seconds. `duration` refers to
// Prometheus duration strings of the form `[0-9]+[smhdwy]`. For example, `5m` refers to a duration of
// 5 minutes.
//
// Defaults to a dynamic value based on `start` and `end`. Only applies when querying the
// `volume_range` endpoint, which will always return a Prometheus style matrix response. The default
// step configured for range queries will be used when not provided.
Step OptPrometheusDuration `json:",omitempty,omitzero"`
// How many metric series to return. The parameter is optional, the default is `100`.
Limit OptInt `json:",omitempty,omitzero"`
// A comma separated list of labels to aggregate into. When not provided, volumes will be aggregated
// into the matching labels or label-value pairs.
TargetLabels OptString `json:",omitempty,omitzero"`
// Whether to aggregate into labels or label-value pairs. This parameter is optional, the default is
// label-value pairs.
AggregateBy OptString `json:",omitempty,omitzero"`
}
QueryVolumeRangeParams is parameters of queryVolumeRange operation.
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationGroup ¶
OperationGroup returns the x-ogen-operation-group value.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type Sample ¶
type Sample struct {
Metric OptLabelSet `json:"metric"`
Value FPoint `json:"value"`
}
Ref: #/components/schemas/Sample
func (*Sample) GetMetric ¶
func (s *Sample) GetMetric() OptLabelSet
GetMetric returns the value of Metric.
func (*Sample) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Sample) SetMetric ¶
func (s *Sample) SetMetric(val OptLabelSet)
SetMetric sets the value of Metric.
func (*Sample) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ScalarResult ¶
Ref: #/components/schemas/ScalarResult
func (*ScalarResult) Decode ¶
func (s *ScalarResult) Decode(d *jx.Decoder) error
Decode decodes ScalarResult from json.
func (*ScalarResult) Encode ¶
func (s *ScalarResult) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ScalarResult) GetResult ¶
func (s *ScalarResult) GetResult() FPoint
GetResult returns the value of Result.
func (*ScalarResult) GetStats ¶
func (s *ScalarResult) GetStats() *Stats
GetStats returns the value of Stats.
func (*ScalarResult) MarshalJSON ¶
func (s *ScalarResult) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ScalarResult) SetResult ¶
func (s *ScalarResult) SetResult(val FPoint)
SetResult sets the value of Result.
func (*ScalarResult) SetStats ¶
func (s *ScalarResult) SetStats(val *Stats)
SetStats sets the value of Stats.
func (*ScalarResult) UnmarshalJSON ¶
func (s *ScalarResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ScalarResult) Validate ¶
func (s *ScalarResult) Validate() error
type Series ¶
type Series struct {
Metric OptLabelSet `json:"metric"`
Values []FPoint `json:"values"`
}
Ref: #/components/schemas/Series
func (*Series) GetMetric ¶
func (s *Series) GetMetric() OptLabelSet
GetMetric returns the value of Metric.
func (*Series) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Series) SetMetric ¶
func (s *Series) SetMetric(val OptLabelSet)
SetMetric sets the value of Metric.
func (*Series) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type SeriesParams ¶
type SeriesParams struct {
Start OptLokiTime `json:",omitempty,omitzero"`
End OptLokiTime `json:",omitempty,omitzero"`
// A `duration` used to calculate `start` relative to `end`. If `end` is in the future, `start` is
// calculated as this duration before now. Any value specified for start supersedes this parameter.
Since OptPrometheusDuration `json:",omitempty,omitzero"`
Match []string `json:",omitempty"`
}
SeriesParams is parameters of series operation.
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 Stats ¶
type Stats struct{}
Ref: #/components/schemas/Stats
func (*Stats) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Stats) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Stream ¶
type Stream struct {
Stream OptLabelSet `json:"stream"`
Values []LogEntry `json:"values"`
}
Ref: #/components/schemas/Stream
func (*Stream) GetStream ¶
func (s *Stream) GetStream() OptLabelSet
GetStream returns the value of Stream.
func (*Stream) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Stream) SetStream ¶
func (s *Stream) SetStream(val OptLabelSet)
SetStream sets the value of Stream.
func (*Stream) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Streams ¶
type Streams []Stream
func (Streams) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Streams) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type StreamsResult ¶
Ref: #/components/schemas/StreamsResult
func (*StreamsResult) Decode ¶
func (s *StreamsResult) Decode(d *jx.Decoder) error
Decode decodes StreamsResult from json.
func (*StreamsResult) Encode ¶
func (s *StreamsResult) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*StreamsResult) GetResult ¶
func (s *StreamsResult) GetResult() Streams
GetResult returns the value of Result.
func (*StreamsResult) GetStats ¶
func (s *StreamsResult) GetStats() *Stats
GetStats returns the value of Stats.
func (*StreamsResult) MarshalJSON ¶
func (s *StreamsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*StreamsResult) SetResult ¶
func (s *StreamsResult) SetResult(val Streams)
SetResult sets the value of Result.
func (*StreamsResult) SetStats ¶
func (s *StreamsResult) SetStats(val *Stats)
SetStats sets the value of Stats.
func (*StreamsResult) UnmarshalJSON ¶
func (s *StreamsResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*StreamsResult) Validate ¶
func (s *StreamsResult) Validate() error
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) DetectedFieldValues ¶
func (UnimplementedHandler) DetectedFieldValues(ctx context.Context, params DetectedFieldValuesParams) (r *DetectedFieldValues, _ error)
DetectedFieldValues implements detectedFieldValues operation.
Get detected field values.
GET /loki/api/v1/detected_field/{field}/values
func (UnimplementedHandler) DetectedFields ¶
func (UnimplementedHandler) DetectedFields(ctx context.Context, params DetectedFieldsParams) (r *DetectedFields, _ error)
DetectedFields implements detectedFields operation.
Get detected fields.
GET /loki/api/v1/detected_fields
func (UnimplementedHandler) DetectedLabels ¶
func (UnimplementedHandler) DetectedLabels(ctx context.Context, params DetectedLabelsParams) (r *DetectedLabels, _ error)
DetectedLabels implements detectedLabels operation.
Get detected labels. Used by Grafana to test Logs Drilldown availability.
GET /loki/api/v1/detected_labels
func (UnimplementedHandler) DrilldownLimits ¶
func (UnimplementedHandler) DrilldownLimits(ctx context.Context) (r *DrilldownLimits, _ error)
DrilldownLimits implements drilldownLimits operation.
Get drilldown limits. Used by Grafana to get limits from Loki.
GET /loki/api/v1/drilldown-limits
func (UnimplementedHandler) IndexStats ¶
func (UnimplementedHandler) IndexStats(ctx context.Context, params IndexStatsParams) (r *IndexStats, _ error)
IndexStats implements indexStats operation.
Get index stats.
GET /loki/api/v1/index/stats
func (UnimplementedHandler) LabelValues ¶
func (UnimplementedHandler) LabelValues(ctx context.Context, params LabelValuesParams) (r *Values, _ error)
LabelValues implements labelValues operation.
Get values of label.
GET /loki/api/v1/label/{name}/values
func (UnimplementedHandler) Labels ¶
func (UnimplementedHandler) Labels(ctx context.Context, params LabelsParams) (r *Labels, _ error)
Labels implements labels operation.
Get labels. Used by Grafana to test connection to Loki.
GET /loki/api/v1/labels
func (UnimplementedHandler) NewError ¶
func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ErrorStatusCode)
NewError creates *ErrorStatusCode from error returned by handler.
Used for common default response.
func (UnimplementedHandler) Patterns ¶
func (UnimplementedHandler) Patterns(ctx context.Context, params PatternsParams) (r *Patterns, _ error)
Patterns implements patterns operation.
Endpoint can be used to query loki for patterns detected in the logs. This helps understand the structure of the logs Loki has ingested.
GET /loki/api/v1/patterns
func (UnimplementedHandler) Push ¶
func (UnimplementedHandler) Push(ctx context.Context, req PushReq) error
Push implements push operation.
Push data.
POST /loki/api/v1/push
func (UnimplementedHandler) Query ¶
func (UnimplementedHandler) Query(ctx context.Context, params QueryParams) (r *QueryResponse, _ error)
Query implements query operation.
Query.
GET /loki/api/v1/query
func (UnimplementedHandler) QueryRange ¶
func (UnimplementedHandler) QueryRange(ctx context.Context, params QueryRangeParams) (r *QueryResponse, _ error)
QueryRange implements queryRange operation.
Query range.
GET /loki/api/v1/query_range
func (UnimplementedHandler) QueryVolume ¶
func (UnimplementedHandler) QueryVolume(ctx context.Context, params QueryVolumeParams) (r *QueryResponse, _ error)
QueryVolume implements queryVolume operation.
Query the index for volume information about label and label-value combinations.
GET /loki/api/v1/index/volume
func (UnimplementedHandler) QueryVolumeRange ¶
func (UnimplementedHandler) QueryVolumeRange(ctx context.Context, params QueryVolumeRangeParams) (r *QueryResponse, _ error)
QueryVolumeRange implements queryVolumeRange operation.
Query the index for volume information about label and label-value combinations.
GET /loki/api/v1/index/volume_range
func (UnimplementedHandler) Series ¶
func (UnimplementedHandler) Series(ctx context.Context, params SeriesParams) (r *Maps, _ error)
Series implements series operation.
Get series.
GET /loki/api/v1/series
type Values ¶
Array of strings. Ref: #/components/schemas/Values
func (*Values) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Values) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Vector ¶
type Vector []Sample
func (Vector) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Vector) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type VectorResult ¶
Ref: #/components/schemas/VectorResult
func (*VectorResult) Decode ¶
func (s *VectorResult) Decode(d *jx.Decoder) error
Decode decodes VectorResult from json.
func (*VectorResult) Encode ¶
func (s *VectorResult) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*VectorResult) GetResult ¶
func (s *VectorResult) GetResult() Vector
GetResult returns the value of Result.
func (*VectorResult) GetStats ¶
func (s *VectorResult) GetStats() *Stats
GetStats returns the value of Stats.
func (*VectorResult) MarshalJSON ¶
func (s *VectorResult) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*VectorResult) SetResult ¶
func (s *VectorResult) SetResult(val Vector)
SetResult sets the value of Result.
func (*VectorResult) SetStats ¶
func (s *VectorResult) SetStats(val *Stats)
SetStats sets the value of Stats.
func (*VectorResult) UnmarshalJSON ¶
func (s *VectorResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*VectorResult) Validate ¶
func (s *VectorResult) Validate() error
Source Files
¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_defaults_gen.go
- oas_handlers_gen.go
- oas_interfaces_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