package dto

type PromResult struct {
	// see https://prometheus.io/docs/prometheus/latest/querying/api/#range-vectors
	Values [][]interface{} `json:"values"`
	// not used
	Metric map[string]string `json:"metric"`
}

type PromData struct {
	ResultType string       `json:"resultType"`
	Result     []PromResult `json:"result"`
}

type CommonPromMetricsRes struct {
	BasicRes
	Status string   `json:"status"`
	Data   PromData `json:"data"`
}

type EndpointsRankItem struct {
	EndpointName string  `json:"endpoint_name"`
	RankValueStr string  `json:"rank_value"`
	RankVal      float64 `json:"-"`
	EndpointId   string  `json:"endpoint_id"`
}

type CommonEndpointsRankRes struct {
	BasicRes
	Rank []EndpointsRankItem `json:"rank"`
}

type DataAppMiscStatusRes struct {
	BasicRes
	EndpointStat     EndpointStatistic `json:"endpoint"`
	DataAppAvailable bool              `json:"dataapp_available"`
	UniqueUser       int64             `json:"unique_user"`
}

type EndpointStatistic struct {
	Deloyed uint64 `json:"deployed"`
	Draft   uint64 `json:"draft"`
}
