Documentation ¶
Index ¶
- func NewRepo(connpool *pgxpool.Pool) domain.PostRepository
- type Repository
- func (r *Repository) CreatePost(ctx context.Context, post *domain.PostCreate) (*domain.Post, error)
- func (r *Repository) GetPost(ctx context.Context, id string) (*domain.Post, error)
- func (r *Repository) GetPosts(ctx context.Context) ([]*domain.Post, error)
- func (r *Repository) UpdatePost(ctx context.Context, post *domain.Post) (*domain.Post, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) UpdatePost ¶
Click to show internal directories.
Click to hide internal directories.