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.2.3 X-Git-Url: https://git.uzoombox.com/git/?a=commitdiff_plain;h=bbe3baa5291dcb9c06a89a56fe28eb308d158d02;p=uzsdk.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. }