Documentation ¶
Overview ¶
Package service wraps user interfaces with common logic unrelated to any particular user implementation. All consumers should be using service.DataStore and not the naked repositories!
Index ¶
- type DataStore
- func (s *DataStore) AddUser(user store.User, password string) (id string, err error)
- func (s *DataStore) CheckUserCredentials(email string, password string) (ok bool, err error)
- func (s *DataStore) GetUserEmail(id string) (email string, err error)
- func (s *DataStore) GetUserPrivs(id string) (privs []store.Privilege, err error)
- func (s *DataStore) RegisterAdmin(email string, password string) (id string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataStore ¶
DataStore wraps all stores with common and additional methods todo looks ugly, rewrite
func (*DataStore) CheckUserCredentials ¶
CheckUserCredentials with the given username and password
func (*DataStore) GetUserEmail ¶
GetUserEmail returns the email of the specified user
func (*DataStore) GetUserPrivs ¶
GetUserPrivs returns the list of privileges of the specified user
Click to show internal directories.
Click to hide internal directories.