util

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallErrorNotFound

func CallErrorNotFound(c *gin.Context, msg string, err error)

CallErrorNotFound is for return API response not found

func CallServerError

func CallServerError(c *gin.Context, msg string, err error)

CallServerError is for return API response server error

func CallSuccessOK

func CallSuccessOK(c *gin.Context, msg string, data interface{})

CallSuccessOK is for return API response with status code 200, you need to specify msg, and data as function parameter

func CallUserError

func CallUserError(c *gin.Context, msg string, err error)

CallUserError is for return error from user side

func CallUserFound added in v1.0.2

func CallUserFound(c *gin.Context, msg string, data interface{})

CallUserFound is for return API response with status code 307 means its redirected

func CallUserNotAuthorized added in v1.0.2

func CallUserNotAuthorized(c *gin.Context, msg string, data interface{})

CallUserNotAuthorized is for return API response with status code 403, you need to specify msg, and data as function paramenter

func Contains

func Contains(d string, dl []string) bool

Contains function is to check item whether is exist or not in a list and will return bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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