thread_psql

package
v0.0.0-...-372bfc1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewThreadPSQLRepository

func NewThreadPSQLRepository(ConnectionPool *pgx.ConnPool, Cache *cache.Cache) thread.Repository

func ReplaceSQL

func ReplaceSQL(old, searchPattern string) string

Types

type ThreadPSQL

type ThreadPSQL struct {
	Conn  *pgx.ConnPool
	Cache *cache.Cache
}

func (ThreadPSQL) ClearAll

func (t ThreadPSQL) ClearAll() error

func (ThreadPSQL) CreatePosts

func (t ThreadPSQL) CreatePosts(thread *model.Thread, posts []*model.Post) ([]*model.Post, error)

func (ThreadPSQL) CreateThread

func (t ThreadPSQL) CreateThread(newThread *model.NewThread) (*model.Thread, error)

func (ThreadPSQL) FindByIdOrSlug

func (t ThreadPSQL) FindByIdOrSlug(id int, slug string) (*model.Thread, error)

func (ThreadPSQL) FindPostId

func (t ThreadPSQL) FindPostId(id string, includeUser, includeForum, includeThread bool) (*model.PostFull, error)

func (ThreadPSQL) GetStatus

func (t ThreadPSQL) GetStatus() (*model.Status, error)

func (ThreadPSQL) GetThreadPosts

func (t ThreadPSQL) GetThreadPosts(thread *model.Thread, limit, desc, since, sort string) ([]model.Post, error)

func (ThreadPSQL) UpdatePost

func (t ThreadPSQL) UpdatePost(id string, message string) (*model.Post, error)

func (ThreadPSQL) UpdateThread

func (t ThreadPSQL) UpdateThread(id int, slug string, threadUpdate *model.ThreadUpdate) (*model.Thread, error)

func (ThreadPSQL) Vote

func (t ThreadPSQL) Vote(thread *model.Thread, vote *model.Vote) (*model.Thread, error)

Jump to

Keyboard shortcuts

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