Archetype: cpp_service_config_options.hpp.mustache
Option declarations. component-service profile.
See the Template variable reference for the complete list of available variables and their semantics.
Template
The full template source. Edit here and re-tangle with
compass build --direct tangle_codegen_templates to regenerate
library/templates/cpp_service_config_options.hpp.mustache.
{{! GENERATED FILE — tangled from projects/ores.codegen/library/templates/cpp_service_app.org. Edit the org source. }}
{{{cpp_license}}}
{{#component}}
#ifndef {{full_name_upper}}_CONFIG_OPTIONS_HPP
#define {{full_name_upper}}_CONFIG_OPTIONS_HPP
#include <iosfwd>
#include <optional>
#include "ores.logging/logging_options.hpp"
#include "ores.database/domain/database_options.hpp"
#include "ores.nats/config/nats_options.hpp"
namespace {{namespace}}::config {
/**
* @brief All of the configuration options required by the service.
*/
struct options final {
/**
* @brief Configuration options related to logging, if any.
*/
std::optional<ores::logging::logging_options> logging;
/**
* @brief Configuration related to NATS transport.
*/
ores::nats::config::nats_options nats;
/**
* @brief Configuration related to database operations.
*/
ores::database::database_options database;
};
std::ostream& operator<<(std::ostream& s, const options& v);
}
#endif
{{/component}}
See also
- Parent facet: C++ service application templates
- Template variable reference