schemas_v1_api_providers - OmniCloudOrg/OmniOrchestrator GitHub Wiki

providers (src/schemas/v1/api)

Path: src/schemas/v1/api/providers.rs

Module Documentation

Provider management module for handeling CRUD operations on providers.

This module provides functionality to create, read, update, and delete providers in the system. It includes API endpoints for managing providers and their associated resources. It also includes a function to retrieve a paginated list of providers from the database. It is designed to be used primarily by the dashboard to add new providers and manage existing ones. The resulting database table is read at runtime by the various directories to determine which provider configs they need to have access to.

Table of Contents

Public Items

async fn list_providers

Definition

pub async fn list_providers(
    platform_id: i64,
    page: Option<i64>,
    per_page: Option<i64>,
    db_manager: &rocket::State<Arc<DatabaseManager>>,
) -> Result<Json<Value>, (Status, Json<Value>)> {
    // ... function body
}

Documentation

List all providers in the system with pagination support.

Arguments
  • platform_id - The ID of the platform to retrieve providers for.
  • page - The page number to retrieve.
  • per_page - The number of providers to retrieve per page.
  • db_manager - The database manager for accessing platform-specific database pools.
Returns

A JSON response containing the list of providers and pagination information.

async fn get_provider_audit_logs_paginated

Definition

pub async fn get_provider_audit_logs_paginated(
    platform_id: i64,
    provider_id: i64,
    page: Option<i64>,
    per_page: Option<i64>,
    db_manager: &rocket::State<Arc<DatabaseManager>>,
) -> Result<Json<Value>, (Status, Json<Value>)> {
    // ... function body
}

Documentation

Retrieves a paginated list of audit logs for a specific provider.

async fn get_provider_instances

Definition

pub async fn get_provider_instances(
    platform_id: i64,
    provider_id: i64,
    page: Option<i64>,
    per_page: Option<i64>,
    db_manager: &rocket::State<Arc<DatabaseManager>>,
) -> Result<Json<Value>, (Status, Json<Value>)> {
    // ... function body
}

Documentation

Fetch all instances for a given provider.

⚠️ **GitHub.com Fallback** ⚠️