Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenerateOTP ¶
type LoginRequest ¶
for Login Request
type RegisterUser ¶
type RegisterUser struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Username string `json:"username"` Email string `json:"email"` Password string `json:"password"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` LastLogin time.Time `json:"last_login"` }
For Registering new user
func NewRegisterUser ¶
func NewRegisterUser(name, username, email, password string) *RegisterUser
type ScanSecret ¶
type ScanSecret struct {
Secret string `json:"secret"`
}
type User ¶
type User struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Username string `json:"username"` Email string `json:"email"` Password string `json:"password"` Otp_enabled bool `json:"otp_enabled"` Otp_verified bool `json:"otp_verified"` Otp_secret string `json:"otp_secret"` Otp_auth_url string `json:"otp_auth_url"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` LastLogin time.Time `json:"last_login"` }
For creating new table in the database
type UserProfile ¶
type UserProfile struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Username string `json:"username"` Email string `json:"email"` Password string `json:"-"` Otp_enabled bool `json:"otp_enabled"` Otp_verified bool `json:"otp_verified"` Otp_secret sql.NullString `json:"otp_secret"` Otp_auth_url sql.NullString `json:"otp_auth_url"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` LastLogin time.Time `json:"last_login"` }
for get endpoint
Click to show internal directories.
Click to hide internal directories.