ORE Studio 0.0.4
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
tenants_commands Class Reference

Manages commands related to tenants. More...

#include <tenants_commands.hpp>

Collaboration diagram for tenants_commands:
Collaboration graph

Static Public Member Functions

static void register_commands (cli::Menu &root_menu, ores::nats::service::nats_client &session, pagination_context &pagination)
 Register tenant-related commands.
 
static void process_get_tenants (std::ostream &out, ores::nats::service::nats_client &session, bool include_deleted)
 Process a get tenants request.
 
static void process_add_tenant (std::ostream &out, ores::nats::service::nats_client &session, std::string code, std::string name, std::string type, std::string hostname, std::string description)
 Process an add tenant request.
 
static void process_tenant_history (std::ostream &out, ores::nats::service::nats_client &session, std::string tenant_id)
 Process a tenant history request.
 
static void process_delete_tenant (std::ostream &out, ores::nats::service::nats_client &session, std::string tenant_id)
 Process a delete tenant request.
 

Detailed Description

Manages commands related to tenants.

Provides CRUD operations for tenant management in multi-tenant systems.

Member Function Documentation

◆ register_commands()

void register_commands ( cli::Menu &  root_menu,
ores::nats::service::nats_client session,
pagination_context pagination 
)
static

Register tenant-related commands.

Creates the tenants submenu and adds tenant operations.

Note: Tenant protocol doesn't support pagination yet, but the pagination_context is passed for API consistency.

◆ process_get_tenants()

void process_get_tenants ( std::ostream &  out,
ores::nats::service::nats_client session,
bool  include_deleted 
)
static

Process a get tenants request.

Retrieves tenants from the server and displays them.

Parameters
outOutput stream for results
sessionClient session for connectivity.
include_deletedWhen true, includes soft-deleted tenants.
Here is the caller graph for this function:

◆ process_add_tenant()

void process_add_tenant ( std::ostream &  out,
ores::nats::service::nats_client session,
std::string  code,
std::string  name,
std::string  type,
std::string  hostname,
std::string  description 
)
static

Process an add tenant request.

Creates a new tenant with the provided details.

Parameters
outOutput stream for results
sessionClient session for connectivity.
codeUnique tenant code
nameHuman-readable tenant name
typeTenant type classification
hostnameUnique hostname for tenant routing
descriptionOptional description
Here is the caller graph for this function:

◆ process_tenant_history()

void process_tenant_history ( std::ostream &  out,
ores::nats::service::nats_client session,
std::string  tenant_id 
)
static

Process a tenant history request.

Retrieves version history for a specific tenant.

Parameters
outOutput stream for results
sessionClient session for connectivity.
tenant_idThe tenant UUID to get history for.
Here is the caller graph for this function:

◆ process_delete_tenant()

void process_delete_tenant ( std::ostream &  out,
ores::nats::service::nats_client session,
std::string  tenant_id 
)
static

Process a delete tenant request.

Deletes a tenant by ID.

Parameters
outOutput stream for results
sessionClient session for connectivity.
tenant_idThe tenant UUID to delete.
Here is the caller graph for this function: