33 lines
583 B
Rust
33 lines
583 B
Rust
use url::Url;
|
|
|
|
pub mod oauth_auth_req_uri;
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
|
|
pub struct Forgejo {
|
|
url: Url,
|
|
client_id: String,
|
|
client_secret: String,
|
|
}
|
|
|
|
impl Forgejo {
|
|
pub fn new(url: Url, client_id: String, client_secret: String) -> Self {
|
|
Self {
|
|
url,
|
|
client_id,
|
|
client_secret,
|
|
}
|
|
}
|
|
|
|
pub fn url(&self) -> &Url {
|
|
&self.url
|
|
}
|
|
|
|
pub fn client_id(&self) -> &str {
|
|
&self.client_id
|
|
}
|
|
|
|
pub fn client_secret(&self) -> &str {
|
|
&self.client_secret
|
|
}
|
|
}
|