Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // OauthAccessTokenCacheLimit 缓存 数量 OauthAccessTokenCacheLimit int = 0 // OauthAccessTokenCacheTtl 缓存 过期时间 2 小时 OauthAccessTokenCacheTtl int64 = 1000 * 60 * 60 * 2 )
Functions ¶
This section is empty.
Types ¶
type OauthAccessTokenCache ¶
type OauthAccessTokenCache struct {
*framework.Cache[*module_api.OauthAccessToken]
}
func NewOauthAccessTokenCache ¶
func NewOauthAccessTokenCache() *OauthAccessTokenCache
func (*OauthAccessTokenCache) Add ¶
func (this_ *OauthAccessTokenCache) Add(data *module_api.OauthAccessToken)
func (*OauthAccessTokenCache) Get ¶
func (this_ *OauthAccessTokenCache) Get(name string) (res *module_api.OauthAccessToken)
func (*OauthAccessTokenCache) GetIfPresent ¶
func (this_ *OauthAccessTokenCache) GetIfPresent(token string) (res *module_api.OauthAccessToken)
type OauthAccessTokenService ¶
type OauthAccessTokenService struct {
// contains filtered or unexported fields
}
func NewOauthAccessTokenService ¶
func NewOauthAccessTokenService(httpService httpx.IService) *OauthAccessTokenService
func (*OauthAccessTokenService) GetAccessToken ¶
func (this_ *OauthAccessTokenService) GetAccessToken(name string) (res string, err error)
Click to show internal directories.
Click to hide internal directories.