Documentation
¶
Index ¶
- type PostgresRepository
- func (s *PostgresRepository) CheckIfUserCanViewProfile(guest_id, host_id int) (bool, error)
- func (s *PostgresRepository) CheckUserExistance(userUserName string) (bool, error)
- func (s *PostgresRepository) DeleteUserIntrests(user_id int) error
- func (s *PostgresRepository) GetChatList(guest_id int, obj *s3.S3) (*pb.ChatListResponse, error)
- func (s *PostgresRepository) GetHouseImagesCount(user_id int) (int, error)
- func (s *PostgresRepository) GetIdFromUsername(username string) (int, error)
- func (s *PostgresRepository) GetInterestsOfUser(user_id int) ([]string, error)
- func (s *PostgresRepository) GetLanguagesOfUser(user_id int) ([]string, error)
- func (s *PostgresRepository) GetPublicProfile(username string) (*pb.PublicProfileResponse, int, error)
- func (s *PostgresRepository) GetPublicProfileHost(guest_id int, host_username string) (*pb.PublicProfileHostResponse, string, error)
- func (s *PostgresRepository) GetUserDetails(username string) (*pb.ProfileDetailsResponse, error)
- func (s *PostgresRepository) GetUserNameByID(user_id int) (string, error)
- func (s *PostgresRepository) GetUserPassword(username string) (string, error)
- func (s *PostgresRepository) InsertChatList(host_id, guest_id, announcement_id int) error
- func (s *PostgresRepository) InsertUserInterest(user_id int, interest string) error
- func (s *PostgresRepository) InsertUserLanguage(user_id int, lang string) error
- func (s *PostgresRepository) UpdateOfferStatus(announcement_id, host_id int) error
- func (s *PostgresRepository) UpdateUserInformation(username string, userInfo *pb.EditProfileRequest) error
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresRepository ¶
func (*PostgresRepository) CheckIfUserCanViewProfile ¶
func (s *PostgresRepository) CheckIfUserCanViewProfile(guest_id, host_id int) (bool, error)
func (*PostgresRepository) CheckUserExistance ¶
func (s *PostgresRepository) CheckUserExistance(userUserName string) (bool, error)
func (*PostgresRepository) DeleteUserIntrests ¶
func (s *PostgresRepository) DeleteUserIntrests(user_id int) error
func (*PostgresRepository) GetChatList ¶
func (s *PostgresRepository) GetChatList(guest_id int, obj *s3.S3) (*pb.ChatListResponse, error)
func (*PostgresRepository) GetHouseImagesCount ¶
func (s *PostgresRepository) GetHouseImagesCount(user_id int) (int, error)
func (*PostgresRepository) GetIdFromUsername ¶
func (s *PostgresRepository) GetIdFromUsername(username string) (int, error)
func (*PostgresRepository) GetInterestsOfUser ¶
func (s *PostgresRepository) GetInterestsOfUser(user_id int) ([]string, error)
func (*PostgresRepository) GetLanguagesOfUser ¶
func (s *PostgresRepository) GetLanguagesOfUser(user_id int) ([]string, error)
func (*PostgresRepository) GetPublicProfile ¶
func (s *PostgresRepository) GetPublicProfile(username string) (*pb.PublicProfileResponse, int, error)
func (*PostgresRepository) GetPublicProfileHost ¶
func (s *PostgresRepository) GetPublicProfileHost(guest_id int, host_username string) (*pb.PublicProfileHostResponse, string, error)
func (*PostgresRepository) GetUserDetails ¶
func (s *PostgresRepository) GetUserDetails(username string) (*pb.ProfileDetailsResponse, error)
func (*PostgresRepository) GetUserNameByID ¶
func (s *PostgresRepository) GetUserNameByID(user_id int) (string, error)
func (*PostgresRepository) GetUserPassword ¶
func (s *PostgresRepository) GetUserPassword(username string) (string, error)
func (*PostgresRepository) InsertChatList ¶
func (s *PostgresRepository) InsertChatList(host_id, guest_id, announcement_id int) error
func (*PostgresRepository) InsertUserInterest ¶
func (s *PostgresRepository) InsertUserInterest(user_id int, interest string) error
func (*PostgresRepository) InsertUserLanguage ¶
func (s *PostgresRepository) InsertUserLanguage(user_id int, lang string) error
func (*PostgresRepository) UpdateOfferStatus ¶
func (s *PostgresRepository) UpdateOfferStatus(announcement_id, host_id int) error
func (*PostgresRepository) UpdateUserInformation ¶
func (s *PostgresRepository) UpdateUserInformation(username string, userInfo *pb.EditProfileRequest) error
type Repository ¶
type Repository interface { GetUserDetails(usename string) (*pb.ProfileDetailsResponse, error) UpdateUserInformation(username string, userInfo *pb.EditProfileRequest) error CheckUserExistance(userUserName string) (bool, error) GetUserPassword(username string) (string, error) GetPublicProfile(username string) (*pb.PublicProfileResponse, int, error) GetPublicProfileHost(guest_id int, host_username string) (*pb.PublicProfileHostResponse, string, error) GetIdFromUsername(username string) (int, error) InsertChatList(host_id, guest_id, announcement_id int) error GetChatList(guest_id int, obj *s3.S3) (*pb.ChatListResponse, error) GetHouseImagesCount(user_id int) (int, error) UpdateOfferStatus(announcement_id, host_id int) error InsertUserLanguage(user_id int, lang string) error InsertUserInterest(user_id int, interest string) error GetLanguagesOfUser(user_id int) ([]string, error) GetInterestsOfUser(user_id int) ([]string, error) DeleteUserIntrests(user_id int) error }
func NewPostgresRepository ¶
func NewPostgresRepository(db *sql.DB) Repository
Click to show internal directories.
Click to hide internal directories.