store.go 698 B

1234567891011121314151617181920
  1. package stores
  2. import "github.com/torkelo/grafana-pro/pkg/models"
  3. type Store interface {
  4. GetDashboard(slug string, accountId int) (*models.Dashboard, error)
  5. SaveDashboard(dash *models.Dashboard) error
  6. DeleteDashboard(slug string, accountId int) error
  7. Query(query string, acccountId int) ([]*models.SearchResult, error)
  8. CreateAccount(acccount *models.Account) error
  9. UpdateAccount(acccount *models.Account) error
  10. GetAccountByLogin(emailOrName string) (*models.Account, error)
  11. GetAccount(accountId int) (*models.Account, error)
  12. GetOtherAccountsFor(accountId int) ([]*models.OtherAccount, error)
  13. Close()
  14. }
  15. func New() Store {
  16. return NewRethinkStore(&RethinkCfg{DatabaseName: "grafana"})
  17. }