response

package
v0.0.0-...-7538a8c Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(c *gin.Context, error error)

func ErrorWithEnMessage

func ErrorWithEnMessage(c *gin.Context, statusCode int, messageEn, errorCode string)

func ErrorWithIdMessage

func ErrorWithIdMessage(c *gin.Context, statusCode int, messageId, errorCode string)

func ErrorWithMessage

func ErrorWithMessage(c *gin.Context, statusCode int, messageId, messageEn, errorCode string)

func PagingSuccess

func PagingSuccess(c *gin.Context, data interface{}, total int64, pagingFilter models.Paging)

func Success

func Success(c *gin.Context, data interface{})

Types

type ModelError

type ModelError struct {
	Code      int    `json:"code"`
	ErrorCode string `json:"error_code,omitempty"`
	Success   bool   `json:"success"`
	Message   *struct {
		Indonesian *string `json:"indonesian"`
		English    *string `json:"english"`
	} `json:"message,omitempty"`
	Timestamp int64 `json:"timestamp"`
}

func (ModelError) ErrorString

func (m ModelError) ErrorString() errors.ErrorString

Jump to

Keyboard shortcuts

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