Add slop constants

This commit is contained in:
Evie Viau-Chow-Stuart 2023-07-25 01:29:04 -04:00
parent b98b579ce9
commit 500a0ae5b7
Signed by: evie
GPG key ID: 928652CDFCEC8099

View file

@ -1,6 +1,21 @@
pub mod db; pub mod db;
pub const SLOP_VERSION: &str = env!("CARGO_PKG_VERSION");
#[derive(Clone)]
pub struct SlopState { pub struct SlopState {
conn: sea_orm::DatabaseConnection, pub conn: sea_orm::DatabaseConnection,
nats_client: async_nats::Client, pub nats_client: async_nats::Client,
} }
// Constants
// Some of these may be moved to the db config at some point in the future
pub const MAX_FEATURED_TAGS: i64 = 4;
pub const CHARACTERS_RESERVED_PER_URL: i64 = 23;
pub const IMAGE_MATRIX_LIMIT: i64 = 999998000001;
pub const VIDEO_MATRIX_LIMIT: i64 = 999998000001;
pub const VIDEO_FRAME_RATE_LIMIT: i64 = 999998000001;
pub const POLLS_MAX_OPTIONS: i64 = 4;
pub const POLLS_MAX_CHARACTERS_PER_OPTION: i64 = 0;
pub const POLLS_MIN_EXPIRATION: i64 = 0;
pub const POLLS_MAX_EXPIRATION: i64 = 0;