Documentation ¶
Index ¶
- func TestDB(t *testing.T, databaseURL string) (*gorm.DB, func(...string))
- type Store
- type UserRepository
- func (r *UserRepository) ClaimToken(u *model.User, token string)
- func (r *UserRepository) Create(u *model.User) error
- func (r *UserRepository) CreateProfile(u *model.User) error
- func (r *UserRepository) EditAbout(id int, about string) error
- func (r *UserRepository) EditPass(u *model.User) error
- func (r *UserRepository) FindByEmail(email string) (*model.User, error)
- func (r *UserRepository) GetProfile(email string) *model.Profile
- func (r *UserRepository) GetToken(token string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the struct of db
func (*Store) User ¶
func (s *Store) User() store.UserRepository
User returning UserRepository inteface
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
UserRepository a struct with store
func (*UserRepository) ClaimToken ¶
func (r *UserRepository) ClaimToken(u *model.User, token string)
ClaimToken set a new token to db
func (*UserRepository) Create ¶
func (r *UserRepository) Create(u *model.User) error
Create a user row in db
func (*UserRepository) CreateProfile ¶
func (r *UserRepository) CreateProfile(u *model.User) error
CreateProfile ctreating a profile
func (*UserRepository) EditAbout ¶
func (r *UserRepository) EditAbout(id int, about string) error
EditAbout editing about
func (*UserRepository) EditPass ¶
func (r *UserRepository) EditPass(u *model.User) error
EditPass changing a password to new
func (*UserRepository) FindByEmail ¶
func (r *UserRepository) FindByEmail(email string) (*model.User, error)
FindByEmail finding user in DB by email-addr
func (*UserRepository) GetProfile ¶
func (r *UserRepository) GetProfile(email string) *model.Profile
GetProfile Getting profile
Click to show internal directories.
Click to hide internal directories.