repositories

package
v0.0.0-...-474b416 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2024 License: 0BSD Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Module exports dependency

Functions

This section is empty.

Types

type AnswerRepository

type AnswerRepository struct {
	*core.Database
	// contains filtered or unexported fields
}

func (*AnswerRepository) CreateAnswer

func (r *AnswerRepository) CreateAnswer(answer models.Answer) (*models.Answer, error)

func (*AnswerRepository) DeleteAnswer

func (r *AnswerRepository) DeleteAnswer(answer models.Answer) error

func (*AnswerRepository) FindAnswer

func (r *AnswerRepository) FindAnswer(filter models.Answer) (*models.Answer, error)

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

type IQuestionRepository interface {
	GetListQuestions() ([]*models.Question, error)
}

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 MatchRepository struct {
	*core.Database
	// contains filtered or unexported fields
}

func (*MatchRepository) Create

func (r *MatchRepository) Create(match models.Match) error

func (*MatchRepository) First

func (r *MatchRepository) First(matcherId, matcheeId string) (*models.Match, error)

func (*MatchRepository) Update

func (r *MatchRepository) Update(match models.Match) error

type ProfileRepository

type ProfileRepository struct {
	*core.Database
	// contains filtered or unexported fields
}

func (*ProfileRepository) CreateProfile

func (r *ProfileRepository) CreateProfile(profile models.Profile) (*models.Profile, error)

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 (r *ProfileRepository) UpdateProfileById(id string, profile models.Profile) (*models.Profile, error)

func (*ProfileRepository) UpdateProfileImageById

func (r *ProfileRepository) UpdateProfileImageById(id string, slots []int) (*models.Profile, error)

type QuestionRepository

type QuestionRepository struct {
	*core.Database
	// contains filtered or unexported fields
}

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

type UserRepository struct {
	*core.Database
	// contains filtered or unexported fields
}

UserRepository database structure

func (*UserRepository) Create

func (r *UserRepository) Create(user models.User) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL