model

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Status ResultStatus `json:"status"`
	Msg    string       `json:"msg"`
	Data   any          `json:"data"`
	Time   time.Time    `json:"time"`
}

func FailureResult

func FailureResult(err error) *Result

func SuccessResult

func SuccessResult(msg string) *Result

type ResultStatus

type ResultStatus string
const (
	SUCCESS ResultStatus = "success"
	FAILURE ResultStatus = "failure"
)

Jump to

Keyboard shortcuts

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