jsend

package
v0.0.0-...-8e5a656 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0, MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusError   = "error"
	StatusFail    = "fail"
	StatusSuccess = "success"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Payload

type Payload struct {
	Status  string `json:"status"`
	Data    any    `json:"data,omitempty"`
	Message string `json:"message,omitempty"`
}

func Error

func Error(payload string) Payload

func Fail

func Fail(payload any) Payload

func Ok

func Ok(payload any) Payload

type Status

type Status int8

Jump to

Keyboard shortcuts

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