postrepo

package
v0.0.0-...-750da50 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo interface {
	FetchMainFeedPosts(currentUser *models.User, input gen.FetchMainFeedPostsInput) ([]*models.Post, *bool, error)
	CreatePost(
		createdBy *models.User,
		postContent string,
		postImages []models.PostImage,
		postVideoURL string,
		postGifURL string,
		subwallSlug string,
		parentPostUID string,
		quotingPostUID string,
		whoCanReply string,
	) (*models.Post, error)
	GetPinnedPost(username string) (*models.Post, error)
	GetUserProfilePosts(input gen.GetUserProfileInput) (*[]*models.Post, *bool, error)
	GetPostByUID(targetPostUID string) (*models.Post, error)
	GetPostLikeByUserAndPost(currentUserUID string, targetPostUID string) (*models.PostLike, error)
	CreatePostLike(currentUser *models.User, targetPost *models.Post) error
	DeletePostLike(postLikeUID string) error
	NumLikes(targetPostUID string) (int, error)
	IsLikedByUser(targetUserUID string, targetPostUID string) (bool, error)
	NumQuotes(targetPostUID string) (int, error)
	NumReposts(targetPostUID string) (int, error)
	NumReplies(targetPostUID string) (int, error)
	IsRepostedByUser(targetUserUID string, targetPostUID string) (bool, error)
}

Repo interface

func NewPostRepo

func NewPostRepo(db *gorm.DB) Repo

NewPostRepo will instantiate User Repository

Jump to

Keyboard shortcuts

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