postgres

package
v0.0.0-...-c4cacf9 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 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 CommentRepository

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

func NewCommentRepository

func NewCommentRepository(sqlClient *sqlx.DB) *CommentRepository

func (CommentRepository) GetByID

func (r CommentRepository) GetByID(commentId blogo.CommentId) *blogo.Comment

GetByID will get a parent comments and all of its child down to N level

func (CommentRepository) GetByPostID

func (r CommentRepository) GetByPostID(postId blogo.PostId) []*blogo.Comment

GetByPostID will get all comments by its post id

func (CommentRepository) InsertComment

func (r CommentRepository) InsertComment(comment *blogo.Comment) error

type PostRepository

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

func NewPostRepository

func NewPostRepository(sqlClient *sqlx.DB) *PostRepository

func (PostRepository) FindByID

func (r PostRepository) FindByID(postID blogo.PostId) *blogo.Post

func (PostRepository) GetPost

func (r PostRepository) GetPost(limit, offset int) []*blogo.Post

func (PostRepository) InsertPost

func (r PostRepository) InsertPost(post *blogo.Post) error

type ReactRepository

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

func NewReactRepository

func NewReactRepository(sqlClient *sqlx.DB) *ReactRepository

func (ReactRepository) GetByPostID

func (r ReactRepository) GetByPostID(postID blogo.PostId) []*blogo.ReactViews

func (ReactRepository) InsertUserReact

func (r ReactRepository) InsertUserReact(react *blogo.React) error

Jump to

Keyboard shortcuts

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