1
- pub mod collate ;
1
+ use std :: collections :: BTreeSet ;
2
2
3
3
mod captures;
4
4
mod catalogs;
5
+ pub mod collate;
5
6
mod collections;
6
7
mod connector;
7
8
mod derivation;
@@ -18,11 +19,9 @@ mod shards;
18
19
mod source;
19
20
mod tests;
20
21
21
- use std:: collections:: BTreeSet ;
22
-
23
22
pub use crate :: labels:: { Label , LabelSelector , LabelSet } ;
24
23
pub use captures:: { AutoDiscover , CaptureBinding , CaptureDef , CaptureEndpoint } ;
25
- pub use catalogs:: Catalog ;
24
+ pub use catalogs:: { Capability , Catalog , CatalogType } ;
26
25
pub use collections:: { CollectionDef , Projection } ;
27
26
pub use connector:: { split_image_tag, ConnectorConfig , LocalConfig } ;
28
27
pub use derivation:: { Derivation , DeriveUsing , Shuffle , ShuffleType , TransformDef } ;
@@ -40,11 +39,10 @@ pub use materializations::{
40
39
} ;
41
40
pub use raw_value:: RawValue ;
42
41
pub use references:: {
43
- Capture , Collection , CompositeKey , Field , JsonPointer , Materialization , PartitionField , Prefix ,
44
- RelativeUrl , StorageEndpoint , Test , Transform , CATALOG_PREFIX_RE , TOKEN_RE ,
42
+ Capture , Collection , CompositeKey , Field , JsonPointer , Materialization , Name , PartitionField ,
43
+ Prefix , RelativeUrl , StorageEndpoint , Test , Token , Transform , CATALOG_PREFIX_RE , TOKEN_RE ,
45
44
} ;
46
45
pub use schemas:: Schema ;
47
- use serde:: { Deserialize , Serialize } ;
48
46
pub use shards:: ShardTemplate ;
49
47
pub use source:: { FullSource , OnIncompatibleSchemaChange , PartitionSelector , Source } ;
50
48
pub use tests:: { TestDef , TestDocuments , TestStep , TestStepIngest , TestStepVerify } ;
@@ -98,47 +96,6 @@ pub trait ModelDef:
98
96
}
99
97
}
100
98
101
- #[ derive( Clone , Copy , Debug , PartialEq , Serialize , Deserialize ) ]
102
- #[ serde( rename_all = "lowercase" ) ]
103
- pub enum CatalogType {
104
- Capture ,
105
- Collection ,
106
- Materialization ,
107
- Test ,
108
- }
109
-
110
- impl std:: str:: FromStr for CatalogType {
111
- type Err = ( ) ;
112
-
113
- fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
114
- match s {
115
- "capture" => Ok ( CatalogType :: Capture ) ,
116
- "collection" => Ok ( CatalogType :: Collection ) ,
117
- "materialization" => Ok ( CatalogType :: Materialization ) ,
118
- "test" => Ok ( CatalogType :: Test ) ,
119
- _ => Err ( ( ) ) ,
120
- }
121
- }
122
- }
123
-
124
- impl std:: fmt:: Display for CatalogType {
125
- fn fmt ( & self , f : & mut std:: fmt:: Formatter ) -> std:: fmt:: Result {
126
- f. write_str ( self . as_ref ( ) )
127
- }
128
- }
129
-
130
- impl std:: convert:: AsRef < str > for CatalogType {
131
- fn as_ref ( & self ) -> & str {
132
- // These strings match what's used by serde, and also match the definitions in the database.
133
- match * self {
134
- CatalogType :: Capture => "capture" ,
135
- CatalogType :: Collection => "collection" ,
136
- CatalogType :: Materialization => "materialization" ,
137
- CatalogType :: Test => "test" ,
138
- }
139
- }
140
- }
141
-
142
99
#[ derive( Debug , Clone , serde:: Serialize , serde:: Deserialize ) ]
143
100
#[ serde( rename_all = "camelCase" ) ]
144
101
pub enum AnySpec {
0 commit comments