knot0_types/
component.rs

1//! Auto-generated from JSON Schema
2
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
6#[serde(rename_all = "camelCase")]
7pub struct Component {
8    pub kind: serde_json::Value,
9    pub schema_version: String,
10    pub metadata: serde_json::Value,
11    pub requires: Option<serde_json::Value>,
12    pub events: Option<Vec<serde_json::Value>>,
13    pub interface: Option<serde_json::Value>,
14    pub bindings: Option<Vec<serde_json::Value>>,
15    pub entrypoint: Option<Entrypoint>,
16    pub entrypoints: Option<Vec<serde_json::Value>>,
17    pub permissions: Option<serde_json::Value>,
18    pub telemetry: Option<serde_json::Value>,
19    pub benchmarks: Option<Vec<serde_json::Value>>,
20    pub tests: Option<Vec<serde_json::Value>>,
21    pub compute: Option<String>,
22    pub documentation: Option<serde_json::Value>,
23}
24
25#[derive(Debug, Clone, Serialize, Deserialize)]
26pub struct Componenttestscenario {
27    pub name: String,
28    pub description: Option<String>,
29    pub test_type: Option<String>,
30    pub tags: Option<Vec<String>>,
31    pub test_cases: Vec<serde_json::Value>,
32}
33
34#[derive(Debug, Clone, Serialize, Deserialize)]
35pub struct Event {
36    pub name: String,
37    pub description: Option<String>,
38    pub version: Option<String>,
39    pub schema: Option<String>,
40    pub schema_ref: Option<String>,
41}
42
43#[derive(Debug, Clone, Serialize, Deserialize)]
44pub struct Reliability {
45    pub retries: Option<i64>,
46    pub backoff_strategy: Option<serde_json::Value>,
47    pub base_delay_ms: Option<i64>,
48    pub max_delay_ms: Option<i64>,
49    pub dead_letter_queue: Option<bool>,
50}
51
52#[derive(Debug, Clone, Serialize, Deserialize)]
53pub struct Trigger {
54    pub name: String,
55    #[serde(rename = "type")]
56    pub r#type: serde_json::Value,
57    pub path: Option<String>,
58    pub method: Option<String>,
59    pub cron: Option<String>,
60    pub topic: Option<String>,
61    pub event: Option<String>,
62    pub produces_event: Option<String>,
63    pub schema: Option<String>,
64    pub authentication: Option<serde_json::Value>,
65    pub reliability: Option<Reliability>,
66    pub description: Option<String>,
67    pub provider: Option<String>,
68}
69
70#[derive(Debug, Clone, Serialize, Deserialize)]
71pub struct Interfaceendpoint {
72    pub name: String,
73    #[serde(rename = "type")]
74    pub r#type: serde_json::Value,
75    pub path: String,
76    pub method: Option<String>,
77    pub description: Option<String>,
78    pub authentication: Option<serde_json::Value>,
79}
80
81#[derive(Debug, Clone, Serialize, Deserialize)]
82pub struct Binding {
83}
84
85#[derive(Debug, Clone, Serialize, Deserialize)]
86pub struct Entrypoint {
87    pub name: String,
88    pub runner: serde_json::Value,
89    pub run: Option<serde_json::Value>,
90    pub description: Option<String>,
91    pub dependencies: Option<serde_json::Value>,
92    pub environment: Option<serde_json::Value>,
93    pub inputs: Option<serde_json::Value>,
94    pub outputs: Option<serde_json::Value>,
95    pub reliability: Option<Reliability>,
96    pub on_failure: Option<serde_json::Value>,
97    pub on_success: Option<Vec<serde_json::Value>>,
98    pub tests: Option<Vec<serde_json::Value>>,
99    pub telemetry: Option<serde_json::Value>,
100    pub resources: Option<serde_json::Value>,
101}