User Generator 2.1.2
Synthetic user records for apps and test data, composed from the other dasmig generators for C++23
Loading...
Searching...
No Matches
usergen.hpp File Reference

User Generator library — synthetic user records for apps and test data, composed from the other dasmig generators for C++23. More...

#include "core.hpp"
#include <algorithm>
#include <array>
#include <chrono>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <filesystem>
#include <format>
#include <map>
#include <optional>
#include <ostream>
#include <span>
#include <stdexcept>
#include <string>
#include <string_view>
#include <system_error>
#include <utility>
#include <vector>
#include <dasmig/addressgen.hpp>
#include <dasmig/birthgen.hpp>
#include <dasmig/countrygen.hpp>
#include <dasmig/devicegen.hpp>
#include <dasmig/emailgen.hpp>
#include <dasmig/namegen.hpp>
#include <dasmig/nicknamegen.hpp>
#include <dasmig/phonegen.hpp>

Go to the source code of this file.

Classes

struct  dasmig::password_policy
 The rules a generated password follows. More...
 
struct  dasmig::user_request
 What a user call asks for. More...
 
struct  dasmig::user_account
 The online side of a user: the login, the dates, the device and the regional settings. More...
 
class  dasmig::user
 Return type for user generation. More...
 
class  dasmig::usg
 User Generator: composes synthetic user records. More...
 
struct  dasmig::usg::sources
 The library instances a user is drawn from. More...
 

Enumerations

enum class  dasmig::password_style : std::uint8_t { random , human }
 How a password is drawn. More...
 
enum class  dasmig::user_table : std::uint8_t {
  platforms , platform_shares , statuses , languages ,
  locales , timezones , password_words , password_patterns
}
 The tables of the user data, for extending it. More...
 

Detailed Description

User Generator library — synthetic user records for apps and test data, composed from the other dasmig generators for C++23.

Author
Diego Dasso Migotto (diegomigotto at hotmail dot com)
See also
See doc/usage.md for the narrative tutorial.

Definition in file usergen.hpp.

Enumeration Type Documentation

◆ password_style

enum class dasmig::password_style : std::uint8_t
strong

How a password is drawn.

Enumerator
random 

Characters drawn alike from the allowed classes.

human 

What people choose: a common word with digits, a year or a symbol, a name, a keyboard walk.

Definition at line 51 of file usergen.hpp.

◆ user_table

enum class dasmig::user_table : std::uint8_t
strong

The tables of the user data, for extending it.

Enumerator
platforms 

platforms.tsv: the devices and their global shares.

platform_shares 

platform_shares.tsv: per-country shares, in percent, that replace the global weights.

statuses 

statuses.tsv: the account statuses, their shares and how they log in.

languages 

languages.tsv: language names to codes, for countries without a locale row.

locales 

locales.tsv: the locale tags of each country.

timezones 

timezones.tsv: the time zones of each country.

password_words 

password_words.tsv: the words and whole passwords of the human password style.

password_patterns 

password_patterns.tsv: how the human style puts a password together.

Definition at line 287 of file usergen.hpp.