2022-02-16 15:49:17 +00:00
|
|
|
package domain
|
|
|
|
|
2024-08-13 12:52:43 +00:00
|
|
|
//go:generate enumer -type SecretGeneratorType -transform snake -trimprefix SecretGeneratorType
|
2022-02-16 15:49:17 +00:00
|
|
|
type SecretGeneratorType int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
SecretGeneratorTypeUnspecified SecretGeneratorType = iota
|
|
|
|
SecretGeneratorTypeInitCode
|
|
|
|
SecretGeneratorTypeVerifyEmailCode
|
|
|
|
SecretGeneratorTypeVerifyPhoneCode
|
2022-04-12 14:20:17 +00:00
|
|
|
SecretGeneratorTypeVerifyDomain
|
2022-02-16 15:49:17 +00:00
|
|
|
SecretGeneratorTypePasswordResetCode
|
|
|
|
SecretGeneratorTypePasswordlessInitCode
|
|
|
|
SecretGeneratorTypeAppSecret
|
2023-07-26 11:00:41 +00:00
|
|
|
SecretGeneratorTypeOTPSMS
|
|
|
|
SecretGeneratorTypeOTPEmail
|
2024-09-11 10:53:55 +00:00
|
|
|
SecretGeneratorTypeInviteCode
|
2024-11-28 10:06:52 +00:00
|
|
|
SecretGeneratorTypeSigningKey
|
2022-02-16 15:49:17 +00:00
|
|
|
|
|
|
|
secretGeneratorTypeCount
|
|
|
|
)
|
|
|
|
|
2022-04-12 14:20:17 +00:00
|
|
|
func (t SecretGeneratorType) Valid() bool {
|
|
|
|
return t > SecretGeneratorTypeUnspecified && t < secretGeneratorTypeCount
|
|
|
|
}
|
|
|
|
|
2022-02-16 15:49:17 +00:00
|
|
|
type SecretGeneratorState int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
SecretGeneratorStateUnspecified SecretGeneratorState = iota
|
|
|
|
SecretGeneratorStateActive
|
|
|
|
SecretGeneratorStateRemoved
|
|
|
|
)
|