20#ifndef ORES_VARIABILITY_SERVICE_FEATURE_FLAGS_SERVICE_HPP
21#define ORES_VARIABILITY_SERVICE_FEATURE_FLAGS_SERVICE_HPP
26#include "ores.utility/log/make_logger.hpp"
27#include "ores.database/domain/context.hpp"
28#include "ores.variability/domain/feature_flags.hpp"
29#include "ores.variability/repository/feature_flags_repository.hpp"
31namespace ores::variability::service {
41 inline static std::string_view logger_name =
42 "ores.variability.service.feature_flags_service";
44 [[nodiscard]]
static auto& lg() {
46 static auto instance = make_logger(logger_name);
65 const std::string& name);
Implements logging for ORE Studio.
Definition lifecycle_manager.hpp:30
Context for the operations on a postgres database.
Definition context.hpp:30
Represents a feature flag in the domain layer.
Definition feature_flags.hpp:30
Reads and writes feature flags from data storage.
Definition feature_flags_repository.hpp:35
Service for managing feature flags.
Definition feature_flags_service.hpp:39
std::vector< domain::feature_flags > get_all_feature_flags()
Retrieves all currently active feature flags.
Definition feature_flags_service.cpp:46
void delete_feature_flag(const std::string &name)
Logically removes a feature flag.
Definition feature_flags_service.cpp:63
std::optional< domain::feature_flags > get_feature_flag(const std::string &name)
Retrieves a single feature flag by name.
Definition feature_flags_service.cpp:31
void save_feature_flag(const domain::feature_flags &flag)
Saves a feature flag.
Definition feature_flags_service.cpp:51