-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
150 additions
and
88 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
mod metadata; | ||
pub mod metadata; | ||
mod cairo_string_parser; | ||
pub mod metadata_manager; |
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 |
---|---|---|
@@ -1,27 +1 @@ | ||
pub mod normalization; | ||
|
||
use serde_derive::{Serialize, Deserialize}; | ||
use serde_json::Value; | ||
|
||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] | ||
pub enum MetadataAttributeValue { | ||
Str(String), | ||
Int(i64), | ||
Float(f64), | ||
Value(Value), | ||
} | ||
|
||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] | ||
pub struct MetadataAttribute { | ||
pub trait_type: String, | ||
pub value: MetadataAttributeValue, | ||
} | ||
|
||
#[derive(Debug, Serialize, Deserialize, Clone)] | ||
pub struct NormalizedMetadata { | ||
pub description: String, | ||
pub external_url: String, | ||
pub image: String, | ||
pub name: String, | ||
pub attributes: Vec<MetadataAttribute>, | ||
} |
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
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