apiresponse

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

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

Go to latest
Published: Jun 18, 2022 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 APIError

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

type APIResponse

type APIResponse struct {
	Code    int `json:"status"`
	Status  bool
	Data    interface{} `json:"data"`
	Message string      `json:"message"`
	Error   APIError    `json:"error"`
}

func Error

func Error(errCode int, message string) APIResponse

func Success

func Success(successCode int, message string, data interface{}) APIResponse

Jump to

Keyboard shortcuts

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