Versions in this module Expand all Collapse all v1 v1.0.0 Nov 26, 2023 Changes in this version + const ContextUser + const ErrorTokenExpired + const ErrorTokenInvalid + const ErrorTokenMalformed + const ErrorTokenMissing + const ErrorTokenNotValidYet + const JWTToken + var App = &AppStart + func Addr(addr string, hostConfigs ...host.Configurator) iris.Runner + func AddrServer(addr string) *http.Server + func AllocsHandler() iris.Handler + func BindRestAPIs(g iris.Party, api interface{}) + func BlockHandler() iris.Handler + func CmdlineHandler() iris.Handler + func ConcurrentLimit(n int) iris.Handler + func GoroutineHandler() iris.Handler + func HeapHandler() iris.Handler + func HttpHandler2IrisHandler(h http.Handler) iris.Handler + func IndexHandler() iris.Handler + func Logger() util.ItfLogger + func MutexHandler() iris.Handler + func PProfWrapGroup(party iris.Party) + func ParseRestFunc2handler(fn any, receivers ...any) iris.Handler + func ProfileHandler() iris.Handler + func RPCServer2IrisHandler(s j2rpc.Server) iris.Handler + func RateLimiter() context.Handler + func RestJSONError(c iris.Context, args ...interface{}) + func RestJSONSuccess(c iris.Context, vs ...interface{}) error + func SymbolHandler() iris.Handler + func ThreadCreateHandler() iris.Handler + func TraceHandler() iris.Handler + type AppStart struct + Captcha *Captcha + IrisApp *iris.Application + RPC j2rpc.Server + WebLogger *midLogger + func (a *AppStart) Constructor() + func (a *AppStart) RootParty() iris.Party + func (a *AppStart) RouteApp() iris.Party + func (a *AppStart) Shutdown() + func (a *AppStart) StartApp(opt StartOption) + func (a *AppStart) Wait() + type Captcha struct + Driver base64Captcha.Driver + Store base64Captcha.Store + func (c *Captcha) Captcha() iris.Handler + func (c *Captcha) Generate() (arg CaptchaArg, err error) + func (c *Captcha) Verify(arg *CaptchaArg) bool + type CaptchaArg struct + Answer string + Content string + ID string + type ItfTokenStore interface + ClearExpiredToken func() + DelToken func(key string) + GetToken func(key string) (t *Token, has bool) + SetToken func(key string, t *Token) + type JSONResponse struct + Code int + Data interface{} + Msg string + type JWT struct + Expire int64 + Store ItfTokenStore + func DefaultJWT() *JWT + func (*JWT) User(ctx iris.Context) interface{} + func (j *JWT) AfterLogin(id string) (t *Token) + func (j *JWT) Logout(id string) + func (j *JWT) New() *JWT + func (j *JWT) Verify(c iris.Context, call func(id string) (user interface{}, err error)) (err error) + type StartOption struct + PORT string + PPROF string + type Token struct + ExpiresAt int64 + ID string + Token string