MCPcopy Create free account

hub / github.com/LeenHawk/sgproxy / functions

Functions165 in github.com/LeenHawk/sgproxy

↓ 19 callersFunctionnow_unix_ms
()
src/state.rs:32
↓ 18 callersFunctionclean_opt_owned
(value: Option<String>)
src/config.rs:190
↓ 13 callersFunctionsave_doc
(storage: &Storage, doc: &DurableStateDoc)
src/state.rs:26
↓ 12 callersFunctionload_doc
(storage: &Storage)
src/state.rs:17
↓ 11 callersMethodauthorize
(&self, req: &Request)
src/do_state.rs:110
↓ 7 callersFunctioncollect_beta_values
(raw: &str, target: &mut Vec<String>, allow_context_1m: bool)
src/proxy.rs:329
↓ 7 callersMethodnormalize
(&mut self, now: u64)
src/config.rs:198
↓ 6 callersFunctionnormalize_claudecode_sampling
(body: &mut Value)
src/proxy.rs:506
↓ 6 callersFunctionrecord_invalid_auth
(doc: &mut DurableStateDoc, id: &str, now: u64, message: String)
src/state.rs:189
↓ 5 callersFunctioncurrent_credential
(doc: &DurableStateDoc, id: &str)
src/do_state.rs:785
↓ 5 callersFunctioninsert_oauth_state
(doc: &mut DurableStateDoc, state: StoredOAuthState)
src/state.rs:262
↓ 4 callersFunctionapply_claudecode_metadata_user_id
(body: &mut Value, credential: &CredentialConfig)
src/proxy.rs:528
↓ 4 callersFunctionapply_magic_string_cache_control_triggers
(body: &mut Value)
src/proxy.rs:914
↓ 4 callersFunctioncanonicalize_claude_body
(body: &mut Value)
src/proxy.rs:846
↓ 4 callersFunctionis_claudecode_billing_header_block
(block: &Value)
src/proxy.rs:826
↓ 4 callersMethodrefresh_credential
( &self, doc: &mut DurableStateDoc, credential: &CredentialConfig, force: bool
src/do_state.rs:587
↓ 4 callersFunctionsample_oauth_state
(state_id: &str, channel: ChannelKind)
src/state.rs:315
↓ 4 callersFunctionsend_request
( method: Method, url: &str, headers: Headers, body: Option<JsValue>, )
src/oauth.rs:477
↓ 4 callersFunctionupsert_credential
( doc: &mut DurableStateDoc, input: CredentialUpsertInput, forced_id: Option<&str>, forced_cha
src/state.rs:80
↓ 3 callersFunctionapply_claudecode_billing_header_system_block
(body: &mut Value, version: String)
src/proxy.rs:657
↓ 3 callersFunctionblock_supports_direct_cache_control
(block_map: &serde_json::Map<String, Value>)
src/proxy.rs:1048
↓ 3 callersFunctionbucket_reset_or
(resets_at: &Option<String>, fallback: u64)
src/state.rs:399
↓ 3 callersMethodbuild_usage_payload
( &self, doc: &mut DurableStateDoc, only_id: Option<&str>, )
src/do_state.rs:715
↓ 3 callersFunctionfetch_oauth_profile
(access_token: &str)
src/oauth.rs:237
↓ 3 callersFunctionflatten_system_text_before_cache_control
(body: &mut Value)
src/proxy.rs:687
↓ 3 callersFunctionheader_equals
(header_value: &F, name: &str, expected: &str)
src/proxy.rs:304
↓ 3 callersFunctionjson_error
(status: u16, message: &str)
src/do_state.rs:829
↓ 3 callersFunctionjson_text_block
(text: &str)
src/proxy.rs:907
↓ 3 callersFunctionnon_empty_owned
(value: &str)
src/proxy.rs:621
↓ 3 callersFunctionparse_query_value
(raw: Option<&str>, key: &str)
src/oauth.rs:547
↓ 3 callersFunctionparse_usage_bucket
(bucket: UsageBucketPayload)
src/oauth.rs:452
↓ 3 callersFunctionrecord_transient
(doc: &mut DurableStateDoc, id: &str, now: u64, message: String)
src/state.rs:198
↓ 3 callersFunctionsample_credential
()
src/proxy.rs:1064
↓ 2 callersFunctionapply_magic_trigger_to_block
( block_map: &mut serde_json::Map<String, Value>, remaining_slots: &mut usize, )
src/proxy.rs:954
↓ 2 callersFunctionapply_magic_trigger_to_content
(content: &mut Value, remaining_slots: &mut usize)
src/proxy.rs:939
↓ 2 callersFunctionbuild_upstream_headers
( original: &Headers, access_token: &str, allow_context_1m: bool, )
src/proxy.rs:107
↓ 2 callersFunctioncanonicalize_claude_blocks
(blocks: &mut Vec<Value>)
src/proxy.rs:898
↓ 2 callersFunctionclean_opt_str
(value: &str)
src/oauth.rs:521
↓ 2 callersFunctioncount_cache_controls_in_content
(content: &Value)
src/proxy.rs:1029
↓ 2 callersFunctiondefault_claude_headers
()
src/oauth.rs:470
↓ 2 callersFunctionensure_channel_credential
(doc: &DurableStateDoc, channel: ChannelKind, id: &str)
src/do_state.rs:798
↓ 2 callersFunctionexact_usage_status
( usage: &CredentialUsageSnapshot, now: u64, )
src/state.rs:365
↓ 2 callersFunctionextract_inline_query_value
(raw: &str, key: &str)
src/oauth.rs:577
↓ 2 callersFunctionextract_value_from_text
(raw: &str, key: &str)
src/oauth.rs:562
↓ 2 callersFunctionfetch_claudecode_usage
(access_token: &str)
src/oauth.rs:264
↓ 2 callersFunctionfirst_text_from_claude_block
(block: &Value)
src/proxy.rs:785
↓ 2 callersFunctionis_hop_by_hop
(name: &str)
src/proxy.rs:357
↓ 2 callersFunctionmaybe_refresh_access_token
( credential: &CredentialConfig, )
src/oauth.rs:231
↓ 2 callersFunctionparse_rate_limit_reset
(raw: &str)
src/proxy.rs:319
↓ 2 callersFunctionpercent_decode_lossy
(value: &str)
src/oauth.rs:632
↓ 2 callersFunctionproxy_request
( mut req: Request, credential: &CredentialConfig, )
src/proxy.rs:34
↓ 2 callersFunctionrecord_rate_limited
( doc: &mut DurableStateDoc, id: &str, now: u64, usage: Option<&CredentialUsageSnapshot>,
src/state.rs:205
↓ 2 callersFunctionrender_index
(mode: &str)
src/lib.rs:28
↓ 2 callersFunctionrequest_can_have_body
(req: &Request)
src/proxy.rs:436
↓ 2 callersMethodresolve_credential_input
( &self, input: CredentialUpsertInput, forced_id: Option<&str>, doc: &DurableS
src/do_state.rs:389
↓ 2 callersFunctionsend_upstream_request
( upstream_url: &str, method: &worker::Method, headers: Headers, body: Option<&[u8]>, )
src/proxy.rs:157
↓ 2 callersFunctionset_bucket_from_headers
( header_value: &F, utilization_name: &str, reset_name: &str, utilization_pct: &mut Option<u32
src/proxy.rs:282
↓ 2 callersMethodset_enabled
(&self, id: &str, enabled: bool)
src/do_state.rs:200
↓ 2 callersFunctiontake_oauth_state
( doc: &mut DurableStateDoc, channel: ChannelKind, requested_state: Option<&str>, )
src/state.rs:268
↓ 2 callersFunctionusage_auth_failed
(message: &str)
src/do_state.rs:793
↓ 1 callersFunctionapply_1m_probe_result
( doc: &mut DurableStateDoc, id: &str, disable_sonnet_1m: bool, disable_opus_1m: bool, )
src/state.rs:162
↓ 1 callersFunctionapply_refreshed_credential
( doc: &mut DurableStateDoc, credential: &CredentialConfig, refreshed: RefreshedCredential, )
src/do_state.rs:752
↓ 1 callersFunctionbearer_token
(headers: &Headers)
src/do_state.rs:822
↓ 1 callersFunctionblock_has_cache_control
(block: &Value)
src/proxy.rs:762
↓ 1 callersFunctionblock_has_direct_cache_control
(block: &Value)
src/proxy.rs:1042
↓ 1 callersFunctionblock_text
(block: &Value)
src/proxy.rs:768
↓ 1 callersFunctionbuild_claude_authorize_url
( redirect_uri: &str, scope: &str, code_challenge: &str, state: &str, )
src/oauth.rs:491
↓ 1 callersFunctionbuild_claudecode_billing_header_text
(body: &Value, version: &str)
src/proxy.rs:732
↓ 1 callersFunctionbuild_upstream_url
(req: &Request)
src/proxy.rs:99
↓ 1 callersFunctionbuild_usage_view
( credential: &CredentialConfig, usage: CredentialUsageSnapshot, now: u64, )
src/state.rs:242
↓ 1 callersFunctioncache_control_ephemeral
(ttl: Option<&'static str>)
src/proxy.rs:996
↓ 1 callersFunctioncanonicalize_claude_content
(content: &mut Value)
src/proxy.rs:883
↓ 1 callersFunctioncanonicalize_claude_message
(message: &mut Value)
src/proxy.rs:873
↓ 1 callersFunctioncanonicalize_claude_system
(system: &mut Value)
src/proxy.rs:862
↓ 1 callersFunctionclaudecode_1m_enabled_for_credential
( credential: &CredentialConfig, target: Option<&ClaudeCode1mTarget>, )
src/proxy.rs:454
↓ 1 callersFunctionclaudecode_billing_version_hash
(message_text: &str, version: &str)
src/proxy.rs:796
↓ 1 callersFunctionclone_request
(req: &Request)
src/do_state.rs:789
↓ 1 callersMethodcreate_credential
(&self, payload: CredentialUpsertInput)
src/do_state.rs:168
↓ 1 callersFunctiondelete_credential
(doc: &mut DurableStateDoc, id: &str)
src/state.rs:143
↓ 1 callersMethoddelete_credential
(&self, id: &str)
src/do_state.rs:208
↓ 1 callersFunctionderive_rate_limited_status
( usage: &CredentialUsageSnapshot, now: u64, )
src/state.rs:301
↓ 1 callersFunctionexchange_claudecode_code_for_tokens
( stored_state: &StoredOAuthState, code: &str, )
src/oauth.rs:190
↓ 1 callersFunctionexisting_cache_breakpoint_count
(root: &serde_json::Map<String, Value>)
src/proxy.rs:1006
↓ 1 callersFunctionextract_labeled_value
(raw: &str, key: &str)
src/oauth.rs:592
↓ 1 callersFunctionextract_manual_code
(raw: &str)
src/oauth.rs:612
↓ 1 callersFunctionextract_rate_limit_usage
( headers: &Headers, status_code: u16, )
src/proxy.rs:184
↓ 1 callersFunctionextract_rate_limit_usage_values
( status_code: u16, header_value: F, )
src/proxy.rs:198
↓ 1 callersMethodfetch_usage_snapshot
( &self, doc: &mut DurableStateDoc, credential: &CredentialConfig, )
src/do_state.rs:608
↓ 1 callersFunctionfilter_response_headers
(original: &Headers)
src/proxy.rs:173
↓ 1 callersFunctionfirst_claudecode_user_text
(body: &Value)
src/proxy.rs:745
↓ 1 callersFunctionfirst_message_session_seed
(body: &Value)
src/proxy.rs:606
↓ 1 callersFunctionfirst_usable
( credentials: &[CredentialConfig], channel: ChannelKind, now: u64, )
src/state.rs:65
↓ 1 callersFunctiongenerate_code_challenge
(code_verifier: &str)
src/oauth.rs:542
↓ 1 callersFunctiongenerate_code_verifier
(len: usize)
src/oauth.rs:536
↓ 1 callersFunctiongenerate_oauth_state
()
src/oauth.rs:530
↓ 1 callersMethodget_usage
(&self, id: &str)
src/do_state.rs:139
↓ 1 callersFunctionhas_context_1m_beta
(headers: &Headers)
src/proxy.rs:348
↓ 1 callersFunctionis_context_1m_beta
(value: &str)
src/proxy.rs:344
↓ 1 callersFunctionjs_utf16_unit_char
(unit: u16)
src/proxy.rs:816
↓ 1 callersMethodlist_credentials
(&self)
src/do_state.rs:156
next →1–100 of 165, ranked by callers