10#include "faker-cxx/export.h"
11#include "faker-cxx/types/locale.h"
39 bool upperLetters =
true;
40 bool lowerLetters =
true;
61FAKER_CXX_EXPORT std::string
username(std::optional<std::string> firstName = std::nullopt,
62 std::optional<std::string> lastName = std::nullopt,
63 Locale locale = Locale::en_US);
82FAKER_CXX_EXPORT std::string
email(std::optional<std::string> firstName = std::nullopt,
83 std::optional<std::string> lastName = std::nullopt,
84 std::optional<std::string> emailHost = std::nullopt);
98FAKER_CXX_EXPORT std::string
exampleEmail(std::optional<std::string> firstName = std::nullopt,
99 std::optional<std::string> lastName = std::nullopt);
144FAKER_CXX_EXPORT std::string_view
emoji(std::optional<EmojiType> type = std::nullopt);
193FAKER_CXX_EXPORT
unsigned httpStatusCode(std::optional<HttpResponseType> responseType = std::nullopt);
259FAKER_CXX_EXPORT std::string
ipv4(
const std::array<unsigned int, 4>& baseIpv4Address,
260 const std::array<unsigned int, 4>& generationMask);
271FAKER_CXX_EXPORT std::string
ipv6();
284FAKER_CXX_EXPORT std::string
mac(
const std::string& sep =
":");
295FAKER_CXX_EXPORT
unsigned port();
375FAKER_CXX_EXPORT std::string
376getJWTToken(
const std::optional<std::map<std::string, std::string>>& header = std::nullopt,
377 const std::optional<std::map<std::string, std::string>>& payload = std::nullopt,
378 const std::optional<std::string>& refDate = std::nullopt);
FAKER_CXX_EXPORT std::string url(const WebProtocol &webProtocol=WebProtocol::Https)
Generates a random url.
IPv4Class
Definition internet.h:31
FAKER_CXX_EXPORT std::string anonymousUsername(unsigned maxLength)
Generates a random username.
FAKER_CXX_EXPORT unsigned httpStatusCode(std::optional< HttpResponseType > responseType=std::nullopt)
Returns a random http status code.
HttpResponseType
Definition internet.h:16
FAKER_CXX_EXPORT std::string_view httpRequestHeader()
Generates a random http request header.
FAKER_CXX_EXPORT std::string_view getJWTAlgorithm()
Returns the algorithm used for signing the JWT.
FAKER_CXX_EXPORT std::string_view httpMethod()
Generates a random http method name.
FAKER_CXX_EXPORT std::string_view emoji(std::optional< EmojiType > type=std::nullopt)
Returns a random emoji.
FAKER_CXX_EXPORT std::string domainWord()
Generates a random domain word.
FAKER_CXX_EXPORT std::string email(std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt, std::optional< std::string > emailHost=std::nullopt)
Generates an email address using the given person's name as base.
FAKER_CXX_EXPORT std::string domainName()
Generates a random domain name.
FAKER_CXX_EXPORT std::string exampleEmail(std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt)
Generates an email address using the given person's name as base with example domain.
FAKER_CXX_EXPORT std::string getJWTToken(const std::optional< std::map< std::string, std::string > > &header=std::nullopt, const std::optional< std::map< std::string, std::string > > &payload=std::nullopt, const std::optional< std::string > &refDate=std::nullopt)
Generates a JSON Web Token (JWT).
FAKER_CXX_EXPORT std::string password(int length=16, const PasswordOptions &options={})
Generates a random password-like string. Do not use this method for generating actual passwords for u...
FAKER_CXX_EXPORT std::string_view domainSuffix()
Generates a random domain suffix.
FAKER_CXX_EXPORT std::string ipv4(const IPv4Class &ipv4class=IPv4Class::C)
Returns a string containing randomized ipv4 address of the given class.
FAKER_CXX_EXPORT std::string ipv6()
Returns a string containing randomized ipv6 address.
FAKER_CXX_EXPORT std::string_view httpMediaType()
Generates a random http media type.
FAKER_CXX_EXPORT std::string username(std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt, Locale locale=Locale::en_US)
Generates a username using the given person's name as base.
EmojiType
Definition internet.h:119
FAKER_CXX_EXPORT std::string_view httpResponseHeader()
Generates a random http response header.
WebProtocol
Definition internet.h:25
FAKER_CXX_EXPORT std::string_view protocol()
Returns a random web protocol. Either `http` or `https`.
FAKER_CXX_EXPORT bool checkIfEmojiIsValid(const std::string &emojiToCheck)
Verify that a given emoji is valid.
FAKER_CXX_EXPORT std::string mac(const std::string &sep=":")
Returns a generated random mac address.
FAKER_CXX_EXPORT unsigned port()
Generates a random port.