repository

package
v0.0.0-...-a7107f1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(db *pgxpool.Pool, forumRepo forum.Repository) Repository

func (Repository) Create

func (repo Repository) Create(thread models.Thread) (models.Thread, error)

func (Repository) GetByID

func (repo Repository) GetByID(id int32) (models.Thread, error)

func (Repository) GetBySlug

func (repo Repository) GetBySlug(slug string) (models.Thread, error)

func (Repository) GetThreadsByForumSlug

func (repo Repository) GetThreadsByForumSlug(forumSlug string, since *time.Time, desc bool,
	limit int32) (models.Threads, error)

func (Repository) UpdateByID

func (repo Repository) UpdateByID(thread models.Thread) (models.Thread, error)

func (Repository) UpdateBySlug

func (repo Repository) UpdateBySlug(thread models.Thread) (models.Thread, error)

func (Repository) VoteByID

func (repo Repository) VoteByID(id int32, vote models.Vote) (thread models.Thread, err error)

func (Repository) VoteBySlug

func (repo Repository) VoteBySlug(slug string, vote models.Vote) (thread models.Thread, err error)

Jump to

Keyboard shortcuts

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