store.go 597 B

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