Documentation ¶
Index ¶
- Constants
- func AccessTokenExpireDuration() time.Duration
- func GrpcMatadataDebugOpen()
- func GrpcMatadataSetResultFail(ctx context.Context, rsp interface{})
- func IsBase64(b64 string) bool
- func IsEmail(email string) bool
- func IsPassword(passwod string) bool
- func IsPhone(phone string) bool
- func IsVerifyCode(verifyCode string) bool
- func RedisAccessTokenKey(accessToken string) string
- func RedisCredentialsKey(id, pwd string) string
- func RedisGetRefreshTokenFromAccessToken(key string) string
- func RedisRefreshTokenKey(refreshToken string) string
- func RefreshTokenExpireDuration() time.Duration
- func TinyURLExpireDuration() time.Duration
- type Blog
Constants ¶
View Source
const ( GrpcMatadataResult_Key = "debug" GrpcMsgSize = 1024 * 1024 * 1024 )
View Source
const ( AccessTokenExpire = int64(1 * 60) // AccessTokenExpire time RefreshTokenExpire = int64(1 * 24 * 60) // RefreshTokenExpire time TokenType_Bearer = "Bearer" // TokenType_Bearer AccessTokenContextKey = "access_token" // AccessTokenContextKey context key RefreshTokenContextKey = "refresh_token" // RefreshTokenContextKey context key AuthMethodName = "MethodName" // AuthMethodName Prefix_CredentialKey = "/SVR/USR/CRED/%s/%s" // Prefix_CredentialKey used in db service Prefix_AccessTokenKey = "/SVR/USR/TOKEN/ACC/%s" // Prefix_AccessTokenKey used in db service Prefix_RefreshTokenKey = "/SVR/USR/TOKEN/REF/%s" // Prefix_RefreshTokenKey used in db service Size_RefreshToken = int(6) // Size_RefreshToken Size_AccessToken = int(6) // Size_AccessToken )
View Source
const ( // For TinyURL TinyURLExpire = int64(0) // TinyURLExpire time Prefix_TinyURLKey = "/SVR/TINY/URL/%s" // Prefix_TinyURLKey used in db service )
-----------------------------------------------------------------------
View Source
const ( PastebinSyntaxRaw = "raw" PastebinSyntaxMarkdown = "markdown" )
Variables ¶
This section is empty.
Functions ¶
func AccessTokenExpireDuration ¶
AccessTokenExpireDuration return the access token expire duration (time.Duration)
func GrpcMatadataSetResultFail ¶
GrpcMatadataSetResultFail set fail
func RedisAccessTokenKey ¶
RedisAccessTokenKey return the access token key
func RedisCredentialsKey ¶
RedisCredentialsKey return the credentials key
func RedisGetRefreshTokenFromAccessToken ¶
RedisGetRefreshTokenFromAccessToken return the access token by refresh token
func RedisRefreshTokenKey ¶
RedisRefreshTokenKey return the refresh token key
func RefreshTokenExpireDuration ¶
RefreshTokenExpireDuration return the refresh token expire duration (time.Duration)
func TinyURLExpireDuration ¶
TinyURLExpireDuration return the access token expire duration (time.Duration)
Types ¶
Click to show internal directories.
Click to hide internal directories.