comments

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBStore

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

func NewDBStore

func NewDBStore(p *pgxpool.Pool) (*DBStore, error)

func (*DBStore) AddComment

func (s *DBStore) AddComment(ctx context.Context, gameID string, authorID int,
	eventNumber int, comment string) (string, error)

func (*DBStore) DeleteComment

func (s *DBStore) DeleteComment(ctx context.Context, commentID string, authorID int) error

func (*DBStore) Disconnect

func (s *DBStore) Disconnect()

func (*DBStore) GetComments

func (s *DBStore) GetComments(ctx context.Context, gameID string) ([]models.GetCommentsForGameRow, error)

func (*DBStore) GetCommentsForAllGames

func (s *DBStore) GetCommentsForAllGames(ctx context.Context, limit, offset int) ([]models.GetCommentsForAllGamesRow, error)

func (*DBStore) UpdateComment

func (s *DBStore) UpdateComment(ctx context.Context, authorID int, commentID, comment string) error

Jump to

Keyboard shortcuts

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