mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
21 lines
698 B
Go
21 lines
698 B
Go
package stores
|
|
|
|
import "github.com/torkelo/grafana-pro/pkg/models"
|
|
|
|
type Store interface {
|
|
GetDashboard(slug string, accountId int) (*models.Dashboard, error)
|
|
SaveDashboard(dash *models.Dashboard) error
|
|
DeleteDashboard(slug string, accountId int) error
|
|
Query(query string, acccountId int) ([]*models.SearchResult, error)
|
|
CreateAccount(acccount *models.Account) error
|
|
UpdateAccount(acccount *models.Account) error
|
|
GetAccountByLogin(emailOrName string) (*models.Account, error)
|
|
GetAccount(accountId int) (*models.Account, error)
|
|
GetOtherAccountsFor(accountId int) ([]*models.OtherAccount, error)
|
|
Close()
|
|
}
|
|
|
|
func New() Store {
|
|
return NewRethinkStore(&RethinkCfg{DatabaseName: "grafana"})
|
|
}
|