feat: implement RepositoryMeta
This commit is contained in:
parent
4973971996
commit
d1e5fd27ca
1 changed files with 22 additions and 9 deletions
|
@ -1,9 +1,22 @@
|
|||
// RepositoryMeta{
|
||||
// description:
|
||||
// RepositoryMeta basic repository information
|
||||
//
|
||||
// full_name string
|
||||
// id integer($int64)
|
||||
// name string
|
||||
// owner string
|
||||
// }
|
||||
use std::fmt::Display;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Represents basic repository information.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||
pub struct RepositoryMeta {
|
||||
/// The full name of the repository.
|
||||
pub full_name: String,
|
||||
/// The unique identifier of the repository.
|
||||
pub id: usize,
|
||||
/// The name of the repository.
|
||||
pub name: String,
|
||||
/// The owner of the repository.
|
||||
pub owner: String,
|
||||
}
|
||||
|
||||
impl Display for RepositoryMeta {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{}", self.full_name)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue