20#ifndef ORES_SHELL_APP_COMMANDS_ACCOUNTS_COMMANDS_HPP
21#define ORES_SHELL_APP_COMMANDS_ACCOUNTS_COMMANDS_HPP
24#include "ores.logging/make_logger.hpp"
25#include "ores.nats/service/nats_client.hpp"
26#include "ores.shell/app/pagination_context.hpp"
34namespace ores::shell::app::commands {
41 inline static std::string_view logger_name =
42 "ores.shell.app.commands.accounts_commands";
46 static auto instance = make_logger(logger_name);
75 std::string principal, std::string password, std::string totp_secret,
104 std::string principal, std::string password);
117 std::string account_id);
130 std::string account_id);
169 std::string principal, std::string password, std::string email);
182 std::string account_id =
"");
219 std::string username);
235 std::string username);
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Authenticated NATS client for both interactive and service-to-service use.
Definition nats_client.hpp:71
Manages commands related to accounts.
Definition accounts_commands.hpp:39
static void process_list_login_info(std::ostream &out, ores::nats::service::nats_client &session)
Process a list login info request.
Definition accounts_commands.cpp:421
static void process_logout(std::ostream &out, ores::nats::service::nats_client &session)
Process a logout request.
Definition accounts_commands.cpp:435
static void process_session_stats(std::ostream &out, ores::nats::service::nats_client &session, int days=30)
Process a session statistics request.
Definition accounts_commands.cpp:594
static void register_commands(cli::Menu &root_menu, ores::nats::service::nats_client &session, pagination_context &pagination)
Register account-related commands.
Definition accounts_commands.cpp:119
static void process_active_sessions(std::ostream &out, ores::nats::service::nats_client &session)
Process an active sessions request.
Definition accounts_commands.cpp:554
static void process_create_account(std::ostream &out, ores::nats::service::nats_client &session, std::string principal, std::string password, std::string totp_secret, std::string email)
Process a create account request.
Definition accounts_commands.cpp:393
static void process_list_sessions(std::ostream &out, ores::nats::service::nats_client &session, std::string account_id="")
Process a list sessions request.
Definition accounts_commands.cpp:490
static void process_login(std::ostream &out, ores::nats::service::nats_client &session, std::string principal, std::string password)
Process a login request.
Definition accounts_commands.cpp:289
static void process_list_accounts(std::ostream &out, ores::nats::service::nats_client &session, pagination_context &pagination)
Process a list accounts request.
Definition accounts_commands.cpp:252
static void process_lock_account(std::ostream &out, ores::nats::service::nats_client &session, std::string account_id)
Process a lock account request.
Definition accounts_commands.cpp:318
static void process_get_account_history(std::ostream &out, ores::nats::service::nats_client &session, std::string username)
Process a get account history request.
Definition accounts_commands.cpp:662
static void process_unlock_account(std::ostream &out, ores::nats::service::nats_client &session, std::string account_id)
Process an unlock account request.
Definition accounts_commands.cpp:356
static void process_bootstrap(std::ostream &out, ores::nats::service::nats_client &session, std::string principal, std::string password, std::string email)
Process a bootstrap request.
Definition accounts_commands.cpp:459
static void process_account_info(std::ostream &out, ores::nats::service::nats_client &session, std::string username)
Process an account info request.
Definition accounts_commands.cpp:698
Manages pagination state across shell commands.
Definition pagination_context.hpp:51