From: bruce Date: Tue, 13 Jun 2023 02:50:03 +0000 (+0800) Subject: fix(service): change CheckToken from pointer to Function. X-Git-Tag: v0.3.0~5 X-Git-Url: https://git.uzoombox.com/git/?a=commitdiff_plain;h=ba257352162c29162998e409b4d5f45ff5bdc2b5;p=uzsdk-v0.3.1.git fix(service): change CheckToken from pointer to Function. --- diff --git a/uzsdk/service.go b/uzsdk/service.go index f513d83..ac63db6 100644 --- a/uzsdk/service.go +++ b/uzsdk/service.go @@ -140,10 +140,10 @@ type TokenCheckFunc func(token string, options ...interface{}) bool // Instance is the framework's instance, used for server & plugin both. type Instance struct { - Conf *Configuration // configuration of this application. - Db *sqlx.DB // the first database connection created by main routine. - Logger *logger.Logger // logger created by main routine. - Router *gin.Engine // default webservice engine created by main routine. - Maintenance bool // when maintenance mode is true, only serve api /config. - CheckToken *TokenCheckFunc // pointer of check token function. + Conf *Configuration // configuration of this application. + Db *sqlx.DB // the first database connection created by main routine. + Logger *logger.Logger // logger created by main routine. + Router *gin.Engine // default webservice engine created by main routine. + Maintenance bool // when maintenance mode is true, only serve api /config. + CheckToken TokenCheckFunc // function of check token. }