handlers

package
v0.0.0-...-4d64e5c Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const IdentityKey = "identity"

Variables

This section is empty.

Functions

func ErrorResponse

func ErrorResponse(c *gin.Context, code int, message string)

func StatusFromError

func StatusFromError(c *gin.Context, err error) (*gin.Context, int, string)

func SuccessResponse

func SuccessResponse(c *gin.Context, code int, message string, data interface{})

func SuccessfulOperationResponse

func SuccessfulOperationResponse(c *gin.Context, code int, message string, name string)

Types

type IdentityData

type IdentityData struct {
	Id    database.ObjectId
	Email string
}

type Response

type Response struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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