payload

package
v0.0.0-...-df4a25f Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageTypeError   = "error"
	MessageTypeSuccess = "success"
	Message            = "message"
)

Variables

This section is empty.

Functions

func ResponseJSON

func ResponseJSON(w http.ResponseWriter, statusCode int, rep Response)

Types

type Response

type Response struct {
	MessageType string      `json:"message_type"`
	Message     string      `json:"message"`
	Data        interface{} `json:"data"`
}

func NewResponse

func NewResponse(messageType, message string, data interface{}) Response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳