repository

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRepo

func NewRepo(connpool *pgxpool.Pool) domain.PostRepository

Types

type Repository

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

func (*Repository) CreatePost

func (r *Repository) CreatePost(ctx context.Context, post *domain.PostCreate) (*domain.Post, error)

func (*Repository) GetPost

func (r *Repository) GetPost(ctx context.Context, id string) (*domain.Post, error)

func (*Repository) GetPosts

func (r *Repository) GetPosts(ctx context.Context) ([]*domain.Post, error)

TODO: Add pagination

func (*Repository) UpdatePost

func (r *Repository) UpdatePost(ctx context.Context, post *domain.Post) (*domain.Post, error)

Jump to

Keyboard shortcuts

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