utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelToSnake

func CamelToSnake(str string) string

func ReturnErrorResponse

func ReturnErrorResponse(c *fiber.Ctx, err error, data interface{}) error

func ReturnSuccessResponse

func ReturnSuccessResponse(c *fiber.Ctx, code int, msg string, data interface{}) error

Types

type JSONResponse

type JSONResponse struct {
	Success   bool        `json:"success"`
	Message   string      `json:"message"`
	Data      interface{} `json:"data"`
	Timestamp int64       `json:"timestamp"`
}

Jump to

Keyboard shortcuts

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