-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
getSignaturesForAsset
endpoint on top of new cl_audits_v2
t…
…able (#155) * add migration files for cl_audits_v2 * add types * ingester * add getSignaturesForAsset endpoint * refactor to resolve merge conflict related bugs * address clippy error * rename to get_asset_signatures * add instruction type update_metadata * add error log if instruction is unknown * add sort order changes --------- Co-authored-by: Nicolas Pennie <[email protected]>
- Loading branch information
1 parent
82a8d2a
commit 9d6ef66
Showing
28 changed files
with
695 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3 | ||
use super::sea_orm_active_enums::Instruction; | ||
use sea_orm::entity::prelude::*; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Copy, Clone, Default, Debug, DeriveEntity)] | ||
pub struct Entity; | ||
|
||
impl EntityName for Entity { | ||
fn table_name(&self) -> &str { | ||
"cl_audits_v2" | ||
} | ||
} | ||
|
||
#[derive(Clone, Debug, PartialEq, DeriveModel, DeriveActiveModel, Serialize, Deserialize)] | ||
pub struct Model { | ||
pub id: i64, | ||
pub tree: Vec<u8>, | ||
pub leaf_idx: i64, | ||
pub seq: i64, | ||
pub created_at: DateTime, | ||
pub tx: Vec<u8>, | ||
pub instruction: Instruction, | ||
} | ||
|
||
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)] | ||
pub enum Column { | ||
Id, | ||
Tree, | ||
LeafIdx, | ||
Seq, | ||
CreatedAt, | ||
Tx, | ||
Instruction, | ||
} | ||
|
||
#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)] | ||
pub enum PrimaryKey { | ||
Id, | ||
} | ||
|
||
impl PrimaryKeyTrait for PrimaryKey { | ||
type ValueType = i64; | ||
fn auto_increment() -> bool { | ||
true | ||
} | ||
} | ||
|
||
#[derive(Copy, Clone, Debug, EnumIter)] | ||
pub enum Relation {} | ||
|
||
impl ColumnTrait for Column { | ||
type EntityName = Entity; | ||
fn def(&self) -> ColumnDef { | ||
match self { | ||
Self::Id => ColumnType::BigInteger.def(), | ||
Self::Tree => ColumnType::Binary.def(), | ||
Self::LeafIdx => ColumnType::BigInteger.def(), | ||
Self::Seq => ColumnType::BigInteger.def(), | ||
Self::CreatedAt => ColumnType::DateTime.def(), | ||
Self::Tx => ColumnType::Binary.def(), | ||
Self::Instruction => Instruction::db_type(), | ||
} | ||
} | ||
} | ||
|
||
impl RelationTrait for Relation { | ||
fn def(&self) -> RelationDef { | ||
panic!("No RelationDef") | ||
} | ||
} | ||
|
||
impl ActiveModelBehavior for ActiveModel {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.