grafana/pkg/services/queryhistory/models.go
Ivana Huckova 4e37a53a1c
Query history: Create API to add query to query history (#44479)
* Create config to enable/disable query history

* Create add to query history functionality

* Add documentation

* Add test

* Refactor

* Add test

* Fix built errors and linting errors

* Refactor

* Remove old tests

* Refactor, adjust based on feedback, add new test

* Update default value
2022-01-28 17:55:09 +01:00

22 lines
664 B
Go

package queryhistory
import (
"github.com/grafana/grafana/pkg/components/simplejson"
)
type QueryHistory struct {
Id int64 `json:"id"`
Uid string `json:"uid"`
DatasourceUid string `json:"datasourceUid"`
OrgId int64 `json:"orgId"`
CreatedBy int64 `json:"createdBy"`
CreatedAt int64 `json:"createdAt"`
Comment string `json:"comment"`
Queries *simplejson.Json `json:"queries"`
}
type CreateQueryInQueryHistoryCommand struct {
DatasourceUid string `json:"datasourceUid"`
Queries *simplejson.Json `json:"queries"`
}