-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
get panel page working and handle form
- Loading branch information
Showing
10 changed files
with
632 additions
and
120 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
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,26 @@ | ||
use chrono::{serde::ts_seconds_option, DateTime, Utc}; | ||
use serde::{Deserialize, Serialize}; | ||
use sqlx::FromRow; | ||
|
||
///Represents a go link, a mapping from source -> sink with some metadata | ||
#[derive(Debug, FromRow, Serialize, Deserialize)] | ||
pub struct Redirect { | ||
pub source: String, | ||
pub sink: String, | ||
///number of times this link has been used | ||
pub usages: i32, | ||
|
||
///Last time this link was used. Serialized as seconds since epoch | ||
#[serde(with = "ts_seconds_option")] | ||
pub last_used: Option<DateTime<Utc>>, | ||
|
||
///When this link was created. Serialized as seconds since epoch | ||
#[serde(with = "ts_seconds_option")] | ||
pub created: Option<DateTime<Utc>>, | ||
} | ||
|
||
#[derive(Debug, serde::Deserialize)] | ||
pub struct GoPair { | ||
pub source: String, | ||
pub sink: String, | ||
} |
Oops, something went wrong.