datasource.go 698 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package models
  2. import "time"
  3. const (
  4. DS_GRAPHITE = "GRAPHITE"
  5. DS_INFLUXDB = "INFLUXDB"
  6. DS_ES = "ES"
  7. DS_ACCESS_DIRECT = "DIRECT"
  8. DS_ACCESS_PROXY = "PROXY"
  9. )
  10. type DsType string
  11. type DsAccess string
  12. type DataSource struct {
  13. Id int64
  14. AccountId int64
  15. Name string
  16. Type DsType
  17. Access DsAccess
  18. Url string
  19. Password string
  20. User string
  21. BasicAuth bool
  22. Created time.Time
  23. Updated time.Time
  24. }
  25. type GetDataSourcesQuery struct {
  26. AccountId int64
  27. Resp []*DataSource
  28. }
  29. type AddDataSourceCommand struct {
  30. AccountId int64
  31. Name string
  32. Type DsType
  33. Access DsAccess
  34. Url string
  35. Password string
  36. User string
  37. }