posts

package
v0.44.22 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Posts routes and controllers logic package for the backend.

Index

Constants

View Source
const (
	PKG_NAME = "posts"
)

Variables

This section is empty.

Functions

func NewPostRepository added in v0.44.22

func NewPostRepository(cache db.Cacher) models.PostRepositoryInterface

func Router

func Router() chi.Router

Types

type PostRepository added in v0.44.22

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

The implementation of pkg/models.PostRepositoryInterface.

func (*PostRepository) Delete added in v0.44.22

func (r *PostRepository) Delete(postID string) error

func (*PostRepository) GetAll added in v0.44.22

func (r *PostRepository) GetAll(pageOpts interface{}) (*map[string]models.Post, error)

func (*PostRepository) GetByID added in v0.44.22

func (r *PostRepository) GetByID(postID string) (*models.Post, error)

func (*PostRepository) Save added in v0.44.22

func (r *PostRepository) Save(post *models.Post) error

Jump to

Keyboard shortcuts

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