result

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(ctx *context.Context, err error) error

func Err

func Err(ctx *context.Context, code Codes, msg string) error

func SetSuccCode

func SetSuccCode(code Codes)

func Succ

func Succ(ctx *context.Context, data any) error

func SuccEmpty

func SuccEmpty(ctx *context.Context) error

func Timeout added in v0.0.5

func Timeout(ctx *context.Context) error

Types

type Codes

type Codes int32
const (
	Codes_Succ Codes = 0
)

type Empty

type Empty struct {
}

type Response

type Response struct {
	Code Codes  `json:"code"`
	Msg  string `json:"msg"`
	Data any    `json:"data"`
}

Jump to

Keyboard shortcuts

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