added gravatar

This commit is contained in:
Torkel Ödegaard
2014-09-22 10:46:56 +02:00
parent ed8f5dbd22
commit b0b77d667c
15 changed files with 212 additions and 23 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ func (self *rethinkStore) GetAccountByLogin(emailOrName string) (*models.Account
var account models.Account
err = resp.One(&account)
if err != nil {
return nil, errors.New("Not found")
return nil, ErrAccountNotFound
}
return &account, nil
+7
View File
@@ -1,6 +1,8 @@
package stores
import (
"errors"
"github.com/torkelo/grafana-pro/pkg/models"
)
@@ -17,6 +19,11 @@ type Store interface {
Close()
}
// Typed errors
var (
ErrAccountNotFound = errors.New("Account not found")
)
func New() Store {
return NewRethinkStore(&RethinkCfg{DatabaseName: "grafana"})
}