Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store object, that is made to store information about DB
func (*Store) User ¶
func (s *Store) User() store.UserRepository
User func. If userrepository is nil assigns it with pointer on UserRepository which is initialised with calling store.
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
UserRepository object for storing store entities
func (*UserRepository) Create ¶
func (r *UserRepository) Create(u *model.User) error
Create func. Writing an email and encrypted password in the fields in DB that match to imported User.
func (*UserRepository) Find ¶
func (r *UserRepository) Find(id int) (*model.User, error)
Find func. Finding user with the right (id we need) id
func (*UserRepository) FindByEmail ¶
func (r *UserRepository) FindByEmail(email string) (*model.User, error)
FindByEmail func. Finding user with the right (email we need) email
Click to show internal directories.
Click to hide internal directories.