Versions in this module Expand all Collapse all v0 v0.1.3 Jul 8, 2026 Changes in this version + const MaxDataSize + const MaxStringLength + const ResponseStatus_Fail + const ResponseStatus_OK + var ResponseStatusMap = map[int]string + func Execute(serverName, serverShort string) error + func Request[T any](ctx *gin.Context) (req T, err error) + func Response(ctx *gin.Context, opts ...RespOption) + func SetBeforeRun(f func()) + func SetRouter(f func(root *gin.Engine)) + type PageInfo struct + Page int64 + PageSize int64 + Total int64 + type Req struct + Data T + PageInfo PageInfo + Query map[string]any + func PageRequest[T any](ctx *gin.Context) (req Req[T], err error) + type Resp struct + Code int + Data any + Msg string + PageInfo *PageInfo + T int64 + func (r *Resp) SetResponseFunc(fn func(*gin.Context)) + type RespOption func(*gin.Context, *Resp) + func AsAsciiJSON() RespOption + func AsCustomerSet(fn func(c *gin.Context, r *Resp)) RespOption + func AsData(contentType string) RespOption + func AsDataFromReader(contentType string, reader io.Reader) RespOption + func AsFile(filePath string) RespOption + func AsFileAttachment(filePath, fileName string) RespOption + func AsFileFromFS(filePath string, fs http.FileSystem) RespOption + func AsHTML(templateName string) RespOption + func AsInnerJson() RespOption + func AsJSON() RespOption + func AsJSONP() RespOption + func AsPureJSON() RespOption + func AsSecureJSON() RespOption + func AsString() RespOption + func AsXML() RespOption + func AsYAML() RespOption + func WithCode(code int) RespOption + func WithCustomerSet(fn func(c *gin.Context, r *Resp)) RespOption + func WithData(data any) RespOption + func WithError(err error, code ...int) RespOption + func WithHttpCode(code int) RespOption + func WithMsg(msg string) RespOption + func WithPageInfo(p PageInfo) RespOption