Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BetterRequest ¶
type BetterRequest[T any] struct { Params T UserId uint64 // contains filtered or unexported fields }
func (*BetterRequest[T]) GetParams ¶
func (r *BetterRequest[T]) GetParams() T
type NullRequest ¶
type NullRequest BetterRequest[Null]
type Response ¶
type Response struct {
Code int
Data ResultStruct
}
func BuildResponse ¶
func BuildResponse(code int, data ResultStruct) Response
func FailResponse ¶
func SuccessResponse ¶
type ResultStruct ¶
type ResultStruct struct {
Msg any `json:"msg"`
Result any `json:"result"`
Code Status `json:"code"`
}
func FailData ¶
func FailData(msg any) ResultStruct
func SuccessData ¶
func SuccessData(data any) ResultStruct
Click to show internal directories.
Click to hide internal directories.