Documentation ¶
Index ¶
- Variables
- type Storage
- func (s *Storage) AddPost(p adder.Post) error
- func (s *Storage) DeletePost(p remover.Post) error
- func (s *Storage) DeleteUser(u remover.User)
- func (s *Storage) GetPost(p lister.Post) (lister.Post, error)
- func (s *Storage) GetUser(email string) (interface{}, error)
- func (s *Storage) IsAuthenticated() error
- func (s *Storage) Login(u auth.User) (interface{}, error)
- func (s *Storage) Logout() error
- func (s *Storage) Register(u auth.User) error
- func (s *Storage) UpdatePost(p updater.Post) error
- func (s *Storage) UpdateUser(email string, u updater.User)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ExistingUser indicates that the email is already registered ErrEmailAlreadyRegistered = errors.New("email address is already registered") // ErrReadingUserFromDB indicates that there was a problem while getting the user from the DB ErrReadingUserFromDB = errors.New("error reading user from db") // ErrEmailPassword indicates that the email or password dont match ErrEmailPassword = errors.New("wrong email/password") // ErrSavingUserInDB indicates that the there was an error while inserting a User in the DB ErrSavingUserInDB = errors.New("wrong email/password") // ErrSavingPostInDB indicates that the there was an error while inserting a Post in the DB ErrSavingPostInDB = errors.New("error saving Post in DB") )
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func NewStorage() *Storage
func (*Storage) DeleteUser ¶
func (*Storage) IsAuthenticated ¶
Click to show internal directories.
Click to hide internal directories.