[MIRROR ONLY] A correct and efficient ATProto blob proxy for secure content delivery. codeberg.org/Blooym/porxie
36
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: add descriptions to lexicons

Lyna d6c09542 f32e1de2

+39 -50
+2 -2
crates/lexgen/lexicons/dev/blooym/porxie/clearActorCache.json
··· 4 4 "defs": { 5 5 "main": { 6 6 "type": "procedure", 7 + "description": "Clear all cache entries relating to the specified actor. Requires admin authentication.", 7 8 "input": { 8 9 "encoding": "application/json", 9 10 "schema": { ··· 14 15 "properties": { 15 16 "did": { 16 17 "type": "string", 17 - "format": "did", 18 - "description": "The DID of the account." 18 + "format": "did" 19 19 } 20 20 } 21 21 }
+2 -2
crates/lexgen/lexicons/dev/blooym/porxie/clearBlobCache.json
··· 4 4 "defs": { 5 5 "main": { 6 6 "type": "procedure", 7 + "description": "Clear all cache entries relating to the specified blob. Requires admin authentication.", 7 8 "input": { 8 9 "encoding": "application/json", 9 10 "schema": { ··· 14 15 "properties": { 15 16 "cid": { 16 17 "type": "string", 17 - "format": "cid", 18 - "description": "The CID of the blob." 18 + "format": "cid" 19 19 } 20 20 } 21 21 }
+3 -4
crates/lexgen/lexicons/dev/blooym/porxie/getBlob.json
··· 4 4 "defs": { 5 5 "main": { 6 6 "type": "query", 7 + "description": "Fetch and validate a blob from the origin via the service. May implement caching depending on implementation.", 7 8 "parameters": { 8 9 "type": "params", 9 10 "required": [ ··· 13 14 "properties": { 14 15 "did": { 15 16 "type": "string", 16 - "format": "did", 17 - "description": "The DID of the account." 17 + "format": "did" 18 18 }, 19 19 "cid": { 20 20 "type": "string", 21 - "format": "cid", 22 - "description": "The CID of the blob." 21 + "format": "cid" 23 22 } 24 23 } 25 24 },
+2 -4
crates/lexgen/lexicons/dev/blooym/porxie/getBlobPolicy.json
··· 13 13 "properties": { 14 14 "did": { 15 15 "type": "string", 16 - "format": "did", 17 - "description": "The DID of the account." 16 + "format": "did" 18 17 }, 19 18 "cid": { 20 19 "type": "string", 21 - "format": "cid", 22 - "description": "The CID of the blob." 20 + "format": "cid" 23 21 } 24 22 } 25 23 },
-1
crates/lexgen/src/dev_blooym/porxie/clear_actor_cache.rs
··· 18 18 #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 19 19 #[serde(rename_all = "camelCase")] 20 20 pub struct ClearActorCache<'a> { 21 - ///The DID of the account. 22 21 #[serde(borrow)] 23 22 pub did: Did<'a>, 24 23 }
-1
crates/lexgen/src/dev_blooym/porxie/clear_blob_cache.rs
··· 18 18 #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 19 19 #[serde(rename_all = "camelCase")] 20 20 pub struct ClearBlobCache<'a> { 21 - ///The CID of the blob. 22 21 #[serde(borrow)] 23 22 pub cid: Cid<'a>, 24 23 }
+13 -13
crates/lexgen/src/dev_blooym/porxie/get_blob.rs
··· 77 77 } 78 78 /// State trait tracking which required fields have been set 79 79 pub trait State: sealed::Sealed { 80 - type Cid; 81 80 type Did; 81 + type Cid; 82 82 } 83 83 /// Empty state - all required fields are unset 84 84 pub struct Empty(()); 85 85 impl sealed::Sealed for Empty {} 86 86 impl State for Empty { 87 - type Cid = Unset; 88 87 type Did = Unset; 89 - } 90 - ///State transition - sets the `cid` field to Set 91 - pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>); 92 - impl<S: State> sealed::Sealed for SetCid<S> {} 93 - impl<S: State> State for SetCid<S> { 94 - type Cid = Set<members::cid>; 95 - type Did = S::Did; 88 + type Cid = Unset; 96 89 } 97 90 ///State transition - sets the `did` field to Set 98 91 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>); 99 92 impl<S: State> sealed::Sealed for SetDid<S> {} 100 93 impl<S: State> State for SetDid<S> { 101 - type Cid = S::Cid; 102 94 type Did = Set<members::did>; 95 + type Cid = S::Cid; 96 + } 97 + ///State transition - sets the `cid` field to Set 98 + pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>); 99 + impl<S: State> sealed::Sealed for SetCid<S> {} 100 + impl<S: State> State for SetCid<S> { 101 + type Did = S::Did; 102 + type Cid = Set<members::cid>; 103 103 } 104 104 /// Marker types for field names 105 105 #[allow(non_camel_case_types)] 106 106 pub mod members { 107 - ///Marker type for the `cid` field 108 - pub struct cid(()); 109 107 ///Marker type for the `did` field 110 108 pub struct did(()); 109 + ///Marker type for the `cid` field 110 + pub struct cid(()); 111 111 } 112 112 } 113 113 ··· 177 177 impl<'a, S> GetBlobBuilder<'a, S> 178 178 where 179 179 S: get_blob_state::State, 180 - S::Cid: get_blob_state::IsSet, 181 180 S::Did: get_blob_state::IsSet, 181 + S::Cid: get_blob_state::IsSet, 182 182 { 183 183 /// Build the final struct 184 184 pub fn build(self) -> GetBlob<'a> {
+17 -23
crates/lexgen/src/dev_blooym/porxie/get_blob_policy.rs
··· 93 93 "allowed" 94 94 } 95 95 fn lexicon_doc() -> LexiconDoc<'static> { 96 - lexicon_doc_dev_blooym_porxie_getBlobPolicy() 96 + lexicon_doc_dev_blooym_porxie_get_blob_policy() 97 97 } 98 98 fn validate(&self) -> Result<(), ConstraintError> { 99 99 Ok(()) ··· 132 132 "restricted" 133 133 } 134 134 fn lexicon_doc() -> LexiconDoc<'static> { 135 - lexicon_doc_dev_blooym_porxie_getBlobPolicy() 135 + lexicon_doc_dev_blooym_porxie_get_blob_policy() 136 136 } 137 137 fn validate(&self) -> Result<(), ConstraintError> { 138 138 Ok(()) ··· 147 147 "unlisted" 148 148 } 149 149 fn lexicon_doc() -> LexiconDoc<'static> { 150 - lexicon_doc_dev_blooym_porxie_getBlobPolicy() 150 + lexicon_doc_dev_blooym_porxie_get_blob_policy() 151 151 } 152 152 fn validate(&self) -> Result<(), ConstraintError> { 153 153 Ok(()) 154 154 } 155 155 } 156 156 157 - fn lexicon_doc_dev_blooym_porxie_getBlobPolicy() -> LexiconDoc<'static> { 157 + fn lexicon_doc_dev_blooym_porxie_get_blob_policy() -> LexiconDoc<'static> { 158 158 #[allow(unused_imports)] 159 159 use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; 160 160 use jacquard_lexicon::lexicon::*; ··· 192 192 map.insert( 193 193 SmolStr::new_static("cid"), 194 194 LexXrpcParametersProperty::String(LexString { 195 - description: Some( 196 - CowStr::new_static("The CID of the blob."), 197 - ), 198 195 format: Some(LexStringFormat::Cid), 199 196 ..Default::default() 200 197 }), ··· 202 199 map.insert( 203 200 SmolStr::new_static("did"), 204 201 LexXrpcParametersProperty::String(LexString { 205 - description: Some( 206 - CowStr::new_static("The DID of the account."), 207 - ), 208 202 format: Some(LexStringFormat::Did), 209 203 ..Default::default() 210 204 }), ··· 287 281 } 288 282 /// State trait tracking which required fields have been set 289 283 pub trait State: sealed::Sealed { 290 - type Did; 291 284 type Cid; 285 + type Did; 292 286 } 293 287 /// Empty state - all required fields are unset 294 288 pub struct Empty(()); 295 289 impl sealed::Sealed for Empty {} 296 290 impl State for Empty { 297 - type Did = Unset; 298 291 type Cid = Unset; 299 - } 300 - ///State transition - sets the `did` field to Set 301 - pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>); 302 - impl<S: State> sealed::Sealed for SetDid<S> {} 303 - impl<S: State> State for SetDid<S> { 304 - type Did = Set<members::did>; 305 - type Cid = S::Cid; 292 + type Did = Unset; 306 293 } 307 294 ///State transition - sets the `cid` field to Set 308 295 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>); 309 296 impl<S: State> sealed::Sealed for SetCid<S> {} 310 297 impl<S: State> State for SetCid<S> { 311 - type Did = S::Did; 312 298 type Cid = Set<members::cid>; 299 + type Did = S::Did; 300 + } 301 + ///State transition - sets the `did` field to Set 302 + pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>); 303 + impl<S: State> sealed::Sealed for SetDid<S> {} 304 + impl<S: State> State for SetDid<S> { 305 + type Cid = S::Cid; 306 + type Did = Set<members::did>; 313 307 } 314 308 /// Marker types for field names 315 309 #[allow(non_camel_case_types)] 316 310 pub mod members { 311 + ///Marker type for the `cid` field 312 + pub struct cid(()); 317 313 ///Marker type for the `did` field 318 314 pub struct did(()); 319 - ///Marker type for the `cid` field 320 - pub struct cid(()); 321 315 } 322 316 } 323 317 ··· 387 381 impl<'a, S> GetBlobPolicyBuilder<'a, S> 388 382 where 389 383 S: get_blob_policy_state::State, 390 - S::Did: get_blob_policy_state::IsSet, 391 384 S::Cid: get_blob_policy_state::IsSet, 385 + S::Did: get_blob_policy_state::IsSet, 392 386 { 393 387 /// Build the final struct 394 388 pub fn build(self) -> GetBlobPolicy<'a> {