postgres

package
v0.0.0-...-5d3eb43 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresRepository

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

func NewPostgresRepository

func NewPostgresRepository(db *sqlx.DB) *PostgresRepository

func (*PostgresRepository) CountBookmarksFromUserID

func (r *PostgresRepository) CountBookmarksFromUserID(userID int64) (int64, error)

func (*PostgresRepository) CountFollowersFromUserID

func (r *PostgresRepository) CountFollowersFromUserID(userID int64) (int64, error)

func (*PostgresRepository) CountFollowingsFromUserID

func (r *PostgresRepository) CountFollowingsFromUserID(userID int64) (int64, error)

func (*PostgresRepository) CountPostsFromAuthorID

func (r *PostgresRepository) CountPostsFromAuthorID(userID int64) (int64, error)

func (*PostgresRepository) CountSubscribedTopicsFromUserID

func (r *PostgresRepository) CountSubscribedTopicsFromUserID(userID int64) (int64, error)

func (*PostgresRepository) CountSubscribersFromTopicID

func (r *PostgresRepository) CountSubscribersFromTopicID(topicID int64) (int64, error)

func (*PostgresRepository) CountViewsFromPostID

func (r *PostgresRepository) CountViewsFromPostID(postID int64) (int64, error)

func (*PostgresRepository) CountVotesFromCommentID

func (r *PostgresRepository) CountVotesFromCommentID(commentID int64) (int64, int64, error)

func (*PostgresRepository) CountVotesFromPostID

func (r *PostgresRepository) CountVotesFromPostID(postID int64) (int64, int64, error)

func (*PostgresRepository) CreateBanHistory

func (r *PostgresRepository) CreateBanHistory(newBanHistory *domain.BanHistory) error

func (*PostgresRepository) CreateBookmark

func (r *PostgresRepository) CreateBookmark(newBookmark *domain.Bookmark) error

func (*PostgresRepository) CreateComment

func (r *PostgresRepository) CreateComment(newComment *domain.Comment) (int64, error)

func (*PostgresRepository) CreateCommentVote

func (r *PostgresRepository) CreateCommentVote(newVote *domain.CommentVote) error

func (*PostgresRepository) CreatePost

func (r *PostgresRepository) CreatePost(newPost *domain.Post) (int64, error)

func (*PostgresRepository) CreatePostView

func (r *PostgresRepository) CreatePostView(newPostView *domain.PostView) error

func (*PostgresRepository) CreatePostVote

func (r *PostgresRepository) CreatePostVote(newVote *domain.PostVote) error

func (*PostgresRepository) CreateRelation

func (r *PostgresRepository) CreateRelation(newRelation *domain.Relation) error

func (*PostgresRepository) CreateSubscription

func (r *PostgresRepository) CreateSubscription(newSubscription *domain.Subscription) error

func (*PostgresRepository) CreateTag

func (r *PostgresRepository) CreateTag(newTag *domain.Tag) (int64, error)

func (*PostgresRepository) CreateTaggedPost

func (r *PostgresRepository) CreateTaggedPost(newTaggedPost *domain.TaggedPost) error

func (*PostgresRepository) CreateTopic

func (r *PostgresRepository) CreateTopic(newTopic *domain.Topic) (int64, error)

func (*PostgresRepository) CreateUser

func (r *PostgresRepository) CreateUser(newUser *domain.User) (int64, error)

func (*PostgresRepository) DeleteBanHistory

func (r *PostgresRepository) DeleteBanHistory(startTime time.Time, userID int64) error

func (*PostgresRepository) DeleteBookmark

func (r *PostgresRepository) DeleteBookmark(postID int64, userID int64) error

func (*PostgresRepository) DeleteCommentVote

func (r *PostgresRepository) DeleteCommentVote(commentID int64, userID int64) error

func (*PostgresRepository) DeletePostView

func (r *PostgresRepository) DeletePostView(postID int64, userID int64) error

func (*PostgresRepository) DeletePostVote

func (r *PostgresRepository) DeletePostVote(postID int64, userID int64) error

func (*PostgresRepository) DeleteRelation

func (r *PostgresRepository) DeleteRelation(followerID int64, followingID int64) error

func (*PostgresRepository) DeleteSubscription

func (r *PostgresRepository) DeleteSubscription(topicID int64, userID int64) error

func (*PostgresRepository) DeleteTagFromPost

func (r *PostgresRepository) DeleteTagFromPost(postID int64, tagID int64) error

func (*PostgresRepository) DeleteUserByID

func (r *PostgresRepository) DeleteUserByID(id int64) error

TODO: not sure if this is possible when user has already posted

func (*PostgresRepository) GetBanHistoryFromUserID

func (r *PostgresRepository) GetBanHistoryFromUserID(userID int64) ([]domain.BanHistory, error)

func (*PostgresRepository) GetBookmarksFromUserID

func (r *PostgresRepository) GetBookmarksFromUserID(userID int64) ([]domain.Bookmark, error)

func (*PostgresRepository) GetCommentByID

func (r *PostgresRepository) GetCommentByID(id int64) (*domain.Comment, error)

func (*PostgresRepository) GetCommentVoteValue

func (r *PostgresRepository) GetCommentVoteValue(commentID int64, userID int64) (*null.Bool, error)

func (*PostgresRepository) GetCommentsWithOptions

func (r *PostgresRepository) GetCommentsWithOptions(options *domain.SearchCommentsOptions) ([]domain.Comment, error)

func (*PostgresRepository) GetCurrentBanFromUserID

func (r *PostgresRepository) GetCurrentBanFromUserID(userID int64) (*domain.BanHistory, error)

func (*PostgresRepository) GetFollowersFromUserID

func (r *PostgresRepository) GetFollowersFromUserID(userID int64) ([]domain.Relation, error)

func (*PostgresRepository) GetFollowingsFromUserID

func (r *PostgresRepository) GetFollowingsFromUserID(userID int64) ([]domain.Relation, error)

func (*PostgresRepository) GetPostByID

func (r *PostgresRepository) GetPostByID(id int64) (*domain.Post, error)

func (*PostgresRepository) GetPostViewValue

func (r *PostgresRepository) GetPostViewValue(postID int64, userID int64) (bool, error)

func (*PostgresRepository) GetPostVoteValue

func (r *PostgresRepository) GetPostVoteValue(postID int64, userID int64) (*null.Bool, error)

func (*PostgresRepository) GetPostsWithOptions

func (r *PostgresRepository) GetPostsWithOptions(options *domain.SearchPostsOptions) ([]domain.Post, error)

func (*PostgresRepository) GetSubscribedTopicsFromUserID

func (r *PostgresRepository) GetSubscribedTopicsFromUserID(userID int64) ([]domain.Subscription, error)

func (*PostgresRepository) GetSubscribersFromTopicID

func (r *PostgresRepository) GetSubscribersFromTopicID(topicID int64) ([]domain.Subscription, error)

func (*PostgresRepository) GetTagByID

func (r *PostgresRepository) GetTagByID(id int64) (*domain.Tag, error)

func (*PostgresRepository) GetTagsFromPostID

func (r *PostgresRepository) GetTagsFromPostID(postID int64) ([]domain.Tag, error)

func (*PostgresRepository) GetTagsWithOptions

func (r *PostgresRepository) GetTagsWithOptions(options *domain.SearchTagsOptions) ([]domain.Tag, error)

func (*PostgresRepository) GetTopicByID

func (r *PostgresRepository) GetTopicByID(id int64) (*domain.Topic, error)

func (*PostgresRepository) GetTopicID

func (r *PostgresRepository) GetTopicID(topic string, hub string) (int64, error)

func (*PostgresRepository) GetTopicsWithOptions

func (r *PostgresRepository) GetTopicsWithOptions(options *domain.SearchTopicsOptions) ([]domain.Topic, error)

func (*PostgresRepository) GetUserByID

func (r *PostgresRepository) GetUserByID(id int64) (*domain.User, error)

func (*PostgresRepository) GetUserIDByEmail

func (r *PostgresRepository) GetUserIDByEmail(email string) (int64, error)

func (*PostgresRepository) GetUserIDByUsername

func (r *PostgresRepository) GetUserIDByUsername(username string) (int64, error)

func (*PostgresRepository) GetUsersWithOptions

func (r *PostgresRepository) GetUsersWithOptions(options *domain.SearchUsersOptions) ([]domain.User, error)

func (*PostgresRepository) GetViewsFromPostID

func (r *PostgresRepository) GetViewsFromPostID(postID int64) ([]domain.PostView, error)

func (*PostgresRepository) GetVotesFromCommentID

func (r *PostgresRepository) GetVotesFromCommentID(commentID int64) ([]domain.CommentVote, error)

func (*PostgresRepository) GetVotesFromPostID

func (r *PostgresRepository) GetVotesFromPostID(postID int64) ([]domain.PostVote, error)

func (*PostgresRepository) MarkCommentAsDeletedByID

func (r *PostgresRepository) MarkCommentAsDeletedByID(id int64, reason string, moderatorID int64) error

func (*PostgresRepository) MarkPostAsDeletedByID

func (r *PostgresRepository) MarkPostAsDeletedByID(id int64, reason string, moderatorID int64) error

func (*PostgresRepository) UpdateCommentByID

func (r *PostgresRepository) UpdateCommentByID(updatedComment *domain.Comment) error

func (*PostgresRepository) UpdateCommentVote

func (r *PostgresRepository) UpdateCommentVote(up bool, commentID int64, userID int64) error

func (*PostgresRepository) UpdatePostByID

func (r *PostgresRepository) UpdatePostByID(updatedPost *domain.Post) error

func (*PostgresRepository) UpdatePostVote

func (r *PostgresRepository) UpdatePostVote(up bool, postID int64, userID int64) error

func (*PostgresRepository) UpdateTopicByID

func (r *PostgresRepository) UpdateTopicByID(id int64, description string) error

func (*PostgresRepository) UpdateUserByID

func (r *PostgresRepository) UpdateUserByID(updatedUser *domain.User) error

Jump to

Keyboard shortcuts

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