Some checks failed
blocking-ci / Bazel (push) Has been cancelled
blocking-ci / Blob size policy (push) Has been cancelled
blocking-ci / cargo-deny (push) Has been cancelled
blocking-ci / Codespell (push) Has been cancelled
blocking-ci / repo-checks (push) Has been cancelled
blocking-ci / rust-ci (push) Has been cancelled
blocking-ci / sdk (push) Has been cancelled
blocking-ci / CI required (push) Has been cancelled
postmerge-ci / rust-ci-full (push) Has been cancelled
postmerge-ci / v8-canary (push) Has been cancelled
postmerge-ci / Postmerge CI results (push) Has been cancelled
38 lines
1.2 KiB
Rust
38 lines
1.2 KiB
Rust
use super::RemotePluginCatalogError;
|
|
use super::RemotePluginScope;
|
|
use super::RemotePluginServiceConfig;
|
|
use super::RemotePluginSummary;
|
|
use codex_login::CodexAuth;
|
|
use tracing::instrument;
|
|
|
|
/// Search parameters forwarded directly to plugin-service.
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
pub struct RemotePluginSearchRequest<'a> {
|
|
pub query: &'a str,
|
|
pub scope: Option<RemotePluginScope>,
|
|
pub limit: u32,
|
|
pub page_token: Option<&'a str>,
|
|
}
|
|
|
|
/// One uncached page of remote plugin search results.
|
|
#[derive(Debug, Clone, PartialEq)]
|
|
pub struct RemotePluginSearchPage {
|
|
pub plugins: Vec<RemotePluginSummary>,
|
|
pub next_page_token: Option<String>,
|
|
}
|
|
|
|
/// Searches plugin-service without reading or populating the remote catalog cache.
|
|
#[instrument(
|
|
level = "debug",
|
|
skip_all,
|
|
fields(plugin.scope = ?search.scope, plugin.limit = search.limit)
|
|
)]
|
|
pub async fn search_remote_plugins(
|
|
config: &RemotePluginServiceConfig,
|
|
auth: Option<&CodexAuth>,
|
|
search: RemotePluginSearchRequest<'_>,
|
|
) -> Result<RemotePluginSearchPage, RemotePluginCatalogError> {
|
|
let _ = (config, auth, search);
|
|
Err(RemotePluginCatalogError::Unavailable)
|
|
}
|