MCPcopy Create free account

hub / github.com/OpenSecretCloud/opensecret / functions

Functions1,278 in github.com/OpenSecretCloud/opensecret

↓ 291 callersMethodget
( conn: &mut PgConnection, lookup_name: &str, )
src/models/app_data_migrations.rs:21
↓ 105 callersFunctionencrypt_response
( state: &AppState, session_id: &Uuid, response: &T, )
src/web/encryption_middleware.rs:90
↓ 98 callersMethodinsert
(&self, conn: &mut PgConnection)
src/models/orgs.rs:93
↓ 87 callersMethodas_bytes
(&self)
src/seed_wrapping.rs:73
↓ 55 callersFunctiondelete
( pool: &diesel::r2d2::Pool<diesel::r2d2::ConnectionManager<PgConnection>>, user_id: Uuid, key: &s
src/kv.rs:100
↓ 52 callersMethodas_str
(&self)
src/models/org_memberships.rs:24
↓ 36 callersFunctionget
Update the get function
src/kv.rs:39
↓ 35 callersFunctionencrypt_with_key
(encryption_key: &SecretKey, bytes: &[u8])
src/encrypt.rs:38
↓ 30 callersFunctiondecrypt_with_key
(encryption_key: &SecretKey, bytes: &[u8])
src/encrypt.rs:54
↓ 26 callersFunctiontest_credential
(label: &str)
src/aead_db_tamper_tests.rs:36
↓ 25 callersMethodauthenticate_user
( &self, user_email: Option<String>, user_id: Option<Uuid>, user_password: Str
src/main.rs:1287
↓ 25 callersMethodget_user_key
Returns the user's private key, optionally derived using the provided derivation paths. # Arguments `user` - The authenticated user `auth_context` -
src/main.rs:1366
↓ 25 callersMethodupdate
(&self, conn: &mut PgConnection)
src/models/orgs.rs:61
↓ 24 callersMethodstatus
Set the status of the response # Arguments `status` - Status constant (e.g., STATUS_IN_PROGRESS, STATUS_COMPLETED)
src/web/responses/builders.rs:95
↓ 23 callersMethodas_str
(self)
src/jwt.rs:103
↓ 23 callersMethoddelete_user
(&self, user: &User)
src/db.rs:2132
↓ 23 callersFunctionextract_function_body
(source: &'a str, signature: &str)
src/security_invariants.rs:809
↓ 23 callersMethodinto_response
(self)
src/main.rs:333
↓ 22 callersMethodget_org_membership_by_platform_user_and_org
( &self, platform_user_id: Uuid, org_id: i32, )
src/db.rs:1591
↓ 20 callersMethodget_org_by_uuid
(&self, uuid: Uuid)
src/db.rs:1236
↓ 18 callersFunctioncount_tokens
Count tokens for a piece of UTF‑8 text.
src/tokens.rs:14
↓ 18 callersMethodget_credentials
(&self)
src/aws_credentials.rs:90
↓ 18 callersMethodverify_seed_wrap_for_auth_context
( &self, user: &User, auth_context: &AuthContext, )
src/main.rs:967
↓ 17 callersFunctionbuild_prompt_from_chat_messages
Build prompt from chat messages - pure function for testing
src/web/responses/context_builder.rs:550
↓ 17 callersMethodget_pool
(&self)
src/db.rs:851
↓ 16 callersFunctioncreate_chat_msg
Helper to create a ChatMsg
src/web/responses/context_builder.rs:862
↓ 16 callersFunctioncreate_password_wrapped_user
( app_state: &AppState, project_id: i32, email: String, password: &str, )
src/aead_db_tamper_tests.rs:1357
↓ 15 callersMethodevent_type
Get the event type string for SSE
src/web/responses/events.rs:151
↓ 14 callersMethodappend_str
(&mut self, value: &str)
src/encrypt.rs:173
↓ 14 callersFunctionbuild_local_test_app_state
(database_url: String)
src/aead_db_tamper_tests.rs:1127
↓ 14 callersFunctiondecrypt_with_kms
( aws_region: &str, aws_key_id: &str, aws_secret_key: &str, aws_session_token: &str, ciphe
src/encrypt.rs:331
↓ 14 callersMethoddelete
(&self, conn: &mut PgConnection)
src/models/orgs.rs:73
↓ 14 callersFunctionfirst_active_project
(app_state: &AppState)
src/aead_db_tamper_tests.rs:1141
↓ 14 callersMethodget_enclave_secret_by_key
(&self, key: &str)
src/db.rs:868
↓ 14 callersFunctionmap_decryption_error
Map decryption errors to API errors # Arguments `context` - Description of what was being decrypted (for logging) # Returns ApiError with logging
src/web/responses/errors.rs:136
↓ 13 callersMethodemit
Emit an SSE event with automatic serialization, encryption, and error handling This method: 1. Serializes the event data to JSON 2. Encrypts the JSON
src/web/responses/events.rs:63
↓ 13 callersFunctionuuid_for_bucket
(bucket: u8)
src/provider_routing.rs:414
↓ 12 callersFunctiondecrypt_string
Decrypt encrypted content as a plain UTF-8 string This is a high-level helper for decrypting plain text content (not JSON). Important**: If `encrypt
src/encrypt.rs:292
↓ 12 callersMethodvalidate
(&self)
src/web/responses/conversations.rs:268
↓ 11 callersMethodinto_bytes
(self)
src/encrypt.rs:193
↓ 10 callersMethodbuild
Build the final ResponsesCreateResponse Consumes the builder and returns the constructed response.
src/web/responses/builders.rs:130
↓ 10 callersFunctionencrypt_seed_v1
( root_key: &[u8], plaintext_seed: &[u8], user_uuid: Uuid, project_id: i32, credential_kin
src/seed_wrapping.rs:182
↓ 10 callersMethodget_oauth_provider_by_name
(&self, name: &str)
src/db.rs:1120
↓ 10 callersMethodget_org_project_by_uuid
(&self, uuid: Uuid)
src/db.rs:1300
↓ 10 callersMethodis_guest
(&self)
src/models/users.rs:108
↓ 10 callersFunctionmap_key_retrieval_error
Map key retrieval errors to API errors # Returns ApiError with logging
src/web/responses/errors.rs:145
↓ 10 callersFunctionmodel_config
(model: &str)
src/model_config.rs:461
↓ 10 callersFunctionsend_storage_message
( tx_storage: &mpsc::Sender<StorageMessage>, tx_client: &mpsc::Sender<StorageMessage>, msg: Storag
src/web/responses/handlers.rs:2284
↓ 9 callersFunctioncompute_password_auth_binding
( root_key: &[u8], project_id: i32, user_uuid: Uuid, login_identifier_kind: PasswordLoginIdent
src/seed_wrapping.rs:87
↓ 9 callersFunctiondecrypt_seed_v1
( root_key: &[u8], encrypted_seed: &[u8], user_uuid: Uuid, project_id: i32, credential_kin
src/seed_wrapping.rs:195
↓ 9 callersMethodget_email
(&self)
src/models/users.rs:91
↓ 9 callersFunctionpassword_binding
()
src/seed_wrapping.rs:263
↓ 9 callersMethodselect_completion_route
( &self, proxy_router: &ProxyRouter, account_uuid: Uuid, requested_model: &str
src/provider_routing.rs:160
↓ 8 callersFunctiondecrypt_and_derive_bip85_mnemonic
( enclave_key: Vec<u8>, encrypted_seed: Vec<u8>, bip85_path: &str, )
src/private_key.rs:127
↓ 8 callersFunctionencrypt_key_deterministic
(encryption_key: &SecretKey, key: &[u8])
src/encrypt.rs:304
↓ 8 callersMethodget_org_project_by_client_id
(&self, client_id: Uuid)
src/db.rs:1309
↓ 8 callersMethodget_org_project_secret_by_key_name_and_project
( &self, key_name: &str, project_id: i32, )
src/db.rs:1391
↓ 8 callersMethodget_user_by_email
(&self, email: String, project_id: i32)
src/db.rs:763
↓ 8 callersMethodvalidate
Validates both derivation paths if present.
src/web/protected_routes.rs:136
↓ 7 callersFunctionbuild_model_turn_request
( body: &ResponsesCreateRequest, prompt_messages: &[Value], tools_enabled: bool, )
src/web/responses/handlers.rs:203
↓ 7 callersMethodconfirm_password_reset
( &self, email: String, alphanumeric_code: String, plaintext_secret: String,
src/main.rs:1641
↓ 7 callersFunctioncreate_mock_encrypted_seed
Helper to create a mock encrypted seed for testing
src/private_key.rs:227
↓ 7 callersMethoddecrypt_seed_for_auth_context
( &self, user: &User, auth_context: &AuthContext, )
src/main.rs:928
↓ 7 callersFunctiondecrypt_user_seed_to_key
( enclave_key: Vec<u8>, encrypted_seed: Vec<u8>, derivation_path: Option<&str>, seed_phrase_de
src/private_key.rs:35
↓ 7 callersMethodget_org_by_id
(&self, id: i32)
src/db.rs:1227
↓ 7 callersMethodget_org_project_by_id
(&self, id: i32)
src/db.rs:1291
↓ 7 callersMethodget_project_oauth_settings
( &self, project_id: i32, )
src/db.rs:1849
↓ 7 callersMethodget_user_by_uuid
(&self, uuid: Uuid)
src/db.rs:754
↓ 7 callersMethodget_user_seed_wrappings_for_user_and_kind
( &self, user_id: Uuid, credential_kind: &str, )
src/db.rs:790
↓ 7 callersFunctionpassword_reset_code_mac
( root_key: &[u8], project_id: i32, user_uuid: Uuid, alphanumeric_code: &str, )
src/seed_wrapping.rs:167
↓ 7 callersFunctionproxy_router_with_both_providers
()
src/provider_routing.rs:406
↓ 7 callersFunctionresponses_request_for_model
(model: &str)
src/web/responses/handlers.rs:410
↓ 6 callersMethodappend_i32
(&mut self, value: i32)
src/encrypt.rs:185
↓ 6 callersMethodappend_uuid
(&mut self, value: Uuid)
src/encrypt.rs:189
↓ 6 callersMethodbuild
(self)
src/web/responses/instructions.rs:229
↓ 6 callersFunctioncompute_oauth_auth_binding
( root_key: &[u8], project_id: i32, user_uuid: Uuid, provider: &str, provider_user_id: &st
src/seed_wrapping.rs:110
↓ 6 callersFunctionextract_usage
Helper to extract usage from response JSON
src/web/openai.rs:1056
↓ 6 callersFunctionfind_or_create_user_from_oauth
( app_state: &AppState, email: Option<String>, provider_user_id: String, provider_name: &str,
src/web/oauth_routes.rs:1150
↓ 6 callersFunctiongenerate_twelve_word_seed
( aws_credential_manager: Arc<tokio::sync::RwLock<Option<AwsCredentialManager>>>, )
src/private_key.rs:22
↓ 6 callersMethodget_conversation_project_by_uuid_and_user
( &self, project_uuid: Uuid, user_id: Uuid, )
src/db.rs:2226
↓ 6 callersMethodget_platform_user_by_email
(&self, email: &str)
src/db.rs:1543
↓ 6 callersFunctionget_project_email_settings
( app_state: &crate::AppState, project_id: i32, )
src/email.rs:300
↓ 6 callersMethodname
(mut self, name: String)
src/web/responses/instructions.rs:219
↓ 6 callersMethodprompt
(mut self, prompt: String)
src/web/responses/instructions.rs:224
↓ 6 callersMethodselect_completion_route_with_preference
( &self, proxy_router: &ProxyRouter, account_uuid: Uuid, requested_model: &str
src/provider_routing.rs:174
↓ 5 callersFunctionallocate_created_at
( next_created_at: &mut chrono::DateTime<chrono::Utc>, )
src/web/responses/storage.rs:47
↓ 5 callersMethodappend_field
(&mut self, tag: u8, value: &[u8])
src/encrypt.rs:197
↓ 5 callersFunctionapply_responses_model_defaults
( chat_request: &mut Value, config: ResponsesModelConfig, model: &str, )
src/web/responses/handlers.rs:92
↓ 5 callersMethodbuild
(self)
src/main.rs:629
↓ 5 callersFunctiongenerate_random
()
src/encrypt.rs:451
↓ 5 callersFunctiongenerate_reset_hash
(password: String)
src/main.rs:2641
↓ 5 callersMethodget_project_email_settings
( &self, project_id: i32, )
src/db.rs:1816
↓ 5 callersMethodget_project_user_oauth_connection_by_provider_subject
( &self, provider_id: i32, provider_user_id: &str, project_id: i32, )
src/db.rs:1167
↓ 5 callersFunctionhmac_with_root_domain_key
( root_key: &[u8], key_info: &[u8], message: &[u8], )
src/seed_wrapping.rs:235
↓ 5 callersFunctioninsert_valid_reset_request_for_user
( app_state: &AppState, project_id: i32, user: &User, reset_code: &str, reset_secret: &str
src/aead_db_tamper_tests.rs:1528
↓ 5 callersMethodis_user_paid
Check if a user is on a paid plan (not free)
src/billing.rs:109
↓ 5 callersMethodnew_password_seed_wrapping_for_user
( &self, user: &User, decrypted_password_verifier: &str, plaintext_seed: &[u8]
src/main.rs:976
↓ 5 callersMethodproxyPath
(path string)
tinfoil-proxy/main.go:217
↓ 5 callersFunctionresolve_public_model_id
(model: &str)
src/model_config.rs:453
↓ 5 callersFunctionsanitize_form_field
Sanitize form field values to prevent HTTP header injection attacks Removes or replaces any CRLF sequences that could be used to inject headers
src/web/openai.rs:1722
next →1–100 of 1,278, ranked by callers