You've already forked AstralRinth
forked from didirus/AstralRinth
* Create base shared instance migration and initial routes * Fix build * Add version uploads * Add permissions field for shared instance users * Actually use permissions field * Add "public" flag to shared instances that allow GETing them without authorization * Add the ability to get and list shared instance versions * Add the ability to delete shared instance versions * Fix build after merge * Secured file hosting (#3784) * Remove Backblaze-specific file-hosting backend * Added S3_USES_PATH_STYLE_BUCKETS * Remove unused file_id parameter from delete_file_version * Add support for separate public and private buckets in labrinth::file_hosting * Rename delete_file_version to delete_file * Add (untested) get_url_for_private_file * Remove url field from shared instance routes * Remove url field from shared instance routes * Use private bucket for shared instance versions * Make S3 environment variables fully separate between public and private buckets * Change file host expiry for shared instances to 180 seconds * Fix lint * Merge shared instance migrations into a single migration * Replace shared instance owners with Ghost instead of deleting the instance
59 lines
1.6 KiB
Rust
59 lines
1.6 KiB
Rust
use thiserror::Error;
|
|
|
|
pub mod categories;
|
|
pub mod charge_item;
|
|
pub mod collection_item;
|
|
pub mod flow_item;
|
|
pub mod friend_item;
|
|
pub mod ids;
|
|
pub mod image_item;
|
|
pub mod legacy_loader_fields;
|
|
pub mod loader_fields;
|
|
pub mod notification_item;
|
|
pub mod oauth_client_authorization_item;
|
|
pub mod oauth_client_item;
|
|
pub mod oauth_token_item;
|
|
pub mod organization_item;
|
|
pub mod pat_item;
|
|
pub mod payout_item;
|
|
pub mod product_item;
|
|
pub mod project_item;
|
|
pub mod report_item;
|
|
pub mod session_item;
|
|
pub mod shared_instance_item;
|
|
pub mod team_item;
|
|
pub mod thread_item;
|
|
pub mod user_item;
|
|
pub mod user_subscription_item;
|
|
pub mod version_item;
|
|
|
|
pub use collection_item::DBCollection;
|
|
pub use ids::*;
|
|
pub use image_item::DBImage;
|
|
pub use oauth_client_item::DBOAuthClient;
|
|
pub use organization_item::DBOrganization;
|
|
pub use project_item::DBProject;
|
|
pub use team_item::DBTeam;
|
|
pub use team_item::DBTeamMember;
|
|
pub use thread_item::{DBThread, DBThreadMessage};
|
|
pub use user_item::DBUser;
|
|
pub use version_item::DBVersion;
|
|
|
|
#[derive(Error, Debug)]
|
|
pub enum DatabaseError {
|
|
#[error("Error while interacting with the database: {0}")]
|
|
Database(#[from] sqlx::Error),
|
|
#[error("Error while trying to generate random ID")]
|
|
RandomId,
|
|
#[error("Error while interacting with the cache: {0}")]
|
|
CacheError(#[from] redis::RedisError),
|
|
#[error("Redis Pool Error: {0}")]
|
|
RedisPool(#[from] deadpool_redis::PoolError),
|
|
#[error("Error while serializing with the cache: {0}")]
|
|
SerdeCacheError(#[from] serde_json::Error),
|
|
#[error("Schema error: {0}")]
|
|
SchemaError(String),
|
|
#[error("Timeout when waiting for cache subscriber")]
|
|
CacheTimeout,
|
|
}
|