api_response

package
v0.0.0-...-d34172e Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorAlreadyExists

func ErrorAlreadyExists(response interface{}, message string) interface{}

func ErrorBadRequest

func ErrorBadRequest(response interface{}, message string) interface{}

func ErrorInternal

func ErrorInternal(response interface{}, message string) interface{}

func ErrorNotFound

func ErrorNotFound(response interface{}, message string) interface{}

func ErrorUnauthorized

func ErrorUnauthorized(response interface{}, message string) interface{}

func Success

func Success(response interface{}, message string, args map[string]interface{}) interface{}

Types

type ApiResponse

type ApiResponse interface {
	Success(message string, args map[string]interface{}) interface{}
	ErrorInternal(message string) interface{}
	ErrorBadRequest(message string) interface{}
	ErrorNotFound(message string) interface{}
	ErrorAlreadyExists(message string) interface{}
}

Jump to

Keyboard shortcuts

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