Work on data source proxying, #6

This commit is contained in:
Torkel Ödegaard
2014-12-18 20:26:06 +01:00
parent d69258e28f
commit a2a0e0394d
5 changed files with 98 additions and 3 deletions
+15 -1
View File
@@ -1,6 +1,9 @@
package models
import "time"
import (
"errors"
"time"
)
const (
DS_GRAPHITE = "graphite"
@@ -10,6 +13,11 @@ const (
DS_ACCESS_PROXY = "proxy"
)
// Typed errors
var (
ErrDataSourceNotFound = errors.New("Data source not found")
)
type DsType string
type DsAccess string
@@ -34,6 +42,12 @@ type GetDataSourcesQuery struct {
Result []*DataSource
}
type GetDataSourceByNameQuery struct {
Name string
AccountId int64
Result DataSource
}
type AddDataSourceCommand struct {
AccountId int64
Name string