types

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 4 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 {
	Code    int    `json:"code"`
	Msg     string `json:"msg"`
	Data    any    `json:"data"`
	ErrCode int    `json:"errCode"`
	Service string `json:"service"`
}

func (*Result) Error

func (res *Result) Error(errCode int, msg string, data any)

func (*Result) JsonMarshal

func (res *Result) JsonMarshal() (marshal []byte)

转成json

func (*Result) To added in v0.3.15

func (res *Result) To(_type any)

转为指定类型数据

type WsResult

type WsResult struct {
	Result
	Path string `json:"path"`
	Mark string `json:"mark,omitempty"`
}

Jump to

Keyboard shortcuts

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