2021-01-03 18:15:44 +05:30
|
|
|
package model
|
|
|
|
|
|
2021-05-29 16:32:11 +05:30
|
|
|
import (
|
|
|
|
|
"fmt"
|
|
|
|
|
"time"
|
|
|
|
|
)
|
2021-01-03 18:15:44 +05:30
|
|
|
|
2021-12-02 18:31:05 +05:30
|
|
|
type User struct {
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Email string `json:"email"`
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-29 10:28:40 +05:30
|
|
|
type InstantQueryMetricsParams struct {
|
|
|
|
|
Time time.Time
|
|
|
|
|
Query string
|
|
|
|
|
Stats string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type QueryRangeParams struct {
|
|
|
|
|
Start time.Time
|
|
|
|
|
End time.Time
|
|
|
|
|
Step time.Duration
|
|
|
|
|
Query string
|
|
|
|
|
Stats string
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-03 18:15:44 +05:30
|
|
|
type GetTopEndpointsParams struct {
|
|
|
|
|
StartTime string
|
|
|
|
|
EndTime string
|
|
|
|
|
ServiceName string
|
2021-05-31 11:14:11 +05:30
|
|
|
Start *time.Time
|
|
|
|
|
End *time.Time
|
2021-01-03 18:15:44 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type GetUsageParams struct {
|
|
|
|
|
StartTime string
|
|
|
|
|
EndTime string
|
|
|
|
|
ServiceName string
|
|
|
|
|
Period string
|
2021-05-31 11:14:11 +05:30
|
|
|
StepHour int
|
|
|
|
|
Start *time.Time
|
|
|
|
|
End *time.Time
|
2021-01-03 18:15:44 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type GetServicesParams struct {
|
|
|
|
|
StartTime string
|
|
|
|
|
EndTime string
|
|
|
|
|
Period int
|
2021-05-29 16:32:11 +05:30
|
|
|
Start *time.Time
|
|
|
|
|
End *time.Time
|
2021-01-03 18:15:44 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type GetServiceOverviewParams struct {
|
|
|
|
|
StartTime string
|
|
|
|
|
EndTime string
|
2021-05-29 16:32:11 +05:30
|
|
|
Start *time.Time
|
|
|
|
|
End *time.Time
|
2021-01-03 18:15:44 +05:30
|
|
|
ServiceName string
|
|
|
|
|
Period string
|
|
|
|
|
StepSeconds int
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ApplicationPercentileParams struct {
|
|
|
|
|
ServiceName string
|
|
|
|
|
GranOrigin string
|
|
|
|
|
GranPeriod string
|
|
|
|
|
Intervals string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (query *ApplicationPercentileParams) SetGranPeriod(step int) {
|
|
|
|
|
minutes := step / 60
|
|
|
|
|
query.GranPeriod = fmt.Sprintf("PT%dM", minutes)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type TagQuery struct {
|
|
|
|
|
Key string
|
|
|
|
|
Value string
|
|
|
|
|
Operator string
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-26 20:41:59 +05:30
|
|
|
type TagQueryV2 struct {
|
|
|
|
|
Key string
|
|
|
|
|
Values []string
|
|
|
|
|
Operator string
|
|
|
|
|
}
|
2021-01-03 18:15:44 +05:30
|
|
|
type SpanSearchAggregatesParams struct {
|
|
|
|
|
ServiceName string
|
|
|
|
|
OperationName string
|
2021-05-06 17:34:55 +05:30
|
|
|
Kind string
|
2021-01-03 18:15:44 +05:30
|
|
|
MinDuration string
|
|
|
|
|
MaxDuration string
|
|
|
|
|
Tags []TagQuery
|
2021-06-02 18:34:03 +05:30
|
|
|
Start *time.Time
|
|
|
|
|
End *time.Time
|
2021-01-03 18:15:44 +05:30
|
|
|
GranOrigin string
|
|
|
|
|
GranPeriod string
|
|
|
|
|
Intervals string
|
|
|
|
|
StepSeconds int
|
|
|
|
|
Dimension string
|
|
|
|
|
AggregationOption string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type SpanSearchParams struct {
|
|
|
|
|
ServiceName string
|
|
|
|
|
OperationName string
|
2021-05-06 17:34:55 +05:30
|
|
|
Kind string
|
2021-01-03 18:15:44 +05:30
|
|
|
Intervals string
|
2021-05-29 16:32:11 +05:30
|
|
|
Start *time.Time
|
|
|
|
|
End *time.Time
|
2021-01-03 18:15:44 +05:30
|
|
|
MinDuration string
|
|
|
|
|
MaxDuration string
|
|
|
|
|
Limit int64
|
|
|
|
|
Order string
|
|
|
|
|
Offset int64
|
|
|
|
|
BatchSize int64
|
|
|
|
|
Tags []TagQuery
|
|
|
|
|
}
|
2021-10-20 13:18:19 +05:30
|
|
|
|
2022-01-26 20:41:59 +05:30
|
|
|
type GetFilteredSpansParams struct {
|
|
|
|
|
ServiceName []string
|
|
|
|
|
Operation []string
|
|
|
|
|
Kind string
|
|
|
|
|
Status []string
|
|
|
|
|
HttpRoute []string
|
|
|
|
|
HttpCode []string
|
|
|
|
|
HttpUrl []string
|
|
|
|
|
HttpHost []string
|
|
|
|
|
HttpMethod []string
|
|
|
|
|
Component []string
|
|
|
|
|
Start *time.Time
|
|
|
|
|
End *time.Time
|
|
|
|
|
MinDuration string
|
|
|
|
|
MaxDuration string
|
|
|
|
|
Limit int64
|
|
|
|
|
Order string
|
|
|
|
|
Offset int64
|
|
|
|
|
Tags []TagQueryV2
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type GetFilteredSpanAggregatesParams struct {
|
|
|
|
|
ServiceName []string
|
|
|
|
|
Operation []string
|
|
|
|
|
Kind string
|
|
|
|
|
Status []string
|
|
|
|
|
HttpRoute []string
|
|
|
|
|
HttpCode []string
|
|
|
|
|
HttpUrl []string
|
|
|
|
|
HttpHost []string
|
|
|
|
|
HttpMethod []string
|
|
|
|
|
Component []string
|
|
|
|
|
MinDuration string
|
|
|
|
|
MaxDuration string
|
|
|
|
|
Tags []TagQueryV2
|
|
|
|
|
Start *time.Time
|
|
|
|
|
End *time.Time
|
|
|
|
|
StepSeconds int
|
|
|
|
|
Dimension string
|
|
|
|
|
AggregationOption string
|
|
|
|
|
GroupBy string
|
|
|
|
|
Function string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type SpanFilterParams struct {
|
|
|
|
|
Status []string
|
|
|
|
|
ServiceName []string
|
|
|
|
|
HttpRoute []string
|
|
|
|
|
HttpCode []string
|
|
|
|
|
HttpUrl []string
|
|
|
|
|
HttpHost []string
|
|
|
|
|
HttpMethod []string
|
|
|
|
|
Component []string
|
|
|
|
|
Operation []string
|
|
|
|
|
GetFilters []string
|
|
|
|
|
MinDuration string
|
|
|
|
|
MaxDuration string
|
|
|
|
|
Start *time.Time
|
|
|
|
|
End *time.Time
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type TagFilterParams struct {
|
|
|
|
|
Status []string
|
|
|
|
|
ServiceName []string
|
|
|
|
|
HttpRoute []string
|
|
|
|
|
HttpCode []string
|
|
|
|
|
HttpUrl []string
|
|
|
|
|
HttpHost []string
|
|
|
|
|
HttpMethod []string
|
|
|
|
|
Component []string
|
|
|
|
|
Operation []string
|
|
|
|
|
MinDuration string
|
|
|
|
|
MaxDuration string
|
|
|
|
|
Start *time.Time
|
|
|
|
|
End *time.Time
|
|
|
|
|
}
|
2021-10-20 13:18:19 +05:30
|
|
|
type TTLParams struct {
|
|
|
|
|
Type string
|
|
|
|
|
Duration string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type GetTTLParams struct {
|
|
|
|
|
Type string
|
|
|
|
|
GetAllTTL bool
|
|
|
|
|
}
|
2022-01-21 00:31:58 +05:30
|
|
|
|
|
|
|
|
type GetErrorsParams struct {
|
|
|
|
|
Start *time.Time
|
|
|
|
|
End *time.Time
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type GetErrorParams struct {
|
|
|
|
|
ErrorType string
|
|
|
|
|
ErrorID string
|
|
|
|
|
ServiceName string
|
|
|
|
|
}
|