api

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeletePost

func DeletePost(c *gin.Context)

func UpdatePost

func UpdatePost(c *gin.Context)

Types

type PostController

type PostController struct {
	Dbconn *gorm.DB
}

func (*PostController) CreatePost

func (controller *PostController) CreatePost(c *gin.Context)

func (*PostController) GetAllPosts

func (controller *PostController) GetAllPosts(c *gin.Context)

func (*PostController) GetPostByAuthorId

func (controller *PostController) GetPostByAuthorId(c *gin.Context)

func (*PostController) GetPostByID

func (controller *PostController) GetPostByID(c *gin.Context)

type PostControllerInterface

type PostControllerInterface interface {
	GetAllPosts(c *gin.Context)
	GetPostByID(c *gin.Context)
	GetPostByAuthorId(c *gin.Context)
	CreatePost(c *gin.Context)
	UpdatePost(c *gin.Context)
	DeletePost(c *gin.Context)
}

Jump to

Keyboard shortcuts

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