utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 9 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 AuthUser added in v1.1.0

type AuthUser struct {
	jwt.RegisteredClaims
	ID    uint64 `json:"id"`
	Name  string `json:"name"`
	Email string `json:"email"`
}

func GetAuthUser added in v1.1.0

func GetAuthUser(c *fiber.Ctx) AuthUser

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