Documentation ¶
Index ¶
- Variables
- type AnswerRepository
- func (r *AnswerRepository) CreateAnswer(answer models.Answer) (*models.Answer, error)
- func (r *AnswerRepository) DeleteAnswer(answer models.Answer) error
- func (r *AnswerRepository) FindAnswer(filter models.Answer) (*models.Answer, error)
- func (r *AnswerRepository) FindListAnswerByUserId(userId string) ([]models.Answer, error)
- type IAnswerRepository
- type IMatchRepository
- type IProfileRepository
- type IQuestionRepository
- type IRecommendationBinRepository
- type IUserRepository
- type MatchRepository
- type ProfileRepository
- func (r *ProfileRepository) CreateProfile(profile models.Profile) (*models.Profile, error)
- func (r *ProfileRepository) DeleteProfileById(id string) error
- func (r *ProfileRepository) GetListProfile(filter models.ProfileFilter) ([]models.Profile, error)
- func (r *ProfileRepository) GetProfileById(id string) (*models.Profile, error)
- func (r *ProfileRepository) UpdateProfileById(id string, profile models.Profile) (*models.Profile, error)
- func (r *ProfileRepository) UpdateProfileImageById(id string, slots []int) (*models.Profile, error)
- type QuestionRepository
- type RecommendationBinRepository
- type UserRepository
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( fx.Provide(NewUserRepository), fx.Provide(NewProfileRepository), fx.Provide(NewAnswerRepository), fx.Provide(NewMatchRepository), fx.Provide(NewQuestionRepository), fx.Provide(NewRecommendationBinRepository), )
Module exports dependency
Functions ¶
This section is empty.
Types ¶
type AnswerRepository ¶
func (*AnswerRepository) CreateAnswer ¶
func (*AnswerRepository) DeleteAnswer ¶
func (r *AnswerRepository) DeleteAnswer(answer models.Answer) error
func (*AnswerRepository) FindAnswer ¶
func (*AnswerRepository) FindListAnswerByUserId ¶
func (r *AnswerRepository) FindListAnswerByUserId(userId string) ([]models.Answer, error)
type IAnswerRepository ¶
type IAnswerRepository interface { CreateAnswer(models.Answer) (*models.Answer, error) FindAnswer(models.Answer) (*models.Answer, error) FindListAnswerByUserId(userId string) ([]models.Answer, error) DeleteAnswer(models.Answer) error }
func NewAnswerRepository ¶
func NewAnswerRepository(database *core.Database, logger *core.Logger) IAnswerRepository
type IMatchRepository ¶
type IMatchRepository interface { First(string, string) (*models.Match, error) Create(models.Match) error Update(models.Match) error }
func NewMatchRepository ¶
func NewMatchRepository(db *core.Database, logger *core.Logger) IMatchRepository
type IProfileRepository ¶
type IProfileRepository interface { CreateProfile(models.Profile) (*models.Profile, error) GetProfileById(string) (*models.Profile, error) GetListProfile(models.ProfileFilter) ([]models.Profile, error) UpdateProfileById(string, models.Profile) (*models.Profile, error) UpdateProfileImageById(string, []int) (*models.Profile, error) DeleteProfileById(string) error }
func NewProfileRepository ¶
func NewProfileRepository(db *core.Database, logger *core.Logger) IProfileRepository
type IQuestionRepository ¶
func NewQuestionRepository ¶
func NewQuestionRepository(db *core.Database, logger *core.Logger) IQuestionRepository
NewQuestionRepository creates a new user repository
type IRecommendationBinRepository ¶
type IRecommendationBinRepository interface { GetRecommendedUserByUserId(string) ([]models.RecommendationBin, error) Create(models.RecommendationBin) error }
func NewRecommendationBinRepository ¶
func NewRecommendationBinRepository(db *core.Database, logger *core.Logger) IRecommendationBinRepository
NewRecommendationBinRepository creates a new user repository
type IUserRepository ¶
type IUserRepository interface { Create(models.User) error First(models.OneUserFilter) (*models.User, error) UpdateById(string, models.User) error }
func NewUserRepository ¶
func NewUserRepository(db *core.Database, logger *core.Logger) IUserRepository
NewUserRepository creates a new user repository
type MatchRepository ¶
type ProfileRepository ¶
func (*ProfileRepository) CreateProfile ¶
func (*ProfileRepository) DeleteProfileById ¶
func (r *ProfileRepository) DeleteProfileById(id string) error
func (*ProfileRepository) GetListProfile ¶
func (r *ProfileRepository) GetListProfile(filter models.ProfileFilter) ([]models.Profile, error)
func (*ProfileRepository) GetProfileById ¶
func (r *ProfileRepository) GetProfileById(id string) (*models.Profile, error)
func (*ProfileRepository) UpdateProfileById ¶
func (*ProfileRepository) UpdateProfileImageById ¶
type QuestionRepository ¶
QuestionRepository database structure
func (*QuestionRepository) GetListQuestions ¶
func (r *QuestionRepository) GetListQuestions() ([]*models.Question, error)
type RecommendationBinRepository ¶
type RecommendationBinRepository struct { *core.Database // contains filtered or unexported fields }
RecommendationBinRepository database structure
func (*RecommendationBinRepository) Create ¶
func (r *RecommendationBinRepository) Create(recommendedUser models.RecommendationBin) error
func (*RecommendationBinRepository) GetRecommendedUserByUserId ¶
func (r *RecommendationBinRepository) GetRecommendedUserByUserId(userId string) ([]models.RecommendationBin, error)
type UserRepository ¶
UserRepository database structure
func (*UserRepository) First ¶
func (r *UserRepository) First(filter models.OneUserFilter) (user *models.User, err error)
func (*UserRepository) UpdateById ¶
func (r *UserRepository) UpdateById(id string, user models.User) error
Click to show internal directories.
Click to hide internal directories.