mysql

package
v0.0.0-...-52f6943 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

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

func NewComment

func NewComment(conn *sqlx.DB) *Comment

func (*Comment) Create

func (*Comment) GetCommentsByPostID

func (r *Comment) GetCommentsByPostID(ctx context.Context, req *model.GetComment) ([]*model.CommentResponse, error)

func (*Comment) GetLastComment

func (r *Comment) GetLastComment(ctx context.Context, id int64) (*model.CommentResponse, error)

func (*Comment) GetTotalComments

func (r *Comment) GetTotalComments(ctx context.Context, userPostID int64) (*int64, error)

type UserPost

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

func NewUserPost

func NewUserPost(conn *sqlx.DB) *UserPost

func (*UserPost) AddLikeOnPost

func (r *UserPost) AddLikeOnPost(ctx context.Context, request *model.AddOrRemoveLikeOnPostRequest) error

func (*UserPost) CheckHealthReadiness

func (r *UserPost) CheckHealthReadiness(ctx context.Context) error

func (*UserPost) CheckIsExistLikeOnPostBy

func (r *UserPost) CheckIsExistLikeOnPostBy(ctx context.Context, request *model.AddOrRemoveLikeOnPostRequest) (bool, error)

func (*UserPost) GetActor

func (r *UserPost) GetActor(ctx context.Context, id int64) (*model.UserResponse, error)

func (*UserPost) GetDetailPost

func (r *UserPost) GetDetailPost(ctx context.Context, id int64) (*model.PostResponse, error)

func (*UserPost) GetListPost

func (r *UserPost) GetListPost(ctx context.Context, request *model.UserPostRequest) ([]*model.PostResponse, error)

func (*UserPost) GetListPostByMe

func (r *UserPost) GetListPostByMe(ctx context.Context, request *model.UserPostByMeRequest) ([]*model.PostResponse, error)

func (*UserPost) GetMetadataPost

func (r *UserPost) GetMetadataPost(ctx context.Context, request *model.UserPostRequest) (*int64, error)

func (*UserPost) GetMetadataPostByMe

func (r *UserPost) GetMetadataPostByMe(ctx context.Context, request *model.UserPostByMeRequest) (*int64, error)

func (*UserPost) InsertPost

func (r *UserPost) InsertPost(ctx context.Context, request *model.CreateNewPostRequestRepository) error

func (*UserPost) RemoveLikeOnPost

func (r *UserPost) RemoveLikeOnPost(ctx context.Context, request *model.AddOrRemoveLikeOnPostRequest) error

func (*UserPost) UpdateDetailOfUserPost

func (r *UserPost) UpdateDetailOfUserPost(ctx context.Context, request *model.UpdatePostRequest) error

Jump to

Keyboard shortcuts

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