Documentation ¶
Index ¶
- type JokeRepository
- func (j JokeRepository) AddTagToJoke(joke_id int, tag_id int) (err error)
- func (j JokeRepository) AddToFavorite(user_id int, joke_id int) (err error)
- func (j JokeRepository) CheckIfInFavorite(user_id int, joke_id int) (amount int, err error)
- func (j JokeRepository) Create(joke *models.Joke) (id int64, err error)
- func (j JokeRepository) Delete(joke_id int) (err error)
- func (j JokeRepository) DeleteFromFavorite(user_id int, joke_id int) (err error)
- func (j JokeRepository) DeleteTagFromJoke(joke_id int, tag_id int) (err error)
- func (j JokeRepository) GetJokeByID(joke_id int) (jokeOut *models.Joke, err error)
- func (j JokeRepository) GetJokeTags(joke_id int) (tags []models.Tag, err error)
- func (j JokeRepository) GetJokesByKeyword(keyword string, page int, pageSize int, sort_mode string) (jokes []models.Joke, amount int, err error)
- func (j JokeRepository) GetJokesByTag(tag_name string, page int, pageSize int, sort_mode string) (jokes []models.Joke, amount int, err error)
- func (j JokeRepository) GetPageOfJokes(page int, per_page int, sort_mode string) (jokes []models.Joke, amount int, err error)
- func (j JokeRepository) GetUserFavoriteJokes(user_id int, page int, pageSize int, sort_mode string) (jokes []models.Joke, amount int, err error)
- func (j JokeRepository) GetUserJokes(user_id int, page int, pageSize int, sort_mode string) (jokes []models.Joke, amount int, err error)
- func (j JokeRepository) GetUserSubscribedJokes(user_id int, page int, pageSize int, sort_mode string) (jokes []models.Joke, amount int, err error)
- func (j JokeRepository) SubscribeToUser(receiver_id int, sender_id int) (err error)
- func (j JokeRepository) UnSubscribeFromUser(receiver_id int, sender_id int) (err error)
- type ReportRepository
- func (r ReportRepository) Create(report *models.Report) (id int64, err error)
- func (r ReportRepository) Delete(report_id int) (err error)
- func (r ReportRepository) GetAllReports() (reportsOut *models.ReportResponse, err error)
- func (r ReportRepository) GetReportByID(report_id int) (reportOut *models.Report, err error)
- type TagRepository
- type UserRepository
- func (u UserRepository) Ban(user_id int) (err error)
- func (u UserRepository) ChangeUserName(user_id int, new_name string) (err error)
- func (u UserRepository) ChangeUserPassword(user_id int, new_transformed_password string) (err error)
- func (u UserRepository) ChangeUserRemainingReports(user_sender_id int) (err error)
- func (u UserRepository) ChangeUserReportsCount(user_receiver_id int) (err error)
- func (u UserRepository) CreateGithubUserWithID(user_id int, inner_id int) (err error)
- func (u UserRepository) CreateUser(user *models.UserRequestRegister) (id int64, err error)
- func (u UserRepository) Delete(user_id int) (err error)
- func (u UserRepository) GetAll() (users []models.User, amount int, err error)
- func (u UserRepository) GetCheckIfUserSubscribed(sender_id int, receiver_id int) (check bool, err error)
- func (u UserRepository) GetPeopleByKeyword(keyword string, page int, pageSize int) (users []models.UserResponseSearch, amount int, err error)
- func (u UserRepository) GetSubscribedPeopleCount(user_id int) (amount int, err error)
- func (u UserRepository) GetUserByEmail(Email string) (userOut *models.User, err error)
- func (u UserRepository) GetUserByGithubID(user_id int) (userOut *models.GitUser, err error)
- func (u UserRepository) GetUserByID(user_id int) (userOut *models.User, err error)
- func (u UserRepository) GetUserByUsername(username string) (userOut *models.User, err error)
- func (u UserRepository) GetUserJokesCount(user_id int) (amount int, err error)
- func (u UserRepository) GetUserUnbanDate(user_id int) (unban_date string, err error)
- func (u UserRepository) GetWhomUserSubscribedTo(user_id int) (users []int, err error)
- func (u UserRepository) GetWhomUserSubscribedToCount(user_id int) (amount int, err error)
- func (u UserRepository) SetRemainingReports()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JokeRepository ¶
type JokeRepository struct {
// contains filtered or unexported fields
}
func (JokeRepository) AddTagToJoke ¶
func (j JokeRepository) AddTagToJoke(joke_id int, tag_id int) (err error)
func (JokeRepository) AddToFavorite ¶
func (j JokeRepository) AddToFavorite(user_id int, joke_id int) (err error)
func (JokeRepository) CheckIfInFavorite ¶
func (j JokeRepository) CheckIfInFavorite(user_id int, joke_id int) (amount int, err error)
func (JokeRepository) Create ¶
func (j JokeRepository) Create(joke *models.Joke) (id int64, err error)
func (JokeRepository) Delete ¶
func (j JokeRepository) Delete(joke_id int) (err error)
func (JokeRepository) DeleteFromFavorite ¶
func (j JokeRepository) DeleteFromFavorite(user_id int, joke_id int) (err error)
func (JokeRepository) DeleteTagFromJoke ¶
func (j JokeRepository) DeleteTagFromJoke(joke_id int, tag_id int) (err error)
func (JokeRepository) GetJokeByID ¶
func (j JokeRepository) GetJokeByID(joke_id int) (jokeOut *models.Joke, err error)
func (JokeRepository) GetJokeTags ¶
func (j JokeRepository) GetJokeTags(joke_id int) (tags []models.Tag, err error)
func (JokeRepository) GetJokesByKeyword ¶
func (JokeRepository) GetJokesByTag ¶
func (JokeRepository) GetPageOfJokes ¶
func (JokeRepository) GetUserFavoriteJokes ¶
func (JokeRepository) GetUserJokes ¶
func (JokeRepository) GetUserSubscribedJokes ¶
func (JokeRepository) SubscribeToUser ¶
func (j JokeRepository) SubscribeToUser(receiver_id int, sender_id int) (err error)
func (JokeRepository) UnSubscribeFromUser ¶
func (j JokeRepository) UnSubscribeFromUser(receiver_id int, sender_id int) (err error)
type ReportRepository ¶
type ReportRepository struct {
// contains filtered or unexported fields
}
func (ReportRepository) Create ¶
func (r ReportRepository) Create(report *models.Report) (id int64, err error)
func (ReportRepository) Delete ¶
func (r ReportRepository) Delete(report_id int) (err error)
func (ReportRepository) GetAllReports ¶
func (r ReportRepository) GetAllReports() (reportsOut *models.ReportResponse, err error)
func (ReportRepository) GetReportByID ¶
func (r ReportRepository) GetReportByID(report_id int) (reportOut *models.Report, err error)
type TagRepository ¶
type TagRepository struct {
// contains filtered or unexported fields
}
func (TagRepository) Delete ¶
func (t TagRepository) Delete(tag_name string) (err error)
func (TagRepository) GetAllTags ¶
func (t TagRepository) GetAllTags() (tagsOut []models.Tag, amount int, err error)
func (TagRepository) GetTagByID ¶
func (t TagRepository) GetTagByID(tag_id int) (tagOut *models.Tag, err error)
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
func (UserRepository) Ban ¶
func (u UserRepository) Ban(user_id int) (err error)
func (UserRepository) ChangeUserName ¶
func (u UserRepository) ChangeUserName(user_id int, new_name string) (err error)
func (UserRepository) ChangeUserPassword ¶
func (u UserRepository) ChangeUserPassword(user_id int, new_transformed_password string) (err error)
func (UserRepository) ChangeUserRemainingReports ¶
func (u UserRepository) ChangeUserRemainingReports(user_sender_id int) (err error)
func (UserRepository) ChangeUserReportsCount ¶
func (u UserRepository) ChangeUserReportsCount(user_receiver_id int) (err error)
func (UserRepository) CreateGithubUserWithID ¶
func (u UserRepository) CreateGithubUserWithID(user_id int, inner_id int) (err error)
func (UserRepository) CreateUser ¶
func (u UserRepository) CreateUser(user *models.UserRequestRegister) (id int64, err error)
func (UserRepository) Delete ¶
func (u UserRepository) Delete(user_id int) (err error)
func (UserRepository) GetAll ¶
func (u UserRepository) GetAll() (users []models.User, amount int, err error)
func (UserRepository) GetCheckIfUserSubscribed ¶
func (u UserRepository) GetCheckIfUserSubscribed(sender_id int, receiver_id int) (check bool, err error)
func (UserRepository) GetPeopleByKeyword ¶
func (u UserRepository) GetPeopleByKeyword(keyword string, page int, pageSize int) (users []models.UserResponseSearch, amount int, err error)
func (UserRepository) GetSubscribedPeopleCount ¶
func (u UserRepository) GetSubscribedPeopleCount(user_id int) (amount int, err error)
func (UserRepository) GetUserByEmail ¶
func (u UserRepository) GetUserByEmail(Email string) (userOut *models.User, err error)
func (UserRepository) GetUserByGithubID ¶
func (u UserRepository) GetUserByGithubID(user_id int) (userOut *models.GitUser, err error)
func (UserRepository) GetUserByID ¶
func (u UserRepository) GetUserByID(user_id int) (userOut *models.User, err error)
func (UserRepository) GetUserByUsername ¶
func (u UserRepository) GetUserByUsername(username string) (userOut *models.User, err error)
func (UserRepository) GetUserJokesCount ¶
func (u UserRepository) GetUserJokesCount(user_id int) (amount int, err error)
func (UserRepository) GetUserUnbanDate ¶
func (u UserRepository) GetUserUnbanDate(user_id int) (unban_date string, err error)
func (UserRepository) GetWhomUserSubscribedTo ¶
func (u UserRepository) GetWhomUserSubscribedTo(user_id int) (users []int, err error)
func (UserRepository) GetWhomUserSubscribedToCount ¶
func (u UserRepository) GetWhomUserSubscribedToCount(user_id int) (amount int, err error)
func (UserRepository) SetRemainingReports ¶
func (u UserRepository) SetRemainingReports()
Click to show internal directories.
Click to hide internal directories.