Versions in this module Expand all Collapse all v1 v1.0.3 Sep 12, 2024 v1.0.2 Sep 9, 2024 v1.0.1 Sep 8, 2024 Changes in this version + func CtxRemoteIpGet(c *gin.Context) string + func CtxRemoteIpSet(c *gin.Context, ip string) + func CtxRequestGet(c *gin.Context) any + func CtxRequestSet(c *gin.Context, req any) + func CtxResponseSet(c *gin.Context, rsp *Response) + func CtxUserIdGet(c *gin.Context) core.TUserID + func CtxUserIdSet(c *gin.Context, uid core.TUserID) + func CtxUserNameGet(c *gin.Context) string + func CtxUserNameSet(c *gin.Context, name string) + func GetRunMode() string + func Install(conf *Config) ctl.IControler + func Observe(callback TObserveCallBack) + func Register(r IGroupRouter) + func RegisterRender(r IRender) + func Service(c *gin.Context, s IService) + func SetRunMode(mode string) + type Config struct + ListenAddr string + ListnTls ListenTLS + ReadTimeout int + RunMode string + WriteTimeout int + type ECode int + const ECodeCodeCrypt + const ECodeExtendBegin1000 + const ECodeLogicErr + const ECodeMDBError + const ECodeParamErr + const ECodeRDBError + const ECodeSucessed + const ECodeSysError + func (e ECode) String() string + type ESRenderMode int + const ESRender_Json + const ESRender_None + const ESRender_Pbuf + const ESRender_Xml + const ESRender_Yaml + func (e ESRenderMode) String() string + type GinLogger struct + func (this GinLogger) Write(p []byte) (n int, err error) + type GinRecover struct + func (this GinRecover) Write(p []byte) (n int, err error) + type GroupRouter struct + func (gr *GroupRouter) API(group *gin.RouterGroup, relativePath string, service IService, ...) + func (gr *GroupRouter) Base() *gin.RouterGroup + type IContrler interface + var Ctl IContrler + func Controller(conf *Config) IContrler + type IGroupRouter interface + Init func(group *GroupRouter) + Name func() string + type IRender interface + Mode func() ESRenderMode + Render func(c *gin.Context, status int, rsp *Response) + func MakeRender(mode ESRenderMode) IRender + type ISRenderModer interface + RenderMode func() ESRenderMode + type IService interface + Handle func(meta metactx.IContext) Response + type ListenTLS struct + CrtFile string + Enable bool + KeyFile string + type Response struct + Code int + Data any + Error string + Msg string + func CtxResponseGet(c *gin.Context) *Response + func RespBindErr(err error) Response + func RespData[T util.IntStringer](code T, msg string, data any) Response + func RespErr[T util.IntStringer](code T, msg string, err error) Response + func RespFile(c *gin.Context, filePath string) Response + func RespLogicErr(msg string, err error) Response + func RespMDBErr(msg string, err error) Response + func RespOK(msg string, data any) Response + func RespParamErr(msg string, err error) Response + func RespRDBErr(msg string, err error) Response + func RespSysErr(msg string, err error) Response + func (r *Response) Sucessed() bool + type TObserveCallBack func(path string, service IService)