utils

package
v0.0.0-...-35c4631 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_RESPONSE_CODE    = http.StatusOK
	DEFAULT_RESPONSE_MESSAGE = "Data retrieved successfully"
	RESPONSE_STATUS_SUCCESS  = "SUCCESS"
	RESPONSE_STATUS_FAILED   = "FAILED"
)

Variables

This section is empty.

Functions

func GetCurrentUser

func GetCurrentUser(ctx *gin.Context) *models.User

func IsNotEmpty

func IsNotEmpty(ctx *gin.Context, data string, dataName string) bool

func ResponseHandler

func ResponseHandler(ctx *gin.Context, httpResponse HTTPResponse, data ...interface{})

Types

type HTTPResponse

type HTTPResponse struct {
	ResponseCode    int
	ResponseMessage string
	ResponseStatus  string
}

Jump to

Keyboard shortcuts

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