ores.cpp.nats-sub-registrar.nats_registrar_header
Per-entity NATS sub-registrar header declaring register_<entity>_handlers().
nats-sub-registrar 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_nats_registrar.hpp.mustache.
{{! GENERATED FILE — tangled from projects/ores.codegen/library/templates/ores.cpp.nats-sub-registrar.nats_registrar_header.org. Edit the org source. }}
{{{cpp_license}}}
{{#domain_entity}}
#ifndef ORES_{{component_core_upper}}_MESSAGING_{{entity_singular_upper}}_REGISTRAR_HPP
#define ORES_{{component_core_upper}}_MESSAGING_{{entity_singular_upper}}_REGISTRAR_HPP
#include "ores.database/domain/context.hpp"
#include "ores.nats/service/client.hpp"
#include "ores.nats/service/subscription.hpp"
#include "ores.security/jwt/jwt_authenticator.hpp"
#include <optional>
#include <vector>
namespace ores::{{component}}::messaging {
std::vector<ores::nats::service::subscription>
register_{{entity_singular}}_handlers(ores::nats::service::client& nats,
ores::database::context ctx,
std::optional<ores::security::jwt::jwt_authenticator> verifier);
} // namespace ores::{{component}}::messaging
#endif
{{/domain_entity}}
{{#junction}}
#ifndef ORES_{{component_core_upper}}_MESSAGING_{{name_singular_upper}}_REGISTRAR_HPP
#define ORES_{{component_core_upper}}_MESSAGING_{{name_singular_upper}}_REGISTRAR_HPP
#include "ores.database/domain/context.hpp"
#include "ores.nats/service/client.hpp"
#include "ores.nats/service/subscription.hpp"
#include "ores.security/jwt/jwt_authenticator.hpp"
#include <optional>
#include <vector>
namespace ores::{{component}}::messaging {
std::vector<ores::nats::service::subscription>
register_{{name_singular}}_handlers(ores::nats::service::client& nats,
ores::database::context ctx,
std::optional<ores::security::jwt::jwt_authenticator> verifier);
} // namespace ores::{{component}}::messaging
#endif
{{/junction}}
{{#entity}}
#ifndef ORES_{{component_core_upper}}_MESSAGING_{{entity_singular_upper}}_REGISTRAR_HPP
#define ORES_{{component_core_upper}}_MESSAGING_{{entity_singular_upper}}_REGISTRAR_HPP
#include "ores.database/domain/context.hpp"
#include "ores.nats/service/client.hpp"
#include "ores.nats/service/subscription.hpp"
#include "ores.security/jwt/jwt_authenticator.hpp"
#include <optional>
#include <vector>
namespace ores::{{component}}::messaging {
std::vector<ores::nats::service::subscription>
register_{{entity_singular}}_handlers(ores::nats::service::client& nats,
ores::database::context ctx,
std::optional<ores::security::jwt::jwt_authenticator> verifier);
} // namespace ores::{{component}}::messaging
#endif
{{/entity}}
See also
- Parent facet: ores.cpp.nats-sub-registrar
- Template variable reference
- ores.cpp.nats-handler.nats_handler_header — the handler this sub-registrar includes.