repository

package
v0.0.0-...-dd516a1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostRepository

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

func NewPostRepository

func NewPostRepository(dbpool *pgxpool.Pool) *PostRepository

func (*PostRepository) CreatePost

func (pr *PostRepository) CreatePost(post *models.Post) error

func (*PostRepository) DeletePost

func (pr *PostRepository) DeletePost(id int) error

func (*PostRepository) GetPost

func (pr *PostRepository) GetPost(id int) (*models.Post, error)

func (*PostRepository) GetPosts

func (pr *PostRepository) GetPosts(ctx context.Context) ([]models.Post, error)

func (*PostRepository) UpdatePost

func (pr *PostRepository) UpdatePost(post *models.Post) error

Jump to

Keyboard shortcuts

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