Faker C++
Toggle main menu visibility
Loading...
Searching...
No Matches
git.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <optional>
4
#include <string>
5
6
#include "faker-cxx/export.h"
7
#include "faker-cxx/types/locale.h"
8
9
namespace
faker::git
10
{
11
struct
FAKER_CXX_EXPORT
Author
12
{
13
std::string
name
;
14
std::string
email
;
15
};
16
17
enum class
BranchIssueType
18
{
19
WithoutIssueNumber
,
20
WithIssueNumber
,
21
};
22
35
FAKER_CXX_EXPORT std::string
branch
(std::optional<BranchIssueType> issueType = std::nullopt,
36
unsigned
maxIssueNum = 100);
37
49
FAKER_CXX_EXPORT std::string
commitDate
(
unsigned
years = 15);
50
68
FAKER_CXX_EXPORT std::string
commitEntry
(std::optional<unsigned> dateYears = std::nullopt,
69
std::optional<unsigned> shaLength = std::nullopt,
70
Locale locale = Locale::en_US);
71
81
FAKER_CXX_EXPORT std::string
commitMessage
();
82
94
FAKER_CXX_EXPORT std::string
commitSha
(
unsigned
length = 40);
95
}
faker::git
Definition
git.h:10
faker::git::commitMessage
FAKER_CXX_EXPORT std::string commitMessage()
Generates a random commit message.
faker::git::commitSha
FAKER_CXX_EXPORT std::string commitSha(unsigned length=40)
Returns a random SHA hash.
faker::git::branch
FAKER_CXX_EXPORT std::string branch(std::optional< BranchIssueType > issueType=std::nullopt, unsigned maxIssueNum=100)
Returns a random branch name.
faker::git::commitEntry
FAKER_CXX_EXPORT std::string commitEntry(std::optional< unsigned > dateYears=std::nullopt, std::optional< unsigned > shaLength=std::nullopt, Locale locale=Locale::en_US)
Generates a random commit entry in form of string.
faker::git::commitDate
FAKER_CXX_EXPORT std::string commitDate(unsigned years=15)
Generates a random date in form of string.
faker::git::BranchIssueType
BranchIssueType
Definition
git.h:18
faker::git::BranchIssueType::WithIssueNumber
@ WithIssueNumber
Definition
git.h:20
faker::git::BranchIssueType::WithoutIssueNumber
@ WithoutIssueNumber
Definition
git.h:19
faker::git::Author
Definition
git.h:12
faker::git::Author::name
std::string name
Definition
git.h:13
faker::git::Author::email
std::string email
Definition
git.h:14
include
faker-cxx
git.h
Generated by
1.17.0