fluvio_controlplane_metadata/tableformat/
mod.rs1mod spec;
2mod status;
3
4pub use spec::*;
5pub use status::*;
6
7#[cfg(feature = "k8")]
8mod k8;
9
10mod convert {
11
12 use crate::core::{Spec, Status, Removable, Creatable};
13 use crate::extended::{ObjectType, SpecExt};
14 use super::*;
15
16 impl Spec for TableFormatSpec {
17 const LABEL: &'static str = "TableFormat";
18
19 type Status = TableFormatStatus;
20
21 type Owner = Self;
22 type IndexKey = String;
23 }
24
25 impl SpecExt for TableFormatSpec {
26 const OBJECT_TYPE: ObjectType = ObjectType::TableFormat;
27 }
28
29 impl Removable for TableFormatSpec {
30 type DeleteKey = String;
31 }
32
33 impl Creatable for TableFormatSpec {}
34
35 impl Status for TableFormatStatus {}
36
37 #[cfg(feature = "k8")]
38 mod extended {
39
40 use crate::store::k8::K8ExtendedSpec;
41 use crate::store::k8::K8ConvertError;
42 use crate::store::k8::K8MetaItem;
43 use crate::store::MetadataStoreObject;
44 use crate::k8_types::K8Obj;
45 use crate::store::k8::default_convert_from_k8;
46
47 use super::TableFormatSpec;
48
49 impl K8ExtendedSpec for TableFormatSpec {
50 type K8Spec = Self;
51
52 fn convert_from_k8(
53 k8_obj: K8Obj<Self::K8Spec>,
54 multi_namespace_context: bool,
55 ) -> Result<MetadataStoreObject<Self, K8MetaItem>, K8ConvertError<Self::K8Spec>>
56 {
57 default_convert_from_k8(k8_obj, multi_namespace_context)
58 }
59
60 fn convert_status_from_k8(status: Self::Status) -> Self::Status {
61 status
62 }
63
64 fn into_k8(self) -> Self::K8Spec {
65 self
66 }
67 }
68 }
69}