[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.

chore: regen lexicons

Lyna 8c8dd019 cedb868d

+39 -73
+37 -55
crates/lexgen/src/dev_blooym/porxie/get_blob.rs
··· 46 46 #[serde(tag = "error", content = "message")] 47 47 #[serde(bound(deserialize = "'de: 'a"))] 48 48 pub enum GetBlobError<'a> { 49 - #[serde(rename = "MalformedDid")] 50 - MalformedDid(Option<CowStr<'a>>), 51 - #[serde(rename = "MalformedCid")] 52 - MalformedCid(Option<CowStr<'a>>), 53 - #[serde(rename = "PolicyForbidden")] 54 - PolicyForbidden(Option<CowStr<'a>>), 55 - #[serde(rename = "InternalServerError")] 56 - InternalServerError(Option<CowStr<'a>>), 49 + #[serde(rename = "BlobCidMismatch")] 50 + BlobCidMismatch(Option<CowStr<'a>>), 51 + #[serde(rename = "BlobFetchFailed")] 52 + BlobFetchFailed(Option<CowStr<'a>>), 53 + #[serde(rename = "BlobForbiddenType")] 54 + BlobForbiddenType(Option<CowStr<'a>>), 57 55 #[serde(rename = "BlobNotFound")] 58 56 BlobNotFound(Option<CowStr<'a>>), 59 57 #[serde(rename = "BlobTooLarge")] 60 58 BlobTooLarge(Option<CowStr<'a>>), 61 - #[serde(rename = "BlobForbiddenType")] 62 - BlobForbiddenType(Option<CowStr<'a>>), 63 - #[serde(rename = "BlobCidMismatch")] 64 - BlobCidMismatch(Option<CowStr<'a>>), 65 - #[serde(rename = "CidUnsupported")] 66 - CidUnsupported(Option<CowStr<'a>>), 67 59 #[serde(rename = "CannotResolve")] 68 60 CannotResolve(Option<CowStr<'a>>), 69 - #[serde(rename = "BlobFetchFailed")] 70 - BlobFetchFailed(Option<CowStr<'a>>), 61 + #[serde(rename = "CidUnsupported")] 62 + CidUnsupported(Option<CowStr<'a>>), 63 + #[serde(rename = "InternalServerError")] 64 + InternalServerError(Option<CowStr<'a>>), 65 + #[serde(rename = "PolicyForbidden")] 66 + PolicyForbidden(Option<CowStr<'a>>), 71 67 } 72 68 73 69 impl core::fmt::Display for GetBlobError<'_> { 74 70 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 75 71 match self { 76 - Self::MalformedDid(msg) => { 77 - write!(f, "MalformedDid")?; 72 + Self::BlobCidMismatch(msg) => { 73 + write!(f, "BlobCidMismatch")?; 78 74 if let Some(msg) = msg { 79 75 write!(f, ": {}", msg)?; 80 76 } 81 77 Ok(()) 82 78 } 83 - Self::MalformedCid(msg) => { 84 - write!(f, "MalformedCid")?; 79 + Self::BlobFetchFailed(msg) => { 80 + write!(f, "BlobFetchFailed")?; 85 81 if let Some(msg) = msg { 86 82 write!(f, ": {}", msg)?; 87 83 } 88 84 Ok(()) 89 85 } 90 - Self::PolicyForbidden(msg) => { 91 - write!(f, "PolicyForbidden")?; 92 - if let Some(msg) = msg { 93 - write!(f, ": {}", msg)?; 94 - } 95 - Ok(()) 96 - } 97 - Self::InternalServerError(msg) => { 98 - write!(f, "InternalServerError")?; 86 + Self::BlobForbiddenType(msg) => { 87 + write!(f, "BlobForbiddenType")?; 99 88 if let Some(msg) = msg { 100 89 write!(f, ": {}", msg)?; 101 90 } ··· 115 104 } 116 105 Ok(()) 117 106 } 118 - Self::BlobForbiddenType(msg) => { 119 - write!(f, "BlobForbiddenType")?; 120 - if let Some(msg) = msg { 121 - write!(f, ": {}", msg)?; 122 - } 123 - Ok(()) 124 - } 125 - Self::BlobCidMismatch(msg) => { 126 - write!(f, "BlobCidMismatch")?; 107 + Self::CannotResolve(msg) => { 108 + write!(f, "CannotResolve")?; 127 109 if let Some(msg) = msg { 128 110 write!(f, ": {}", msg)?; 129 111 } ··· 136 118 } 137 119 Ok(()) 138 120 } 139 - Self::CannotResolve(msg) => { 140 - write!(f, "CannotResolve")?; 121 + Self::InternalServerError(msg) => { 122 + write!(f, "InternalServerError")?; 141 123 if let Some(msg) = msg { 142 124 write!(f, ": {}", msg)?; 143 125 } 144 126 Ok(()) 145 127 } 146 - Self::BlobFetchFailed(msg) => { 147 - write!(f, "BlobFetchFailed")?; 128 + Self::PolicyForbidden(msg) => { 129 + write!(f, "PolicyForbidden")?; 148 130 if let Some(msg) = msg { 149 131 write!(f, ": {}", msg)?; 150 132 } ··· 204 186 } 205 187 /// State trait tracking which required fields have been set 206 188 pub trait State: sealed::Sealed { 207 - type Did; 208 189 type Cid; 190 + type Did; 209 191 } 210 192 /// Empty state - all required fields are unset 211 193 pub struct Empty(()); 212 194 impl sealed::Sealed for Empty {} 213 195 impl State for Empty { 214 - type Did = Unset; 215 196 type Cid = Unset; 197 + type Did = Unset; 198 + } 199 + ///State transition - sets the `cid` field to Set 200 + pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>); 201 + impl<S: State> sealed::Sealed for SetCid<S> {} 202 + impl<S: State> State for SetCid<S> { 203 + type Cid = Set<members::cid>; 204 + type Did = S::Did; 216 205 } 217 206 ///State transition - sets the `did` field to Set 218 207 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>); 219 208 impl<S: State> sealed::Sealed for SetDid<S> {} 220 209 impl<S: State> State for SetDid<S> { 210 + type Cid = S::Cid; 221 211 type Did = Set<members::did>; 222 - type Cid = S::Cid; 223 - } 224 - ///State transition - sets the `cid` field to Set 225 - pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>); 226 - impl<S: State> sealed::Sealed for SetCid<S> {} 227 - impl<S: State> State for SetCid<S> { 228 - type Did = S::Did; 229 - type Cid = Set<members::cid>; 230 212 } 231 213 /// Marker types for field names 232 214 #[allow(non_camel_case_types)] 233 215 pub mod members { 216 + ///Marker type for the `cid` field 217 + pub struct cid(()); 234 218 ///Marker type for the `did` field 235 219 pub struct did(()); 236 - ///Marker type for the `cid` field 237 - pub struct cid(()); 238 220 } 239 221 } 240 222 ··· 304 286 impl<'a, S> GetBlobBuilder<'a, S> 305 287 where 306 288 S: get_blob_state::State, 307 - S::Did: get_blob_state::IsSet, 308 289 S::Cid: get_blob_state::IsSet, 290 + S::Did: get_blob_state::IsSet, 309 291 { 310 292 /// Build the final struct 311 293 pub fn build(self) -> GetBlob<'a> {
+1 -6
lexicons/dev/blooym/porxie/cache/purgeActor.json
··· 26 26 "type": "object", 27 27 "properties": {} 28 28 } 29 - }, 30 - "errors": [ 31 - { 32 - "name": "MalformedDid" 33 - } 34 - ] 29 + } 35 30 } 36 31 } 37 32 }
+1 -6
lexicons/dev/blooym/porxie/cache/purgeBlob.json
··· 26 26 "type": "object", 27 27 "properties": {} 28 28 } 29 - }, 30 - "errors": [ 31 - { 32 - "name": "MalformedCid" 33 - } 34 - ] 29 + } 35 30 } 36 31 } 37 32 }
-6
lexicons/dev/blooym/porxie/getBlob.json
··· 51 51 "name": "InternalServerError" 52 52 }, 53 53 { 54 - "name": "MalformedCid" 55 - }, 56 - { 57 - "name": "MalformedDid" 58 - }, 59 - { 60 54 "name": "PolicyForbidden" 61 55 } 62 56 ]