Documentation
¶
Index ¶
Constants ¶
View Source
const ( SIGNUP = "signup" LOGIN = "login" )
Variables ¶
This section is empty.
Functions ¶
func GenerateOTP ¶
func HashVerify ¶
HashVerify checks if the provided code is correct or not
func NormalizeEmail ¶
func ToNullString ¶
func ToNullString(s string) sql.NullString
Types ¶
type Config ¶
type Config struct { DBDriver string `mapstructure:"DB_DRIVER"` DBSource string `mapstructure:"DB_SOURCE"` ServerAddress string `mapstructure:"SERVER_ADDRESS"` TwillioAccountSID string `mapstructure:"Twillio_Account_SID"` TwillioAuthToken string `mapstructure:"Twillio_Auth_Token"` TokenSymmetricKey string `mapstructure:"TOKEN_SYMMETRIC_KEY"` AccessTokenDuration time.Duration `mapstructure:"ACCESS_TOKEN_DURATION"` RefreshTokenDuration time.Duration `mapstructure:"REFRESH_TOKEN_DURATION"` AuthTokenExpiry time.Duration `mapstructure:"AUTH_TOKEN_EXPIRY"` }
Config stores all configuration of the application. The values are read by viper from a config file or environment variable.
func LoadConfig ¶
LoadConfig reads configuration from file or env variables
type PhoneDetails ¶
func VerifyPhone ¶
func VerifyPhone(phoneNumber, accountSid, authToken string) (PhoneDetails, error)
Click to show internal directories.
Click to hide internal directories.