repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
vertexclique/lever
https://github.com/vertexclique/lever/blob/690d85eb4790caed0bb2c11faf2b2e3e526bbf09/src/sync/ttas.rs
src/sync/ttas.rs
use super::ifaces::LockIface; use std::fmt; use std::{ cell::UnsafeCell, hint::spin_loop, sync::atomic::{AtomicBool, Ordering}, }; use std::{ marker::PhantomData as marker, ops::{Deref, DerefMut}, thread::ThreadId, time::{Duration, Instant}, }; pub struct TTasGuard<'a, T: ?Sized> { mute...
rust
Apache-2.0
690d85eb4790caed0bb2c11faf2b2e3e526bbf09
2026-01-04T20:21:42.422655Z
false
vertexclique/lever
https://github.com/vertexclique/lever/blob/690d85eb4790caed0bb2c11faf2b2e3e526bbf09/tests/atomics.rs
tests/atomics.rs
#[test] fn atomic_box_data_race_regression_test() { let t = trybuild::TestCases::new(); t.compile_fail("tests/samples/atomic_box_data_race.rs"); }
rust
Apache-2.0
690d85eb4790caed0bb2c11faf2b2e3e526bbf09
2026-01-04T20:21:42.422655Z
false
vertexclique/lever
https://github.com/vertexclique/lever/blob/690d85eb4790caed0bb2c11faf2b2e3e526bbf09/tests/lotable_cc.rs
tests/lotable_cc.rs
use lever::table::prelude::*; use std::sync::Arc; #[test] fn lotable_concurrent() { let lotable = { let table: LOTable<String, u64> = LOTable::new(); table.insert("data".into(), 1_u64); Arc::new(table) }; let mut threads = vec![]; for thread_no in 0..100 { let lotable...
rust
Apache-2.0
690d85eb4790caed0bb2c11faf2b2e3e526bbf09
2026-01-04T20:21:42.422655Z
false
vertexclique/lever
https://github.com/vertexclique/lever/blob/690d85eb4790caed0bb2c11faf2b2e3e526bbf09/tests/samples/atomic_box_data_race.rs
tests/samples/atomic_box_data_race.rs
use lever::sync::atomics::AtomicBox; use crossbeam_utils::thread; use std::cell::Cell; #[derive(Debug, Clone, Copy)] enum RefOrInt<'a> { Ref(&'a u64), Int(u64), } static SOME_INT: u64 = 123; // https://github.com/vertexclique/lever/issues/15#issue-740069651 // Run this one in release mode for it to fail fn m...
rust
Apache-2.0
690d85eb4790caed0bb2c11faf2b2e3e526bbf09
2026-01-04T20:21:42.422655Z
false
vertexclique/lever
https://github.com/vertexclique/lever/blob/690d85eb4790caed0bb2c11faf2b2e3e526bbf09/benches/read_parameterized_benches.rs
benches/read_parameterized_benches.rs
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion, Throughput}; use lever::table::prelude::*; use std::sync::Arc; const MAX_THREADS: usize = 8; const OP_RANGES: &'static [usize] = &[100, 300, 500, 700, 1000, 3000, 5000]; fn pure_read(lotable: Arc<LOTable<String, u64>>, key: String, op_count: us...
rust
Apache-2.0
690d85eb4790caed0bb2c11faf2b2e3e526bbf09
2026-01-04T20:21:42.422655Z
false
vertexclique/lever
https://github.com/vertexclique/lever/blob/690d85eb4790caed0bb2c11faf2b2e3e526bbf09/benches/arc_rwlock_benches.rs
benches/arc_rwlock_benches.rs
use criterion::{criterion_group, criterion_main, BatchSize, Criterion, Throughput}; use rand::prelude::*; use rand_distr::Pareto; use std::collections::HashMap; use std::sync::{Arc, RwLock}; fn pure_read(lotable: Arc<RwLock<HashMap<String, u64>>>, key: String, thread_count: u64) { let mut threads = vec![]; f...
rust
Apache-2.0
690d85eb4790caed0bb2c11faf2b2e3e526bbf09
2026-01-04T20:21:42.422655Z
false
vertexclique/lever
https://github.com/vertexclique/lever/blob/690d85eb4790caed0bb2c11faf2b2e3e526bbf09/benches/zonemap_benches.rs
benches/zonemap_benches.rs
use criterion::{criterion_group, criterion_main, BatchSize, BenchmarkId, Criterion, Throughput}; use lever::index::zonemap::ZoneMap; fn bench_zonemap_selected(c: &mut Criterion) { c.bench_function("bench_unoptimized", move |b| { b.iter_batched( || { let customers: Vec<i32> = ...
rust
Apache-2.0
690d85eb4790caed0bb2c11faf2b2e3e526bbf09
2026-01-04T20:21:42.422655Z
false
vertexclique/lever
https://github.com/vertexclique/lever/blob/690d85eb4790caed0bb2c11faf2b2e3e526bbf09/benches/lotable_iter_benches.rs
benches/lotable_iter_benches.rs
use criterion::{criterion_group, criterion_main, BatchSize, Criterion, Throughput}; use lever::table::prelude::*; use rand::prelude::*; use rand_distr::Pareto; use rayon::prelude::*; use std::sync::Arc; const BATCH_SIZE: usize = 50; fn pure_read(lotable: Arc<LOTable<String, u64>>, key: String) { (0..BATCH_SIZE)....
rust
Apache-2.0
690d85eb4790caed0bb2c11faf2b2e3e526bbf09
2026-01-04T20:21:42.422655Z
false
vertexclique/lever
https://github.com/vertexclique/lever/blob/690d85eb4790caed0bb2c11faf2b2e3e526bbf09/benches/lotable_threaded_join_benches.rs
benches/lotable_threaded_join_benches.rs
use criterion::{criterion_group, criterion_main, BatchSize, Criterion, Throughput}; use lever::table::prelude::*; use rand::prelude::*; use rand_distr::Pareto; use std::sync::Arc; fn pure_read(lotable: Arc<LOTable<String, u64>>, key: String, thread_count: u64) { let mut threads = vec![]; for thread_no in 0.....
rust
Apache-2.0
690d85eb4790caed0bb2c11faf2b2e3e526bbf09
2026-01-04T20:21:42.422655Z
false
vertexclique/lever
https://github.com/vertexclique/lever/blob/690d85eb4790caed0bb2c11faf2b2e3e526bbf09/benches/op_ser_benches.rs
benches/op_ser_benches.rs
use criterion::{criterion_group, criterion_main, BatchSize, Criterion}; use lever::table::ltable::LTable; use lever::txn::prelude::*; use rand::prelude::*; use rand_distr::Pareto; fn pure_read(txn: Txn, tvar: TVar<LTable<String, String>>) -> LTable<String, String> { let res = txn.begin(|t: &mut Txn| t.read(&tvar)...
rust
Apache-2.0
690d85eb4790caed0bb2c11faf2b2e3e526bbf09
2026-01-04T20:21:42.422655Z
false
vertexclique/lever
https://github.com/vertexclique/lever/blob/690d85eb4790caed0bb2c11faf2b2e3e526bbf09/benches/cuckoo_benches/src/main.rs
benches/cuckoo_benches/src/main.rs
use bustle::*; use std::collections::HashMap; use std::sync::RwLock; use lever::prelude::*; use std::hash::Hash; // RwLock Table #[derive(Clone)] struct RwLockTable<K>(std::sync::Arc<RwLock<HashMap<K, u64>>>); impl<K> Collection for RwLockTable<K> where K: Send + Sync + From<u64> + Copy + 'static + std::...
rust
Apache-2.0
690d85eb4790caed0bb2c11faf2b2e3e526bbf09
2026-01-04T20:21:42.422655Z
false
vertexclique/lever
https://github.com/vertexclique/lever/blob/690d85eb4790caed0bb2c11faf2b2e3e526bbf09/examples/arc_rwlock.rs
examples/arc_rwlock.rs
use std::collections::HashMap; use std::sync::{Arc, RwLock}; fn main() { let lotable: Arc<RwLock<HashMap<String, u64>>> = Arc::new(RwLock::new(HashMap::default())); // RW from 1_000 threads concurrently. let thread_count = 8; let mut threads = vec![]; for thread_no in 0..thread_count { le...
rust
Apache-2.0
690d85eb4790caed0bb2c11faf2b2e3e526bbf09
2026-01-04T20:21:42.422655Z
false
vertexclique/lever
https://github.com/vertexclique/lever/blob/690d85eb4790caed0bb2c11faf2b2e3e526bbf09/examples/basic_txn.rs
examples/basic_txn.rs
use lever::txn::prelude::*; fn main() { let manager = lever::lever().manager(); let txn = manager.txn_build( // Select concurrency scheme TransactionConcurrency::Optimistic, // Select isolation scheme TransactionIsolation::RepeatableRead, // Give timeout for transaction...
rust
Apache-2.0
690d85eb4790caed0bb2c11faf2b2e3e526bbf09
2026-01-04T20:21:42.422655Z
false
vertexclique/lever
https://github.com/vertexclique/lever/blob/690d85eb4790caed0bb2c11faf2b2e3e526bbf09/examples/lotable.rs
examples/lotable.rs
use lever::prelude::*; use std::sync::Arc; fn main() { let lotable: Arc<LOTable<String, u64>> = Arc::new(LOTable::new()); // RW from 1_000 threads concurrently. let thread_count = 8; let mut threads = vec![]; for thread_no in 0..thread_count { let lotable = lotable.clone(); let t...
rust
Apache-2.0
690d85eb4790caed0bb2c11faf2b2e3e526bbf09
2026-01-04T20:21:42.422655Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/xdb/src/ip_value.rs
xdb/src/ip_value.rs
use std::{error::Error, net::Ipv4Addr, str::FromStr}; pub trait ToUIntIP { fn to_u32_ip(&self) -> Result<u32, Box<dyn Error>>; } impl ToUIntIP for u32 { #[inline(always)] fn to_u32_ip(&self) -> Result<u32, Box<dyn Error>> { Ok(*self) } } impl ToUIntIP for &str { #[inline(always)] fn t...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/xdb/src/searcher.rs
xdb/src/searcher.rs
use std::{error::Error, fmt::Display, fs::File, io::Read, path::Path}; use once_cell::sync::OnceCell; use crate::ToUIntIP; const HEADER_INFO_LENGTH: usize = 256; const VECTOR_INDEX_COLS: usize = 256; const VECTOR_INDEX_SIZE: usize = 8; const SEGMENT_INDEX_SIZE: usize = 14; const VECTOR_INDEX_LENGTH: usize = 512 * 10...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/xdb/src/lib.rs
xdb/src/lib.rs
mod ip_value; pub use self::ip_value::ToUIntIP; pub mod searcher; pub use searcher::{search_by_ip, searcher_init};
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/xdb/benches/search.rs
xdb/benches/search.rs
use criterion::{black_box, criterion_group, criterion_main, Criterion}; use rand; use xdb::searcher::{ get_block_by_size, get_full_cache, get_vector_index_cache, search_by_ip, searcher_init, }; fn search_by_ip_bench(c: &mut Criterion) { c.bench_function("search_by_ip_bench", |b| { searcher_init(None); ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/sea-orm-adapter/src/lib.rs
sea-orm-adapter/src/lib.rs
pub use adapter::SeaOrmAdapter; pub use migration::{down, up}; mod action; mod adapter; pub mod entity; mod migration;
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/sea-orm-adapter/src/entity.rs
sea-orm-adapter/src/entity.rs
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.15 use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "casbin_rule")] pub struct Model { #[sea_orm(primary_key)] pub id: i64, pub ptype: String, pub v0: String, pub v1: String, ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/sea-orm-adapter/src/adapter.rs
sea-orm-adapter/src/adapter.rs
use async_trait::async_trait; use casbin::{error::AdapterError, Adapter, Error as CasbinError, Filter, Model, Result}; use sea_orm::ConnectionTrait; use crate::{ action::{self, Rule, RuleWithType}, entity, migration, }; pub struct SeaOrmAdapter<C> { conn: C, is_filtered: bool, } impl<C: ConnectionTra...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/sea-orm-adapter/src/action.rs
sea-orm-adapter/src/action.rs
use casbin::{error::AdapterError, Error as CasbinError, Filter, Result}; use sea_orm::{ ActiveModelTrait, ActiveValue::{NotSet, Set}, ColumnTrait, Condition, ConnectionTrait, EntityTrait, QueryFilter, }; use crate::entity::{self, Column, Entity}; const COLUMNS: [Column; 6] = [ Column::V0, Column::...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/sea-orm-adapter/src/migration.rs
sea-orm-adapter/src/migration.rs
use sea_orm::{ sea_query::{ColumnDef, Index, Table}, ConnectionTrait, DbErr, DeriveIden, ExecResult, }; #[derive(DeriveIden)] enum CasbinRule { Table, Id, Ptype, V0, V1, V2, V3, V4, V5, } pub async fn up<C: ConnectionTrait>(conn: &C) -> Result<ExecResult, DbErr> { let c...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/lib.rs
migration/src/lib.rs
pub use sea_orm_migration::prelude::*; mod datas; mod schemas; pub struct Migrator; #[async_trait::async_trait] impl MigratorTrait for Migrator { fn migrations() -> Vec<Box<dyn MigrationTrait>> { vec![ // 架构迁移 Box::new(schemas::m20240815_082808_create_enum_status::Migration), ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/main.rs
migration/src/main.rs
use sea_orm_migration::prelude::*; #[async_std::main] async fn main() { cli::run_cli(migration::Migrator).await; }
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/schemas/m20241023_091204_create_sys_tokens.rs
migration/src/schemas/m20241023_091204_create_sys_tokens.rs
use sea_orm_migration::prelude::*; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { manager .create_table( Table::create() ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/schemas/m20241023_091149_create_sys_operation_log.rs
migration/src/schemas/m20241023_091149_create_sys_operation_log.rs
use sea_orm_migration::prelude::*; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { manager .create_table( Table::create() ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/schemas/m20241023_091143_create_sys_menu.rs
migration/src/schemas/m20241023_091143_create_sys_menu.rs
use sea_orm::Iterable; use sea_orm_migration::prelude::*; use super::m20240815_082808_create_enum_status::{MenuType, Status}; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/schemas/m20241023_091109_create_sys_access_key.rs
migration/src/schemas/m20241023_091109_create_sys_access_key.rs
use sea_orm::Iterable; use sea_orm_migration::prelude::*; use super::m20240815_082808_create_enum_status::Status; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { manager...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/schemas/m20241023_090604_create_sys_role.rs
migration/src/schemas/m20241023_090604_create_sys_role.rs
use sea_orm::Iterable; use sea_orm_migration::prelude::*; use super::m20240815_082808_create_enum_status::Status; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { manager...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/schemas/m20241023_091210_create_sys_user_role.rs
migration/src/schemas/m20241023_091210_create_sys_user_role.rs
use sea_orm_migration::prelude::*; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { manager .create_table( Table::create() ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/schemas/m20240815_082808_create_enum_status.rs
migration/src/schemas/m20240815_082808_create_enum_status.rs
use sea_orm::EnumIter; use sea_orm_migration::{ prelude::{sea_query::extension::postgres::Type, *}, sea_orm::{ConnectionTrait, DbBackend}, }; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/schemas/m20241023_091138_create_sys_login_log.rs
migration/src/schemas/m20241023_091138_create_sys_login_log.rs
use sea_orm_migration::prelude::*; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { manager .create_table( Table::create() ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/schemas/m20240815_082854_create_sys_user.rs
migration/src/schemas/m20240815_082854_create_sys_user.rs
use sea_orm::Iterable; use sea_orm_migration::prelude::*; use super::m20240815_082808_create_enum_status::Status; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { // 创建表 ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/schemas/m20241023_091132_create_sys_endpoint.rs
migration/src/schemas/m20241023_091132_create_sys_endpoint.rs
use sea_orm_migration::prelude::*; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { manager .create_table( Table::create() ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/schemas/mod.rs
migration/src/schemas/mod.rs
pub mod m20240815_082808_create_enum_status; pub mod m20240815_082854_create_sys_user; pub mod m20241023_090604_create_sys_role; pub mod m20241023_091109_create_sys_access_key; pub mod m20241023_091115_create_sys_domain; pub mod m20241023_091132_create_sys_endpoint; pub mod m20241023_091138_create_sys_login_log; pub mo...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/schemas/m20241023_091159_create_sys_role_menu.rs
migration/src/schemas/m20241023_091159_create_sys_role_menu.rs
use sea_orm_migration::prelude::*; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { manager .create_table( Table::create() ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/schemas/m20241023_091115_create_sys_domain.rs
migration/src/schemas/m20241023_091115_create_sys_domain.rs
use sea_orm::Iterable; use sea_orm_migration::prelude::*; use super::m20240815_082808_create_enum_status::Status; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { manager...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/schemas/m20241023_091155_create_sys_organization.rs
migration/src/schemas/m20241023_091155_create_sys_organization.rs
use sea_orm::Iterable; use sea_orm_migration::prelude::*; use super::m20240815_082808_create_enum_status::Status; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { manager...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/datas/m20241024_082926_insert_casbin_rule.rs
migration/src/datas/m20241024_082926_insert_casbin_rule.rs
use sea_orm_migration::{prelude::*, sea_orm::Statement}; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { let db = manager.get_connection(); // 执行架构迁移 sea...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/datas/m20241024_033933_insert_sys_user_role.rs
migration/src/datas/m20241024_033933_insert_sys_user_role.rs
use sea_orm_migration::{prelude::*, sea_orm::Statement}; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { let db = manager.get_connection(); let insert_user_role_...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/datas/m20241024_034526_insert_sys_role.rs
migration/src/datas/m20241024_034526_insert_sys_role.rs
use sea_orm_migration::{prelude::*, sea_orm::Statement}; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { let db = manager.get_connection(); let insert_role_stmt ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/datas/m20241024_034744_insert_sys_menu.rs
migration/src/datas/m20241024_034744_insert_sys_menu.rs
use sea_orm_migration::{prelude::*, sea_orm::Statement}; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { let db = manager.get_connection(); let insert_menu_stmt ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/datas/m20241024_033005_insert_sys_user.rs
migration/src/datas/m20241024_033005_insert_sys_user.rs
use sea_orm_migration::{prelude::*, sea_orm::Statement}; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { let db = manager.get_connection(); let insert_stmt = Sta...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/datas/mod.rs
migration/src/datas/mod.rs
pub mod m20241023_102950_insert_sys_domain; pub mod m20241024_033005_insert_sys_user; pub mod m20241024_033933_insert_sys_user_role; pub mod m20241024_034305_insert_sys_role_menu; pub mod m20241024_034526_insert_sys_role; pub mod m20241024_034744_insert_sys_menu; pub mod m20241024_082926_insert_casbin_rule;
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/datas/m20241024_034305_insert_sys_role_menu.rs
migration/src/datas/m20241024_034305_insert_sys_role_menu.rs
use sea_orm_migration::{prelude::*, sea_orm::Statement}; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { let db = manager.get_connection(); let insert_role_menu_...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/datas/m20241023_102950_insert_sys_domain.rs
migration/src/datas/m20241023_102950_insert_sys_domain.rs
use sea_orm_migration::{prelude::*, sea_orm::Statement}; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { let db = manager.get_connection(); let insert_stmt = Sta...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/migration/src/datas/m20241023_102950_insert_sys_user_role.rs
migration/src/datas/m20241023_102950_insert_sys_user_role.rs
use sea_orm_migration::prelude::*; use sea_orm_migration::sea_orm::Statement; #[derive(DeriveMigrationName)] pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { let db = manager.get_connection(); ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/axum-casbin/src/lib.rs
axum-casbin/src/lib.rs
pub use casbin; pub use middleware::{CasbinAxumLayer, CasbinAxumMiddleware, CasbinVals}; pub mod middleware;
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/axum-casbin/src/middleware.rs
axum-casbin/src/middleware.rs
use std::{ convert::Infallible, ops::{Deref, DerefMut}, sync::Arc, task::{Context, Poll}, }; #[cfg(feature = "runtime-async-std")] use async_std::sync::RwLock; use axum::{body, response::Response, BoxError}; use bytes::Bytes; use casbin::{ prelude::{TryIntoAdapter, TryIntoModel}, CachedEnforcer...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/axum-casbin/tests/test_set_enforcer.rs
axum-casbin/tests/test_set_enforcer.rs
use std::{ convert::Infallible, sync::Arc, task::{Context, Poll}, }; #[cfg(feature = "runtime-async-std")] use async_std::sync::RwLock; use axum::{response::Response, routing::get, BoxError, Router}; use axum_casbin::{CasbinAxumLayer, CasbinVals}; use axum_test_helpers::TestClient; use bytes::Bytes; use ca...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/axum-casbin/tests/test_middleware_domain.rs
axum-casbin/tests/test_middleware_domain.rs
use std::{ convert::Infallible, task::{Context, Poll}, }; use axum::{response::Response, routing::get, BoxError, Router}; use axum_casbin::{CasbinAxumLayer, CasbinVals}; use axum_test_helpers::TestClient; use bytes::Bytes; use casbin::{DefaultModel, FileAdapter}; use futures::future::BoxFuture; use http::{Requ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/axum-casbin/tests/test_middleware.rs
axum-casbin/tests/test_middleware.rs
use std::{ convert::Infallible, task::{Context, Poll}, }; use axum::{response::Response, routing::get, BoxError, Router}; use axum_casbin::{CasbinAxumLayer, CasbinVals}; use axum_test_helpers::TestClient; use bytes::Bytes; use casbin::{function_map::key_match2, CoreApi, DefaultModel, FileAdapter}; use futures:...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/constant/src/lib.rs
server/constant/src/lib.rs
pub mod definition;
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/constant/src/definition/consts.rs
server/constant/src/definition/consts.rs
use strum_macros::{AsRefStr, Display, EnumString}; /// Token 状态枚举 #[derive(Debug, Clone, PartialEq, Eq, AsRefStr, Display, EnumString)] #[strum(serialize_all = "SCREAMING_SNAKE_CASE")] pub enum TokenStatus { /// 活跃状态,可以正常使用 Active, /// 已被刷新,表示该 token 已被新 token 替换 Refreshed, /// 已被撤销(手动注销或安全原因) ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/constant/src/definition/mod.rs
server/constant/src/definition/mod.rs
pub use audience_const::Audience; mod audience_const; pub mod consts;
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/constant/src/definition/audience_const.rs
server/constant/src/definition/audience_const.rs
/// Enum to represent different platforms or audiences for JWT authentication. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum Audience { /// Audience for the official website. OfficialWebsite, /// Audience for the admin control panel. ManagementPlatform, /// Audience for the mobile appl...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/lib.rs
server/service/src/lib.rs
pub mod admin; mod helper; pub use server_constant::definition::Audience; pub use server_global::{project_error, project_info}; pub use server_model::admin::entities::sys_endpoint::Model as SysEndpoint;
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/sys_operation_log_service.rs
server/service/src/admin/sys_operation_log_service.rs
use std::any::Any; use async_trait::async_trait; use sea_orm::{ ActiveModelTrait, ColumnTrait, Condition, EntityTrait, PaginatorTrait, QueryFilter, QueryOrder, Set, }; use server_core::web::{error::AppError, page::PaginatedData}; use server_global::{global::OperationLogContext, project_error}; use server_model...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/sys_access_key_service.rs
server/service/src/admin/sys_access_key_service.rs
use std::any::Any; use async_trait::async_trait; use chrono::Local; use sea_orm::{ ActiveModelTrait, ColumnTrait, Condition, DatabaseTransaction, EntityTrait, PaginatorTrait, QueryFilter, Set, TransactionTrait, }; use server_core::{ sign::{ApiKeyEvent, ValidatorType}, web::{error::AppError, page::Pagin...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/sys_organization_service.rs
server/service/src/admin/sys_organization_service.rs
use async_trait::async_trait; use sea_orm::{ColumnTrait, Condition, EntityTrait, PaginatorTrait, QueryFilter}; use server_core::web::{error::AppError, page::PaginatedData}; use server_model::admin::{ entities::{ prelude::SysOrganization, sys_organization::{Column as SysOrganizationColumn, Model as S...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/sys_endpoint_service.rs
server/service/src/admin/sys_endpoint_service.rs
use std::collections::BTreeMap; use async_trait::async_trait; use chrono::Local; use sea_orm::{ ColumnTrait, Condition, DatabaseConnection, DeleteResult, EntityTrait, IntoActiveModel, PaginatorTrait, QueryFilter, Set, }; use server_core::web::{error::AppError, page::PaginatedData}; use server_model::admin::{ ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/sys_domain_service.rs
server/service/src/admin/sys_domain_service.rs
use async_trait::async_trait; use chrono::Local; use sea_orm::{ ActiveModelTrait, ColumnTrait, Condition, EntityTrait, PaginatorTrait, QueryFilter, Set, }; use server_core::web::{error::AppError, page::PaginatedData}; use server_model::admin::{ entities::{ prelude::SysDomain, sea_orm_active_enum...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/sys_role_service.rs
server/service/src/admin/sys_role_service.rs
use async_trait::async_trait; use chrono::Local; use sea_orm::{ ActiveModelTrait, ColumnTrait, Condition, EntityTrait, PaginatorTrait, QueryFilter, Set, }; use server_core::web::{error::AppError, page::PaginatedData}; use server_model::admin::{ entities::{ prelude::SysRole, sys_role::{ ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/mod.rs
server/service/src/admin/mod.rs
pub use errors::*; pub use server_model::admin::{ entities::{ prelude::{SysDomain, SysEndpoint, SysMenu, SysRole, SysUser}, sys_access_key::Model as SysAccessKeyModel, sys_domain::Model as SysDomainModel, sys_endpoint::Model as SysEndpointModel, sys_login_log::Model as SysLog...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/sys_auth_service.rs
server/service/src/admin/sys_auth_service.rs
use std::any::Any; use async_trait::async_trait; use sea_orm::{ ColumnTrait, DatabaseConnection, EntityTrait, JoinType, QueryFilter, QueryOrder, QuerySelect, RelationTrait, }; use server_constant::definition::{consts::SystemEvent, Audience}; use server_core::web::{ auth::Claims, error::AppError, jw...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/sys_authorization_service.rs
server/service/src/admin/sys_authorization_service.rs
use std::sync::Arc; use async_trait::async_trait; use axum_casbin::casbin::{CoreApi, MgmtApi, RbacApi}; use sea_orm::{ColumnTrait, EntityTrait, QueryFilter, TransactionTrait}; use server_core::web::error::AppError; use server_model::admin::entities::{ prelude::{SysDomain, SysEndpoint, SysMenu, SysRole, SysRoleMenu...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/sys_login_log_service.rs
server/service/src/admin/sys_login_log_service.rs
use async_trait::async_trait; use sea_orm::{ColumnTrait, Condition, EntityTrait, PaginatorTrait, QueryFilter, QueryOrder}; use server_core::web::{error::AppError, page::PaginatedData}; use server_model::admin::{ entities::{ prelude::SysLoginLog, sys_login_log::{Column as SysLoginLogColumn, Model as ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/sys_user_service.rs
server/service/src/admin/sys_user_service.rs
use async_trait::async_trait; use chrono::Local; use sea_orm::{ ActiveModelTrait, ColumnTrait, Condition, EntityTrait, IntoActiveModel, PaginatorTrait, QueryFilter, Set, }; use server_core::web::{error::AppError, page::PaginatedData}; use server_model::admin::{ entities::{ prelude::SysUser, ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/sys_menu_service.rs
server/service/src/admin/sys_menu_service.rs
use async_trait::async_trait; use chrono::Local; use sea_orm::{ActiveModelTrait, ColumnTrait, Condition, EntityTrait, QueryFilter, Set}; use server_core::web::{auth::User, error::AppError}; use server_model::admin::{ entities::{ prelude::{SysMenu, SysRoleMenu}, sea_orm_active_enums::Status, ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/dto/mod.rs
server/service/src/admin/dto/mod.rs
pub mod sys_auth_dto;
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/dto/sys_auth_dto.rs
server/service/src/admin/dto/sys_auth_dto.rs
use server_constant::definition::Audience; #[derive(Clone, Debug)] pub struct LoginContext { pub client_ip: String, pub client_port: Option<i32>, pub address: String, pub user_agent: String, pub request_id: String, pub audience: Audience, pub login_type: String, pub domain: String, }
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/errors/sys_domain_error.rs
server/service/src/admin/errors/sys_domain_error.rs
use server_core::web::error::{ApiError, AppError}; use thiserror::Error; #[derive(Error, Debug)] pub enum DomainError { #[error("Domain not found")] DomainNotFound, #[error("Domain with this code already exists")] DuplicateCode, #[error("Domain with this name already exists")] DuplicateName, ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/errors/sys_user_error.rs
server/service/src/admin/errors/sys_user_error.rs
use server_core::web::error::{ApiError, AppError}; use thiserror::Error; #[derive(Error, Debug)] pub enum UserError { #[error("User not found")] UserNotFound, #[error("Authentication failed: Wrong password")] WrongPassword, #[error("Authentication failed")] AuthenticationFailed, #[error("Us...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/errors/mod.rs
server/service/src/admin/errors/mod.rs
pub mod sys_access_key_error; pub mod sys_domain_error; pub mod sys_menu_error; pub mod sys_role_error; pub mod sys_user_error;
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/errors/sys_access_key_error.rs
server/service/src/admin/errors/sys_access_key_error.rs
use server_core::web::error::{ApiError, AppError}; use thiserror::Error; #[derive(Error, Debug)] pub enum AccessKeyError { #[error("Access key not found")] AccessKeyNotFound, } impl ApiError for AccessKeyError { fn code(&self) -> u16 { match self { AccessKeyError::AccessKeyNotFound => ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/errors/sys_role_error.rs
server/service/src/admin/errors/sys_role_error.rs
use server_core::web::error::{ApiError, AppError}; use thiserror::Error; #[derive(Debug, Error)] pub enum RoleError { #[error("Role not found")] RoleNotFound, #[error("Duplicate role code")] DuplicateRoleCode, } impl ApiError for RoleError { fn code(&self) -> u16 { match self { ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/errors/sys_menu_error.rs
server/service/src/admin/errors/sys_menu_error.rs
use server_core::web::error::{ApiError, AppError}; use thiserror::Error; #[derive(Debug, Error)] pub enum MenuError { #[error("Menu not found")] MenuNotFound, #[error("Duplicate route name")] DuplicateRouteName, } impl ApiError for MenuError { fn code(&self) -> u16 { match self { ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/events/login_log_event.rs
server/service/src/admin/events/login_log_event.rs
use chrono::Local; use sea_orm::{ActiveModelTrait, DatabaseConnection, Set}; use server_core::web::error::AppError; use server_model::admin::entities::sys_login_log::ActiveModel as SysLoginLogActiveModel; use ulid::Ulid; pub struct LoginLogEvent { pub user_id: String, pub username: String, pub domain: Stri...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/events/access_token_event.rs
server/service/src/admin/events/access_token_event.rs
use chrono::Local; use sea_orm::{ActiveModelTrait, DatabaseConnection, Set}; use server_constant::definition::consts::TokenStatus; use server_core::web::error::AppError; use server_model::admin::entities::sys_tokens::ActiveModel as SysTokensActiveModel; use ulid::Ulid; pub struct AccessTokenEvent { pub access_toke...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/events/mod.rs
server/service/src/admin/events/mod.rs
pub mod access_token_event; pub mod login_log_event;
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/event_handlers/auth_event_handler.rs
server/service/src/admin/event_handlers/auth_event_handler.rs
use server_core::web::error::AppError; use crate::{ admin::events::{access_token_event::AccessTokenEvent, login_log_event::LoginLogEvent}, helper::db_helper, }; pub struct AuthEvent { pub user_id: String, pub username: String, pub domain: String, pub access_token: String, pub refresh_token...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/admin/event_handlers/mod.rs
server/service/src/admin/event_handlers/mod.rs
pub mod auth_event_handler;
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/helper/redis_helper.rs
server/service/src/helper/redis_helper.rs
#![allow(dead_code)] use redis::{aio::MultiplexedConnection, cluster_async::ClusterConnection, ErrorKind, RedisError}; use server_core::web::error::AppError; use server_global::global::{RedisConnection, GLOBAL_PRIMARY_REDIS, GLOBAL_REDIS_POOL}; /// Redis连接来源 #[derive(Debug, Clone)] pub enum RedisSource { /// 主Redi...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/helper/db_helper.rs
server/service/src/helper/db_helper.rs
use std::sync::Arc; use sea_orm::{ConnAcquireErr, DatabaseConnection, DbErr}; use server_core::web::error::AppError; use server_global::global::{GLOBAL_DB_POOL, GLOBAL_PRIMARY_DB}; pub async fn get_db_connection() -> Result<Arc<DatabaseConnection>, AppError> { let db = GLOBAL_PRIMARY_DB.read().await; db.as_re...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/helper/mod.rs
server/service/src/helper/mod.rs
pub mod db_helper; pub mod mongo_helper; pub mod redis_helper;
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/service/src/helper/mongo_helper.rs
server/service/src/helper/mongo_helper.rs
#![allow(dead_code)] use mongodb::{Client, Collection}; use server_core::web::error::AppError; use server_global::global::{GLOBAL_MONGO_POOL, GLOBAL_PRIMARY_MONGO}; /// MongoDB 连接来源 #[derive(Debug, Clone)] pub enum MongoSource { /// 主 MongoDB 实例 Primary, /// 命名的 MongoDB 实例 Named(String), } // ===== 主数...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/global/src/global.rs
server/global/src/global.rs
use std::{ any::{Any, TypeId}, collections::HashMap, future::Future, pin::Pin, sync::Arc, }; use aws_sdk_s3::Client as S3Client; use chrono::NaiveDateTime; use http::Method; use jsonwebtoken::{DecodingKey, EncodingKey, Validation}; use mongodb::Client as MongoClient; use once_cell::sync::Lazy; use ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/global/src/lib.rs
server/global/src/lib.rs
pub use jsonwebtoken::Validation; pub mod global; #[macro_export] macro_rules! project_info { ($($arg:tt)+) => {{ let span = tracing::span!( tracing::Level::INFO, module_path!(), file = file!(), line = line!(), ); let _enter = span.enter(); ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/resource/src/lib.rs
server/resource/src/lib.rs
use anyhow::Result; use askama::Template; use std::path::PathBuf; #[allow(dead_code)] mod filters { #[allow(dead_code)] pub fn lower(s: &str) -> ::askama::Result<String> { Ok(s.to_lowercase()) } #[allow(dead_code)] pub fn title(s: &str) -> ::askama::Result<String> { Ok(s.to_string(...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/model/src/lib.rs
server/model/src/lib.rs
pub mod admin;
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/model/src/admin/mod.rs
server/model/src/admin/mod.rs
pub mod input; pub mod entities; pub mod output;
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/model/src/admin/entities/sys_access_key.rs
server/model/src/admin/entities/sys_access_key.rs
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.0.0 use sea_orm::entity::prelude::*; use serde::Serialize; use super::sea_orm_active_enums::Status; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize)] #[sea_orm(table_name = "sys_access_key")] pub struct Model { #[sea_orm(primary_key, auto_in...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/model/src/admin/entities/prelude.rs
server/model/src/admin/entities/prelude.rs
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.0.0 pub use super::{ casbin_rule::Entity as CasbinRule, sys_access_key::Entity as SysAccessKey, sys_domain::Entity as SysDomain, sys_endpoint::Entity as SysEndpoint, sys_login_log::Entity as SysLoginLog, sys_menu::Entity as SysMenu, sys_operation_log...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/model/src/admin/entities/sys_operation_log.rs
server/model/src/admin/entities/sys_operation_log.rs
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.0.0 use sea_orm::entity::prelude::*; use serde::Serialize; use serde_json::Value as JsonValue; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize)] #[sea_orm(table_name = "sys_operation_log")] #[serde(rename_all = "camelCase")] pub struct Model { ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/model/src/admin/entities/sea_orm_active_enums.rs
server/model/src/admin/entities/sea_orm_active_enums.rs
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.0.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Deserialize, Serialize)] #[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "menu_type")] pub enum MenuType { #[...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/model/src/admin/entities/sys_user.rs
server/model/src/admin/entities/sys_user.rs
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.0 use sea_orm::entity::prelude::*; use serde::Serialize; use super::sea_orm_active_enums::Status; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize)] #[sea_orm(table_name = "sys_user")] pub struct Model { #[sea_orm(primary_key, auto_incremen...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/model/src/admin/entities/sys_role.rs
server/model/src/admin/entities/sys_role.rs
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.0 use sea_orm::entity::prelude::*; use serde::Serialize; use super::sea_orm_active_enums::Status; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize)] #[sea_orm(table_name = "sys_role")] pub struct Model { #[sea_orm(primary_key, auto_incremen...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/model/src/admin/entities/sys_login_log.rs
server/model/src/admin/entities/sys_login_log.rs
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.0.0 use sea_orm::entity::prelude::*; use serde::Serialize; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize)] #[sea_orm(table_name = "sys_login_log")] #[serde(rename_all = "camelCase")] pub struct Model { #[sea_orm(primary_key, auto_increment ...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false
soybeanjs/soybean-admin-rust
https://github.com/soybeanjs/soybean-admin-rust/blob/a560191ee087ba509e2060f17937b9f2c8f9be33/server/model/src/admin/entities/sys_domain.rs
server/model/src/admin/entities/sys_domain.rs
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.0 use sea_orm::entity::prelude::*; use serde::Serialize; use super::sea_orm_active_enums::Status; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize)] #[sea_orm(table_name = "sys_domain")] pub struct Model { #[sea_orm(primary_key, auto_increm...
rust
Apache-2.0
a560191ee087ba509e2060f17937b9f2c8f9be33
2026-01-04T20:21:43.261270Z
false