Atproto, remove/disable lexicon module
This is temporary. Since I'm using my own types implementation the autocreated lexicons don't work. Currently deciding the best way to move forward.
This commit is contained in:
parent
cd2e03811e
commit
34719e7d01
14 changed files with 15 additions and 92 deletions
|
|
@ -1,3 +1 @@
|
|||
// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT.
|
||||
pub mod record;
|
||||
pub mod my;
|
||||
pub mod myspoor;
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT.
|
||||
//!Definitions for the `my` namespace.
|
||||
pub mod spoor;
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT.
|
||||
//!Definitions for the `my.spoor` namespace.
|
||||
pub mod content;
|
||||
pub mod log;
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT.
|
||||
//!Definitions for the `my.spoor.log` namespace.
|
||||
pub mod activity;
|
||||
pub mod session;
|
||||
#[derive(Debug)]
|
||||
pub struct Activity;
|
||||
impl atrium_api::types::Collection for Activity {
|
||||
const NSID: &'static str = "my.spoor.log.activity";
|
||||
type Record = activity::Record;
|
||||
}
|
||||
#[derive(Debug)]
|
||||
pub struct Session;
|
||||
impl atrium_api::types::Collection for Session {
|
||||
const NSID: &'static str = "my.spoor.log.session";
|
||||
type Record = session::Record;
|
||||
}
|
||||
11
atproto/src/lexicons/myspoor/log.rs
Normal file
11
atproto/src/lexicons/myspoor/log.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
use serde::Deserialize;
|
||||
use crate::types::{BoundString, StrongRef, Uri, Did, Datetime};
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Session {
|
||||
pub content: StrongRef<Uri>,
|
||||
pub label: Option<BoundString<64, 640>>,
|
||||
pub other_participants: Option<Vec<Did>>,
|
||||
pub created_at: Datetime,
|
||||
}
|
||||
2
atproto/src/lexicons/myspoor/mod.rs
Normal file
2
atproto/src/lexicons/myspoor/mod.rs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
pub mod content;
|
||||
pub mod log;
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT.
|
||||
//!A collection of known record types.
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||
#[serde(tag = "$type")]
|
||||
pub enum KnownRecord {
|
||||
#[serde(rename = "my.spoor.content.external")]
|
||||
LexiconsMySpoorContentExternal(
|
||||
Box<crate::lexicons::my::spoor::content::external::Record>,
|
||||
),
|
||||
#[serde(rename = "my.spoor.content.media")]
|
||||
LexiconsMySpoorContentMedia(Box<crate::lexicons::my::spoor::content::media::Record>),
|
||||
#[serde(rename = "my.spoor.log.activity")]
|
||||
LexiconsMySpoorLogActivity(Box<crate::lexicons::my::spoor::log::activity::Record>),
|
||||
#[serde(rename = "my.spoor.log.session")]
|
||||
LexiconsMySpoorLogSession(Box<crate::lexicons::my::spoor::log::session::Record>),
|
||||
}
|
||||
impl From<crate::lexicons::my::spoor::content::external::Record> for KnownRecord {
|
||||
fn from(record: crate::lexicons::my::spoor::content::external::Record) -> Self {
|
||||
KnownRecord::LexiconsMySpoorContentExternal(Box::new(record))
|
||||
}
|
||||
}
|
||||
impl From<crate::lexicons::my::spoor::content::external::RecordData> for KnownRecord {
|
||||
fn from(
|
||||
record_data: crate::lexicons::my::spoor::content::external::RecordData,
|
||||
) -> Self {
|
||||
KnownRecord::LexiconsMySpoorContentExternal(Box::new(record_data.into()))
|
||||
}
|
||||
}
|
||||
impl From<crate::lexicons::my::spoor::content::media::Record> for KnownRecord {
|
||||
fn from(record: crate::lexicons::my::spoor::content::media::Record) -> Self {
|
||||
KnownRecord::LexiconsMySpoorContentMedia(Box::new(record))
|
||||
}
|
||||
}
|
||||
impl From<crate::lexicons::my::spoor::content::media::RecordData> for KnownRecord {
|
||||
fn from(
|
||||
record_data: crate::lexicons::my::spoor::content::media::RecordData,
|
||||
) -> Self {
|
||||
KnownRecord::LexiconsMySpoorContentMedia(Box::new(record_data.into()))
|
||||
}
|
||||
}
|
||||
impl From<crate::lexicons::my::spoor::log::activity::Record> for KnownRecord {
|
||||
fn from(record: crate::lexicons::my::spoor::log::activity::Record) -> Self {
|
||||
KnownRecord::LexiconsMySpoorLogActivity(Box::new(record))
|
||||
}
|
||||
}
|
||||
impl From<crate::lexicons::my::spoor::log::activity::RecordData> for KnownRecord {
|
||||
fn from(record_data: crate::lexicons::my::spoor::log::activity::RecordData) -> Self {
|
||||
KnownRecord::LexiconsMySpoorLogActivity(Box::new(record_data.into()))
|
||||
}
|
||||
}
|
||||
impl From<crate::lexicons::my::spoor::log::session::Record> for KnownRecord {
|
||||
fn from(record: crate::lexicons::my::spoor::log::session::Record) -> Self {
|
||||
KnownRecord::LexiconsMySpoorLogSession(Box::new(record))
|
||||
}
|
||||
}
|
||||
impl From<crate::lexicons::my::spoor::log::session::RecordData> for KnownRecord {
|
||||
fn from(record_data: crate::lexicons::my::spoor::log::session::RecordData) -> Self {
|
||||
KnownRecord::LexiconsMySpoorLogSession(Box::new(record_data.into()))
|
||||
}
|
||||
}
|
||||
impl Into<atrium_api::types::Unknown> for KnownRecord {
|
||||
fn into(self) -> atrium_api::types::Unknown {
|
||||
atrium_api::types::TryIntoUnknown::try_into_unknown(&self).unwrap()
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
pub mod lexicons;
|
||||
// pub mod lexicons;
|
||||
pub mod types;
|
||||
pub mod error;
|
||||
#[cfg(feature = "sqlx-support")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue