repository

package
v0.0.0-...-da22c76 Latest Latest
Warning

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

Go to latest
Published: May 2, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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 (r *PostgresRepository) CreateForum(forum *models.Forum) (*models.Forum, int)

func (*PostgresRepository) CreatePosts

func (r *PostgresRepository) CreatePosts(threadSlug string, posts models.Posts) (res models.Posts, stat int)

func (*PostgresRepository) CreateThread

func (r *PostgresRepository) CreateThread(thread *models.Thread) (res *models.Thread, stat int)

func (*PostgresRepository) CreateUser

func (r *PostgresRepository) CreateUser(user *models.User) (res models.Users, stat int)

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 (r *PostgresRepository) PostDetails(slug string, related []string) (res models.PostFull, stat int)

func (*PostgresRepository) VoteForThread

func (r *PostgresRepository) VoteForThread(slug string, vote *models.Vote) (res *models.Thread, stat int)

Jump to

Keyboard shortcuts

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