response

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Status     int               `json:"status"`
	Message    string            `json:"message"`
	Validation map[string]string `json:"validation"`
	Data       interface{}       `json:"data"`
}

func Error

func Error(code int, message string) Base

Error Simple error response

func ErrorValidation

func ErrorValidation(validation map[string]string, message string) Base

ErrorValidation Error response with validation error

func Success

func Success(i interface{}) Base

Success Success response

type List

type List struct {
	List  []interface{} `json:"list"`
	Limit int64         `json:"limit"`
	Page  int64         `json:"page"`
	Total int64         `json:"total"`
}

Jump to

Keyboard shortcuts

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