postapi

package
v0.0.0-...-637df6b Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrorResponse

func NewErrorResponse(err error) interface{}

func NewSuccessResponse

func NewSuccessResponse(data interface{}) interface{}

Types

type Controller

type Controller struct {
	JWTToken             *auth.JWTToken
	Env                  *envconfig.EnvConfig
	Enforcer             *casbin.Enforcer
	Router               gin.IRouter
	CreatePostInport     createpost.Inport
	ShowAllPostsInport   showallposts.Inport
	ShowPostBySlugInport showpostbyslug.Inport
	ShowPostByIDInport   showpostbyid.Inport
	DeletePostInport     deletepost.Inport
	UpdatePostInport     updatepost.Inport
}

func (*Controller) RegisterRouter

func (r *Controller) RegisterRouter()

RegisterRouter registering all the router

type Response

type Response struct {
	Success      bool        `json:"success"`
	ErrorCode    string      `json:"errorCode"`
	ErrorMessage string      `json:"errorMessage"`
	Data         interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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