Documentation ¶
Index ¶
- type PostgresRepository
- func (r *PostgresRepository) ChangePost(slug string, post *models.PostUpdate) (res *models.Post, stat int)
- func (r *PostgresRepository) ChangeThread(slugThread string, thread *models.ThreadUpdate) (res *models.Thread, stat int)
- func (r *PostgresRepository) ChangeUser(userNickname string, user *models.UserUpdate) (res *models.User, stat int)
- func (r *PostgresRepository) ClearAll() (stat int)
- func (r *PostgresRepository) CreateForum(forum *models.Forum) (*models.Forum, int)
- func (r *PostgresRepository) CreatePosts(threadSlug string, posts models.Posts) (res models.Posts, stat int)
- func (r *PostgresRepository) CreateThread(thread *models.Thread) (res *models.Thread, stat int)
- func (r *PostgresRepository) CreateUser(user *models.User) (res models.Users, stat int)
- func (r *PostgresRepository) GetForum(slug string) (res *models.Forum, stat int)
- func (r *PostgresRepository) GetListOfPosts(slugThread, limit, since, sort, desc string) (models.Posts, int)
- func (r *PostgresRepository) GetListOfThreads(slug, limit, since, desc string) (models.Threads, int)
- func (r *PostgresRepository) GetListOfUsers(slug, limit, since, desc string) (models.Users, int)
- func (r *PostgresRepository) GetStatus() (res *models.Status, stat int)
- func (r *PostgresRepository) GetThread(slugThread string) (res *models.Thread, stat int)
- func (r *PostgresRepository) GetUser(user string) (res *models.User, stat int)
- func (r *PostgresRepository) PostDetails(slug string, related []string) (res models.PostFull, stat int)
- func (r *PostgresRepository) VoteForThread(slug string, vote *models.Vote) (res *models.Thread, stat int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresRepository ¶
type PostgresRepository struct {
// contains filtered or unexported fields
}
func NewPostgresRepository ¶
func NewPostgresRepository(db *pgx.ConnPool) *PostgresRepository
func (*PostgresRepository) ChangePost ¶
func (r *PostgresRepository) ChangePost(slug string, post *models.PostUpdate) (res *models.Post, stat int)
func (*PostgresRepository) ChangeThread ¶
func (r *PostgresRepository) ChangeThread(slugThread string, thread *models.ThreadUpdate) (res *models.Thread, stat int)
func (*PostgresRepository) ChangeUser ¶
func (r *PostgresRepository) ChangeUser(userNickname string, user *models.UserUpdate) (res *models.User, stat int)
func (*PostgresRepository) ClearAll ¶
func (r *PostgresRepository) ClearAll() (stat int)
func (*PostgresRepository) CreateForum ¶
func (*PostgresRepository) CreatePosts ¶
func (*PostgresRepository) CreateThread ¶
func (*PostgresRepository) CreateUser ¶
func (*PostgresRepository) GetForum ¶
func (r *PostgresRepository) GetForum(slug string) (res *models.Forum, stat int)
func (*PostgresRepository) GetListOfPosts ¶
func (r *PostgresRepository) GetListOfPosts(slugThread, limit, since, sort, desc string) (models.Posts, int)
func (*PostgresRepository) GetListOfThreads ¶
func (r *PostgresRepository) GetListOfThreads(slug, limit, since, desc string) (models.Threads, int)
func (*PostgresRepository) GetListOfUsers ¶
func (r *PostgresRepository) GetListOfUsers(slug, limit, since, desc string) (models.Users, int)
func (*PostgresRepository) GetStatus ¶
func (r *PostgresRepository) GetStatus() (res *models.Status, stat int)
func (*PostgresRepository) GetThread ¶
func (r *PostgresRepository) GetThread(slugThread string) (res *models.Thread, stat int)
func (*PostgresRepository) GetUser ¶
func (r *PostgresRepository) GetUser(user string) (res *models.User, stat int)
func (*PostgresRepository) PostDetails ¶
func (*PostgresRepository) VoteForThread ¶
Click to show internal directories.
Click to hide internal directories.