Documentation ¶
Index ¶
- func NewRepository(db *sql.DB) thread.Repository
- type Repository
- func (r Repository) Create(slugOrId string, posts []*models.Post) error
- func (r Repository) Details(thread *models.Thread) error
- func (r Repository) Posts(thread *models.PostSearch) ([]*models.Post, error)
- func (r Repository) UpdateDetails(thread *models.ThreadUpdate) (*models.Thread, error)
- func (r Repository) Vote(thread *models.ThreadVoice) (*models.Thread, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRepository ¶
func NewRepository(db *sql.DB) thread.Repository
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func (Repository) Posts ¶
func (r Repository) Posts(thread *models.PostSearch) ([]*models.Post, error)
func (Repository) UpdateDetails ¶
func (r Repository) UpdateDetails(thread *models.ThreadUpdate) (*models.Thread, error)
func (Repository) Vote ¶
func (r Repository) Vote(thread *models.ThreadVoice) (*models.Thread, error)
Click to show internal directories.
Click to hide internal directories.