user

package
v0.0.0-...-f68b460 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidEmail

func IsValidEmail(email string) bool

IsValidEmail checks if an email is valid

func IsValidPassword

func IsValidPassword(password string) bool

IsValidPassword checks if a password meets the minimum requirements

Types

type User

type User struct {
	ID            *int    `json:"id"`
	Email         string  `json:"email"`
	PasswordHash  *string `json:"password_hash"`
	IsSso         bool    `json:"is_sso"`
	SsoUserID     *string `json:"sso_user_id"`
	SsoProviderID *int    `json:"sso_provider_id"`
	IsAdmin       bool    `json:"is_admin"`
}

User represents a user in the system

func (*User) FromJSON

func (u *User) FromJSON(jsonStr string) error

FromJSON parses a JSON string into the struct

func (*User) ToJSON

func (u *User) ToJSON() (string, error)

ToJSON converts the struct to a JSON string

func (*User) ValidatePassword

func (u *User) ValidatePassword(password string) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL