utils

package
v0.0.0-...-3d9bb29 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Like

func Like(field []string, value string) func(db *gorm.DB) *gorm.DB

func Pagination

func Pagination(page int, limit int) func(db *gorm.DB) *gorm.DB

func WriteAbortResponse

func WriteAbortResponse(c *gin.Context, response Response)

func WriteResponse

func WriteResponse(c *gin.Context, response Response)

Types

type Response

type Response struct {
	HttpStatus int
	Message    string      `json:"message"`
	Data       interface{} `json:"data"`
}

func WrapResponse

func WrapResponse(httpStatus int, message string, data interface{}) Response

Jump to

Keyboard shortcuts

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