Documentation ¶
Index ¶
- func CamelToSnake(str string) string
- func IsProduction() bool
- func QueryToUint(query string) uint
- func ReadJsonFile(filename string) ([]byte, error)
- func ReturnErrorResponse(c *fiber.Ctx, err error, data interface{}) error
- func ReturnSuccessResponse(c *fiber.Ctx, code int, msg string, data interface{}) error
- func StructToJSONString(s any) string
- type AuthUser
- type JSONResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CamelToSnake ¶
func IsProduction ¶
func IsProduction() bool
func QueryToUint ¶
func ReadJsonFile ¶
func ReturnErrorResponse ¶
func ReturnSuccessResponse ¶
func StructToJSONString ¶ added in v1.1.0
Convert struct to json string. Error ignored
Types ¶
type AuthUser ¶
type AuthUser struct { jwt.RegisteredClaims ID uint64 `json:"id"` Name string `json:"name"` Email string `json:"email"` }
func GetAuthUser ¶
func GetAuthUser(c *fiber.Ctx) AuthUser
type JSONResponse ¶
Click to show internal directories.
Click to hide internal directories.