MCPcopy Create free account

hub / github.com/aula-id/mini-gateway-rs / functions

Functions455 in github.com/aula-id/mini-gateway-rs

↓ 176 callersMethodget
Gets a value from the cache without updating the LRU order.
router-core/src/app/proxy_fast.rs:79
↓ 132 callersMethodclone
(&self)
router-api/src/module/temporary_log.rs:109
↓ 55 callersMethodclone
Creates a clone of this sender that can be moved to another thread. This is a lightweight operation as it only clones the Arc reference. # Returns `
router-core/src/system/udp_sender/mod.rs:88
↓ 47 callersFunctionget_connection
Creates and returns a new database connection. This is a convenience function that creates a new `Database` instance and returns it, making it easier
router-api/src/module/database.rs:728
↓ 45 callersMethodexecute
Executes a raw SQL query with optional parameters. This method creates a new connection, executes the statement, and then automatically closes the co
router-api/src/module/database.rs:245
↓ 40 callersMethodload
Loads the ONNX model into memory (if not already loaded)
router-api/src/module/ai_security/models.rs:43
↓ 21 callersFunctionacquire_ordering
()
router-core/src/system/memory_log/mod.rs:54
↓ 20 callersMethodquery
Executes a query and maps the results using the provided function. This method is used for SELECT statements that return multiple rows. The provided
router-api/src/module/database.rs:319
↓ 18 callersMethodget_claims
(&self)
router-api/src/api/users/helper/auth_middleware.rs:399
↓ 18 callersMethodinsert
Inserts a value into the cache, potentially evicting the least recently used item.
router-core/src/app/proxy_fast.rs:95
↓ 17 callersMethodlock
(&self)
router-api/src/module/memory_log/core.rs:78
↓ 16 callersMethodquery_one
Executes a query that returns a single result or None. This method is optimized for queries that should return at most one row, such as lookups by a
router-api/src/module/database.rs:407
↓ 14 callersFunctionis_staff_or_admin
Convenience function to check if a user has staff role or above This checks if a user has either staff or admin role, making it useful for endpoints
router-api/src/api/users/helper/auth_token.rs:247
↓ 12 callersFunctioninit
()
router-api/src/module/temporary_log.rs:1327
↓ 10 callersFunctionrelease_ordering
()
router-core/src/system/memory_log/mod.rs:60
↓ 9 callersFunctionensure_proxy_domains_table
Creates the proxy_domains table in the database if it doesn't already exist This function ensures that the database schema is properly initialized be
router-api/src/api/settings/proxydomain_queries.rs:40
↓ 9 callersFunctionget_proxy_domains_by_proxy_id
Retrieves all proxy domains associated with a specific proxy This function fetches all proxy domain records from the database that are associated wit
router-api/src/api/settings/proxydomain_queries.rs:225
↓ 8 callersMethodclear
Clears all entries from all cache shards.
router-core/src/app/proxy_fast.rs:113
↓ 7 callersFunctionacquire_ordering
()
router-api/src/module/memory_log/core.rs:22
↓ 7 callersFunctionensure_gateway_nodes_table
Creates the gateway_nodes table in the database if it doesn't already exist This function ensures that the database schema is properly initialized be
router-api/src/api/settings/gwnode_queries.rs:40
↓ 7 callersFunctionensure_proxies_table
Creates the proxies table in the database if it doesn't already exist This function ensures that the database schema is properly initialized before a
router-api/src/api/settings/proxy_queries.rs:39
↓ 7 callersMethodflush
Flushes any buffered log records. This implementation is a no-op as the logging is done synchronously via UDP sending in the `log` method.
router-core/src/system/writer/logger.rs:76
↓ 7 callersMethodget_config_dir
Get the config directory path, defaulting to standard location
router-api/src/module/certbot_runner.rs:101
↓ 7 callersMethodlog
(&self, level: u8, message: &str)
router-core/src/system/memory_log/mod.rs:739
↓ 6 callersMethodcreate_certificate
Create a new SSL certificate for the given domain
router-api/src/module/certbot_runner.rs:222
↓ 6 callersFunctionensure_ai_models_table
Creates the ai_models table in the database if it doesn't already exist
router-api/src/api/ai_security/ai_model_queries.rs:26
↓ 6 callersMethodensure_certificate_and_save
Generate or renew a certificate for a domain and save it to the database This function: 1. Checks if domain has tls_autron enabled, if false, uses ex
router-api/src/module/certificate_automation.rs:117
↓ 6 callersFunctionensure_gateways_table
Creates the gateways table in the database if it doesn't already exist This function ensures that the database schema is properly initialized before
router-api/src/api/settings/gateway_queries.rs:42
↓ 6 callersMethodforce_reset
Enhanced reset with better diagnostics
router-core/src/system/memory_log/mod.rs:199
↓ 6 callersMethodget
Gets a value from the cache without updating the LRU order.
router-core/src/app/gateway_fast.rs:148
↓ 6 callersFunctioninit
Initialize the configuration system with default values. This function sets up the initial configuration state by: 1. Setting default proxy and gatew
router-core/src/config.rs:211
↓ 6 callersMethodload_logs
( &self, start: DateTime<Utc>, end: DateTime<Utc>, )
router-api/src/module/temporary_log.rs:680
↓ 6 callersFunctionsave_proxy_domain
Saves a proxy domain configuration to the database This function inserts a new proxy domain record or updates an existing one if a domain with the sa
router-api/src/api/settings/proxydomain_queries.rs:277
↓ 5 callersMethodconnect
Creates a new connection to the database. This function is used internally to open a fresh connection for each operation. It also sets up necessary S
router-api/src/module/database.rs:178
↓ 5 callersFunctionget_gateway_node_by_id
Retrieves a specific gateway node configuration by its ID This function fetches a single gateway node record from the database based on the provided
router-api/src/api/settings/gwnode_queries.rs:193
↓ 5 callersFunctionis_admin
Convenience function to check if a user has admin role # Parameters `role` - The role string to check # Returns `true` if the role is "admin", `fa
router-api/src/api/users/helper/auth_token.rs:231
↓ 5 callersMethodlock
(&self)
router-core/src/system/memory_log/mod.rs:93
↓ 5 callersFunctionmemory_fence_release
()
router-core/src/system/memory_log/mod.rs:66
↓ 5 callersMethodrun
Main loop that processes ML logs from the receiver channel
router-api/src/module/ai_security/thread_xgboost.rs:159
↓ 5 callersMethodsend_200
(&mut self, body: &str)
router-core/src/system/prottp/core.rs:133
↓ 5 callersMethodtable_exists_with_columns
Checks if a table exists and has the expected columns This is a simple utility method to check if a table exists with its expected structure. It retu
router-api/src/module/database.rs:530
↓ 4 callersFunctioncleanup_proxy_and_domains
Helper function to clean up a proxy and all its domains when an error occurs
router-api/src/api/settings/proxy_set.rs:474
↓ 4 callersMethodensure_certificate
Ensure certificate exists and is valid (create if not exists, renew if expired)
router-api/src/module/certbot_runner.rs:327
↓ 4 callersFunctionget_enabled_ai_models
Gets all enabled AI models
router-api/src/api/ai_security/ai_model_queries.rs:156
↓ 4 callersFunctionget_proxy_by_id
Retrieves a specific proxy configuration by its ID This function fetches a single proxy record from the database based on the provided ID. It automat
router-api/src/api/settings/proxy_queries.rs:295
↓ 4 callersFunctionmemory_fence_acquire
()
router-api/src/module/memory_log/core.rs:41
↓ 4 callersMethodpost
Send POST request with body - returns success/failure based on status
router-api/src/module/httpc.rs:23
↓ 4 callersMethodsend_400
(&mut self, body: &str)
router-core/src/system/prottp/core.rs:144
↓ 4 callersMethodvalidate_domain
(&self, domain: &str)
router-api/src/module/certbot_runner.rs:494
↓ 3 callersFunctionatomic_id
()
router-core/src/system/writer/rawid.rs:629
↓ 3 callersFunctionauthenticate
(base_url: &str, username: &str, password: &str)
router-cli/src/main.rs:273
↓ 3 callersMethodcertificate_exists
Check if a certificate exists for the given domain
router-api/src/module/certbot_runner.rs:373
↓ 3 callersMethodcheck_certificate_expiry
Check certificate expiry using openssl command
router-api/src/module/certificate_automation.rs:770
↓ 3 callersMethoddetect_certificate_origin
Detect the origin of certificates for a domain Returns "generated" if certbot generated, "manual" if exists but not generated, None if no cert
router-api/src/module/certbot_runner.rs:380
↓ 3 callersMethodensure_active_segment
(&mut self)
router-api/src/module/temporary_log.rs:231
↓ 3 callersFunctionget_ai_model_by_id
Retrieves a specific AI model by ID
router-api/src/api/ai_security/ai_model_queries.rs:75
↓ 3 callersFunctionget_all_proxy_domains
()
router-api/src/api/settings/proxydomain_queries.rs:121
↓ 3 callersFunctionget_credentials
(cli: &Credentials)
router-cli/src/main.rs:177
↓ 3 callersFunctionget_gateways_by_gwnode_id
Retrieves all gateways associated with a specific gateway node This function fetches all gateway records that reference the specified gateway node ID
router-api/src/api/settings/gateway_queries.rs:242
↓ 3 callersFunctionglobal_sender
Gets the global UDP sender instance, initializing it if necessary # Example ``` use router_core::system::udp_sender::global_sender; fn example() ->
router-core/src/system/udp_sender/mod.rs:124
↓ 3 callersFunctioninit
Initialize blocklist sync background thread
router-api/src/module/ai_security/blocklist_sync.rs:18
↓ 3 callersMethodpost_text
Send text data - returns success/failure only
router-api/src/module/httpc.rs:97
↓ 3 callersFunctionrelease_ordering
()
router-api/src/module/memory_log/core.rs:28
↓ 3 callersMethodrenew_certificate
Renew SSL certificate for the given domain
router-api/src/module/certbot_runner.rs:293
↓ 3 callersFunctionrun_error_page_server
Runs a simple HTTP server that serves a generic error page with the specified status code. This function creates a TCP listener on the provided addre
router-core/src/system/default_page/p_base.rs:77
↓ 3 callersFunctionsave_proxy
Saves a proxy configuration to the database This function inserts a new proxy record or updates an existing one if a proxy with the same ID already e
router-api/src/api/settings/proxy_queries.rs:357
↓ 3 callersMethodsend_text
Sends a plain text message to the target address This method is thread-safe and can be called concurrently from multiple threads. # Arguments `messa
router-core/src/system/udp_sender/mod.rs:53
↓ 3 callersMethodstart
(&self, handler: F)
router-core/src/system/prottp/core.rs:28
↓ 3 callersFunctionsync_gateway_nodes_to_registry
( client: &Arc<Mutex<HttpC>>, )
router-api/src/api/sync/gateway_node_tcp.rs:7
↓ 3 callersFunctionsync_gateway_paths_to_registry
( client: &Arc<Mutex<HttpC>>, )
router-api/src/api/sync/gateway_node_tcp.rs:61
↓ 3 callersFunctionsync_proxy_nodes_to_registry
( client: &Arc<Mutex<HttpC>>, )
router-api/src/api/sync/proxy_node_tcp.rs:8
↓ 3 callersMethodunlock
(&self)
router-core/src/system/memory_log/mod.rs:122
↓ 3 callersFunctionvalidate_token
Validates a JWT token and returns the claims if valid Verifies the token signature and expiration time, then returns the decoded claims if the token
router-api/src/api/users/helper/auth_token.rs:210
↓ 2 callersFunctionadd_blocked
Add a blocked IP with deduplication Returns true if added, false if already exists (deduplicated)
router-api/src/module/ai_security/blocklist_store.rs:40
↓ 2 callersFunctionaggregate_stats
Aggregate stats for a target (gateway or proxy)
router-api/src/api/statistics/unified_stream.rs:170
↓ 2 callersFunctionappend_data
(log: TemporaryLog)
router-api/src/module/temporary_log.rs:1341
↓ 2 callersMethodappend_data
MODIFIED: Added logging before serialization
router-api/src/module/temporary_log.rs:595
↓ 2 callersFunctionatomic_id_batch
(count: usize)
router-core/src/system/writer/rawid.rs:674
↓ 2 callersFunctionbuild_cache
Build a `HashMap<String, Vec<BlocklistValue>>` from a flat entry list.
router-core/src/system/prottp/app/blocklist.rs:27
↓ 2 callersFunctioncan_modify_user
Checks if user with given ID and role can modify another user with target_id This implements the permission logic for user modification: - Admins can
router-api/src/api/users/helper/auth_token.rs:284
↓ 2 callersMethodcleanup
Clean up shared memory (call this when done with it)
router-core/src/system/memory_log/mod.rs:603
↓ 2 callersFunctiondelete_gateway_by_id
Deletes a gateway configuration from the database by its ID This function removes a gateway record from the database based on its ID. It returns a bo
router-api/src/api/settings/gateway_queries.rs:366
↓ 2 callersFunctiondelete_proxy_by_id
Deletes a proxy configuration from the database by its ID This function removes a proxy record from the database based on its ID. It returns a boolea
router-api/src/api/settings/proxy_queries.rs:416
↓ 2 callersFunctiondelete_proxy_domain_by_id
Deletes a proxy domain configuration from the database by its ID This function removes a proxy domain record from the database based on its ID. It re
router-api/src/api/settings/proxydomain_queries.rs:343
↓ 2 callersMethoddequeue
Dequeue data from shared memory
router-api/src/module/memory_log/core.rs:235
↓ 2 callersMethoddequeue_item
(&self, read_idx: usize, capacity: usize)
router-api/src/module/memory_log/core.rs:116
↓ 2 callersFunctiondetect_service_manager
Detects which service manager is being used
router-core/src/detect.rs:65
↓ 2 callersFunctionenable_ai
Enable AI inference
router-api/src/module/ai_security/state.rs:30
↓ 2 callersMethodenqueue_item
Enhanced enqueue_item with bounds checking and corruption prevention
router-core/src/system/memory_log/mod.rs:140
↓ 2 callersMethodexecute_command
Execute a command, with optional sudo support
router-api/src/module/certbot_runner.rs:521
↓ 2 callersMethodflush_to_db
(&self)
router-api/src/module/database_log.rs:174
↓ 2 callersMethodgenerate
Generates a Base58-encoded unique identifier. This is the primary public interface for ID generation, combining the raw ID generation with Base58 enc
router-core/src/system/writer/rawid.rs:475
↓ 2 callersFunctiongenerate_target_address
Generates a target address with a random available port This function creates a localhost address (127.0.0.1) with a randomly selected port between 4
router-api/src/api/settings/proxy_queries.rs:474
↓ 2 callersFunctionget_all_ai_models
Retrieves all AI models from the database
router-api/src/api/ai_security/ai_model_queries.rs:48
↓ 2 callersFunctionget_all_proxies
Retrieves all proxy configurations from the database This function fetches all proxy records from the database and converts them into `Proxy` structu
router-api/src/api/settings/proxy_queries.rs:225
↓ 2 callersMethodget_bytes_io_frame
( &self, start: DateTime<Utc>, end: DateTime<Utc>, metric: BytesMetric, )
router-api/src/module/temporary_log.rs:1130
↓ 2 callersFunctionget_connection_log
()
router-api/src/module/database.rs:732
↓ 2 callersMethodget_data_time_frame
MODIFIED: get_data_time_frame with enhanced logging
router-api/src/module/temporary_log.rs:791
↓ 2 callersMethodget_data_time_frame_by_conn_stall
( &self, start: DateTime<Utc>, end: DateTime<Utc>, )
router-api/src/module/temporary_log.rs:1025
↓ 2 callersMethodget_data_time_frame_by_status_code
( &self, start: DateTime<Utc>, end: DateTime<Utc>, status_filter: i32, )
router-api/src/module/temporary_log.rs:892
next →1–100 of 455, ranked by callers