UPDATE: Media module
All checks were successful
Build and Release / release (push) Successful in 1m7s
All checks were successful
Build and Release / release (push) Successful in 1m7s
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package constants
|
||||
|
||||
const (
|
||||
StreamEmailName = "stream:email_tasks"
|
||||
GroupEmailName = "email_workers_group"
|
||||
StreamEmailName = "stream:email_tasks"
|
||||
StreamStorageName = "stream:storage_tasks"
|
||||
GroupEmailName = "email_workers_group"
|
||||
GroupStorageName = "storage_workers_group"
|
||||
)
|
||||
|
||||
@@ -4,8 +4,9 @@ type TaskType string
|
||||
|
||||
const (
|
||||
TaskTypeSendEmailOTP TaskType = "SEND_EMAIL_OTP"
|
||||
)
|
||||
TaskTypeDeleteMedia TaskType = "DELETE_MEDIA"
|
||||
)
|
||||
|
||||
func (t TaskType) String() string {
|
||||
return string(t)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,4 +10,6 @@ const (
|
||||
AccessTokenDuration = 15 * time.Minute
|
||||
RefreshTokenDuration = 7 * 24 * time.Hour
|
||||
TokenVerifiedDuration = 10 * time.Minute
|
||||
PreSignedURLDuration = 15 * time.Minute
|
||||
TokenUploadDuration = 1 * time.Hour
|
||||
)
|
||||
|
||||
@@ -6,7 +6,7 @@ const (
|
||||
TokenPasswordReset TokenType = 1
|
||||
TokenEmailVerify TokenType = 2
|
||||
TokenMagicLink TokenType = 3
|
||||
TokenRefreshToken TokenType = 4
|
||||
TokenUpload TokenType = 4
|
||||
)
|
||||
|
||||
func (t TokenType) String() string {
|
||||
@@ -17,8 +17,8 @@ func (t TokenType) String() string {
|
||||
return "EMAIL_VERIFY"
|
||||
case TokenMagicLink:
|
||||
return "LOGIN_MAGIC_LINK"
|
||||
case TokenRefreshToken:
|
||||
return "REFRESH_TOKEN"
|
||||
case TokenUpload:
|
||||
return "UPLOAD"
|
||||
default:
|
||||
return "UNKNOWN"
|
||||
}
|
||||
@@ -37,7 +37,7 @@ func ParseTokenType(v int16) TokenType {
|
||||
case 3:
|
||||
return TokenMagicLink
|
||||
case 4:
|
||||
return TokenRefreshToken
|
||||
return TokenUpload
|
||||
default:
|
||||
return 0
|
||||
}
|
||||
@@ -51,9 +51,9 @@ func ParseTokenTypeFromString(s string) TokenType {
|
||||
return TokenEmailVerify
|
||||
case "LOGIN_MAGIC_LINK":
|
||||
return TokenMagicLink
|
||||
case "REFRESH_TOKEN":
|
||||
return TokenRefreshToken
|
||||
case "UPLOAD":
|
||||
return TokenUpload
|
||||
default:
|
||||
return 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user