Skip to main content

objectiveai_cli/command/functions/profiles/
get.rs

1//! `functions profiles get` — read a profile definition by remote
2//! path.
3
4use objectiveai_sdk::cli::command::functions::profiles::get::{Request, Response};
5
6use crate::context::Context;
7use crate::error::Error;
8
9pub async fn execute(ctx: &Context, request: Request) -> Result<Response, Error> {
10    crate::retrieve::get_profile(ctx, request.path).await
11}
12
13pub mod request_schema {
14    use objectiveai_sdk::cli::command::functions::profiles::get as sdk;
15    use objectiveai_sdk::cli::command::functions::profiles::get::request_schema::{Request, Response};
16
17    use crate::context::Context;
18    use crate::error::Error;
19
20    pub async fn execute(_ctx: &Context, _request: Request) -> Result<Response, Error> {
21        Ok(objectiveai_sdk::cli::command::ResponseSchema(schemars::schema_for!(sdk::Request)))
22    }
23}
24
25pub mod response_schema {
26    use objectiveai_sdk::cli::command::functions::profiles::get as sdk;
27    use objectiveai_sdk::cli::command::functions::profiles::get::response_schema::{Request, Response};
28
29    use crate::context::Context;
30    use crate::error::Error;
31
32    pub async fn execute(_ctx: &Context, _request: Request) -> Result<Response, Error> {
33        Ok(objectiveai_sdk::cli::command::ResponseSchema(schemars::schema_for!(sdk::Response)))
34    }
35}