Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomRefreshToken ¶
func RandomRefreshToken() string
RandomRefreshToken generates a random refresh token
func RandomSessionToken ¶
func RandomSessionToken() string
RandomSessionToken generates a random session token
Types ¶
type UserAccount ¶
type UserAccount struct {
ID string `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
Password string `json:"password"`
PasswordHash string `json:"password_hash"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
FullName string `json:"full_name"`
Phone string `json:"phone"`
IPAddress string `json:"ip_address"`
Avatar string `json:"avatar"`
Bio string `json:"bio"`
Website string `json:"website"`
Location string `json:"location"`
Timezone string `json:"timezone"`
Language string `json:"language"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
LastLoginAt time.Time `json:"last_login_at"`
IsActive bool `json:"is_active"`
Role string `json:"role"`
Department string `json:"department"`
}
UserAccount represents a randomly generated user account
func RandomUserAccount ¶
func RandomUserAccount() *UserAccount
RandomUserAccount generates a random user account
func RandomUserAccountWithOptions ¶
func RandomUserAccountWithOptions(opts *UserAccountOptions) *UserAccount
RandomUserAccountWithOptions generates a random user account with custom options
func RandomUserAccounts ¶
func RandomUserAccounts(count int) []*UserAccount
RandomUserAccounts generates multiple random user accounts
func RandomUserAccountsWithOptions ¶
func RandomUserAccountsWithOptions(count int, opts *UserAccountOptions) []*UserAccount
RandomUserAccountsWithOptions generates multiple random user accounts with custom options
type UserAccountOptions ¶
type UserAccountOptions struct {
IncludePassword bool `json:"include_password"`
IncludeHash bool `json:"include_hash"`
Roles []string `json:"roles"`
Departments []string `json:"departments"`
Languages []string `json:"languages"`
Timezones []string `json:"timezones"`
}
UserAccountOptions contains options for generating user accounts
func DefaultUserAccountOptions ¶
func DefaultUserAccountOptions() *UserAccountOptions
DefaultUserAccountOptions returns default options for user account generation
Click to show internal directories.
Click to hide internal directories.