comments

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentType

type CommentType int32
const (
	TypeIDPictures CommentType = 1
	TypeIDItems    CommentType = 2
	TypeIDVotings  CommentType = 3
	TypeIDArticles CommentType = 4
	TypeIDForums   CommentType = 5
)

type GetVotesResult

type GetVotesResult struct {
	PositiveVotes []users.DBUser
	NegativeVotes []users.DBUser
}

type ModeratorAttention

type ModeratorAttention int32
const (
	ModeratorAttentionNone      ModeratorAttention = 0
	ModeratorAttentionRequired  ModeratorAttention = 1
	ModeratorAttentionCompleted ModeratorAttention = 2
)

type Repository

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

Repository Main Object.

func NewRepository

func NewRepository(db *goqu.Database) *Repository

NewRepository constructor.

func (*Repository) GetCommentType

func (s *Repository) GetCommentType(ctx context.Context, commentID int64) (CommentType, error)

func (*Repository) GetVotes

func (s *Repository) GetVotes(ctx context.Context, id int64) (*GetVotesResult, error)

func (*Repository) MoveMessage

func (s *Repository) MoveMessage(ctx context.Context, commentID int64, dstType CommentType, dstItemID int64) error

func (*Repository) QueueDeleteMessage

func (s *Repository) QueueDeleteMessage(ctx context.Context, commentID int64, byUserID int64) error

func (*Repository) RestoreMessage

func (s *Repository) RestoreMessage(ctx context.Context, commentID int64) error

func (*Repository) Subscribe

func (s *Repository) Subscribe(ctx context.Context, userID int64, commentsType CommentType, itemID int64) error

func (*Repository) UnSubscribe

func (s *Repository) UnSubscribe(ctx context.Context, userID int64, commentsType CommentType, itemID int64) error

func (*Repository) View

func (s *Repository) View(ctx context.Context, userID int64, commentsType CommentType, itemID int64) error

func (*Repository) VoteComment

func (s *Repository) VoteComment(ctx context.Context, userID int64, commentID int64, vote int32) (int32, error)

Jump to

Keyboard shortcuts

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