resp

package
v0.0.0-...-0f91579 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResponseNOK

func ResponseNOK(c *gin.Context, code int, values ...interface{})

ResponseNOK responses with given code and values, if code is between 400000 and 500000, it will log error and resp 500 to client otherwise, it will log info and resp 200 to client

func ResponseOK

func ResponseOK(c *gin.Context, respMessage string, code int, values ...interface{})

func ResponseOKWithDebug

func ResponseOKWithDebug(c *gin.Context, respMessage string, code int, values ...interface{})

Types

type ErrResponse

type ErrResponse struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func NewErrResponse

func NewErrResponse(code int, message string) *ErrResponse

Jump to

Keyboard shortcuts

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