grafana/pkg/models/datasource.go

62 lines
958 B
Go
Raw Normal View History

2014-12-16 19:04:08 +08:00
package models
import "time"
const (
DS_GRAPHITE = "graphite"
DS_INFLUXDB = "influxdb"
DS_ES = "es"
DS_ACCESS_DIRECT = "direct"
DS_ACCESS_PROXY = "proxy"
2014-12-16 19:04:08 +08:00
)
type DsType string
type DsAccess string
type DataSource struct {
Id int64
AccountId int64
Name string
Type DsType
Access DsAccess
Url string
Password string
User string
BasicAuth bool
Created time.Time
Updated time.Time
}
type GetDataSourcesQuery struct {
AccountId int64
2014-12-18 00:32:22 +08:00
Result []*DataSource
2014-12-16 19:04:08 +08:00
}
2014-12-16 23:45:07 +08:00
type AddDataSourceCommand struct {
AccountId int64
Name string
Type DsType
Access DsAccess
Url string
Password string
User string
}
2014-12-18 00:32:22 +08:00
type UpdateDataSourceCommand struct {
Id int64
AccountId int64
Name string
Type DsType
Access DsAccess
Url string
Password string
User string
}
type DeleteDataSourceCommand struct {
Id int64
AccountId int64
}