Documentation ¶
Index ¶
- Variables
- func BindBody(body map[string]interface{}, data interface{}) bool
- func CheckBoolAndReturnString(b bool, trueString string, falseString string) (bool, string)
- func CreateChallenge(publicKeyStr string) (string, models.Challenge, error)
- func CreateVerification(entityId uuid.UUID, args ...interface{}) models.Verification
- func EncodeToString(max int) string
- func GenerateChallengeExpiryDate() time.Time
- func GenerateCode() string
- func GenerateToken(str string) string
- func GenerateTokenExpiryDate() time.Time
- func GenerateVerificationExpiryDate() time.Time
- func GenerateVerificationUrl(id string, code string) (string, bool)
- func GetEnv(varNameString string, defaultValue string) string
- func IsEmailDomainTesting(email string) bool
- func IsEmailValid(email string) bool
- func IsPublicKeyValid(publicKey string) bool
- func IsTestingDomain(domain string) bool
- func IsUUIDValid(u string) bool
- func NewUUID() uuid.UUID
- func NewUUIDStr() string
- func ParseAndSet(c *gin.Context, args []models.Args, key string, defaultValue interface{})
- func ParseArgs(args []models.Args, key string, defaultValue interface{}) interface{}
- func PgErrorCodeAndMessage(err error) (string, string)
- func SendMailByElasticMail(toEmail, emailSubject, bodyHtml string) (bool, string)
- func SolveChallenge(challenge models.Challenge) (string, bool)
- func SolveChallengeString(str string) (string, bool)
- func StrToUUID(s string) uuid.UUID
- func TimeNowAfterDays(days int) time.Time
- func UUIDToStr(id uuid.UUID) string
- func VerifySignature(publicKeyStr string, signatureStr string, message string) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var TestingDomains []string = []string{"localhost"}
TODO USE CONFIG TO STORE Array
Functions ¶
func CreateVerification ¶
func CreateVerification(entityId uuid.UUID, args ...interface{}) models.Verification
Args Type, UserID, Email
func EncodeToString ¶
func GenerateCode ¶
func GenerateCode() string
func GenerateToken ¶
func GenerateTokenExpiryDate ¶
func IsEmailDomainTesting ¶
func IsEmailValid ¶
func IsPublicKeyValid ¶
func IsTestingDomain ¶
func IsUUIDValid ¶
func NewUUIDStr ¶
func NewUUIDStr() string
func ParseAndSet ¶
func PgErrorCodeAndMessage ¶
func SendMailByElasticMail ¶
TODO: To update
func SolveChallengeString ¶
func TimeNowAfterDays ¶
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.