Documentation ¶
Index ¶
- type UserPreferences
- type UserPreferencesCrudRepository
- type UserPreferencesRepository
- func (u *UserPreferencesRepository) FindByBeerId(beerId uint) (*UserPreferences, error)
- func (u *UserPreferencesRepository) FindById(id uint) (*UserPreferences, error)
- func (u *UserPreferencesRepository) FindByUserEmail(email string) ([]*UserPreferences, error)
- func (u *UserPreferencesRepository) Save(preferences *UserPreferences) error
- type UserProfile
- type UserProfileCrudRepository
- type UserProfileRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserPreferences ¶
type UserPreferences struct { Id uint `bson:"_id,minsize"` BeerId uint `bson:"beer_id,minsize"` BeerName string `bson:"beer_name"` UserEmail string `bson:"user_email"` DrunkTheBeerBefore bool `bson:"drunk_the_beer_before"` GotDrunk bool `bson:"got_drunk"` LastTime string `bson:"last_time"` Rating uint `bson:"rating,minsize"` Comment string `bson:"comment"` }
type UserPreferencesCrudRepository ¶
type UserPreferencesCrudRepository interface { Save(preferences *UserPreferences) error FindById(id uint) (*UserPreferences, error) FindByBeerId(id uint) (*UserPreferences, error) FindByUserEmail(email string) ([]*UserPreferences, error) }
type UserPreferencesRepository ¶
type UserPreferencesRepository struct {
// contains filtered or unexported fields
}
func NewUserPreferencesRepository ¶
func NewUserPreferencesRepository( ctx context.Context, client *mongo.Client, ) *UserPreferencesRepository
func (*UserPreferencesRepository) FindByBeerId ¶
func (u *UserPreferencesRepository) FindByBeerId(beerId uint) (*UserPreferences, error)
func (*UserPreferencesRepository) FindById ¶
func (u *UserPreferencesRepository) FindById(id uint) (*UserPreferences, error)
func (*UserPreferencesRepository) FindByUserEmail ¶
func (u *UserPreferencesRepository) FindByUserEmail(email string) ([]*UserPreferences, error)
func (*UserPreferencesRepository) Save ¶
func (u *UserPreferencesRepository) Save(preferences *UserPreferences) error
type UserProfile ¶
type UserProfileCrudRepository ¶
type UserProfileCrudRepository interface { Save(user *UserProfile) error FindByEmail(email string) (*UserProfile, error) }
type UserProfileRepository ¶
type UserProfileRepository struct {
// contains filtered or unexported fields
}
func NewUserProfileRepository ¶
func NewUserProfileRepository( ctx context.Context, db *sql.DB, ) *UserProfileRepository
func (*UserProfileRepository) FindByEmail ¶
func (u *UserProfileRepository) FindByEmail(email string) (*UserProfile, error)
func (*UserProfileRepository) Save ¶
func (u *UserProfileRepository) Save(user *UserProfile) error
Click to show internal directories.
Click to hide internal directories.