Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
util::config::ClioConfigDescription Struct Reference

All the config description are stored and extracted from this class. More...

#include <ConfigDescription.hpp>

Classes

struct  KV
 Struct to represent a key-value pair. More...
 

Public Member Functions

constexpr ClioConfigDescription ()=default
 Constructs a new Clio Config Description based on pre-existing descriptions.
 

Static Public Member Functions

static constexpr std::string_view get (std::string_view key)
 Retrieves the description for a given key.
 
static std::expected< void, ErrorgenerateConfigDescriptionToFile (std::filesystem::path path)
 Generate markdown file of all the clio config descriptions.
 
static void writeConfigDescriptionToFile (std::ostream &file)
 Writes to Config description to file.
 

Detailed Description

All the config description are stored and extracted from this class.

Represents all the possible config description

Constructor & Destructor Documentation

◆ ClioConfigDescription()

util::config::ClioConfigDescription::ClioConfigDescription ( )
constexprdefault

Constructs a new Clio Config Description based on pre-existing descriptions.

Config Keys and it's corresponding descriptions are all predefined. Used to generate markdown file

Member Function Documentation

◆ generateConfigDescriptionToFile()

static std::expected< void, Error > util::config::ClioConfigDescription::generateConfigDescriptionToFile ( std::filesystem::path path)
inlinestaticnodiscard

Generate markdown file of all the clio config descriptions.

Parameters
pathThe path location to generate the Config-description file
Returns
An Error if generating markdown fails, otherwise nothing

◆ get()

static constexpr std::string_view util::config::ClioConfigDescription::get ( std::string_view key)
inlinestaticnodiscardconstexpr

Retrieves the description for a given key.

Parameters
keyThe key to look up the description for
Returns
The description associated with the key, or "Not Found" if the key does not exist

◆ writeConfigDescriptionToFile()

static void util::config::ClioConfigDescription::writeConfigDescriptionToFile ( std::ostream & file)
inlinestatic

Writes to Config description to file.

Parameters
fileThe config file to write to

The documentation for this struct was generated from the following file: