lgx_runtime/models/
requests.rs1use serde::{Deserialize, Serialize};
2use crate::models::ast::ExecutionContext;
3
4#[derive(Debug, Clone, Serialize, Deserialize)]
5pub struct ExecutionRequest {
6 pub id: String,
7 pub code: String,
8 pub context: ExecutionContext,
9 pub options: ExecutionOptions,
10}
11
12#[derive(Debug, Clone, Serialize, Deserialize)]
13pub struct ValidationRequest {
14 pub id: String,
15 pub code: String,
16 pub strict: bool,
17}
18
19#[derive(Debug, Clone, Serialize, Deserialize)]
20pub struct CompilationRequest {
21 pub id: String,
22 pub code: String,
23 pub target: CompilationTarget,
24}
25
26#[derive(Debug, Clone, Serialize, Deserialize)]
27pub struct ExecutionOptions {
28 pub timeout: Option<u64>,
29 pub max_iterations: Option<u32>,
30 pub enable_logging: bool,
31 pub cache_results: bool,
32}
33
34#[derive(Debug, Clone, Serialize, Deserialize)]
35pub enum CompilationTarget {
36 SQL,
37 GraphQL,
38 REST,
39 Custom(String),
40}