Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JSH32/Backpack
/ functions
Functions
296 in github.com/JSH32/Backpack
⨍
Functions
296
◇
Types & classes
137
↓ 76 callers
Method
clone
(&self)
src/database/sonyflake.rs:118
↓ 63 callers
Method
into
(self)
src/services/auth/oauth.rs:29
↓ 29 callers
Method
request
* Request method * @param options The request options from the service * @returns CancelablePromise<T> * @throws ApiError
frontend/client/core/AxiosHttpRequest.ts:21
↓ 29 callers
Method
then
( onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason
frontend/client/core/CancelablePromise.ts:88
↓ 24 callers
Method
catch
( onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null )
frontend/client/core/CancelablePromise.ts:95
↓ 20 callers
Function
get_env
(var: &str)
src/config.rs:158
↓ 17 callers
Function
create
( service: web::Data<UserService>, form: web::Json<UserCreateForm>, )
src/routes/user.rs:115
↓ 12 callers
Method
http_response
Explicit convert to actix HttpResponse type
src/models/mod.rs:104
↓ 12 callers
Method
to_response
(self, code: StatusCode)
src/services/mod.rs:67
↓ 10 callers
Method
sonyflake
Alias for `string_len(20)`, a sonyflake is 20 chars long.
migration/src/extensions.rs:10
↓ 9 callers
Method
by_condition
Get [`T`] by a [`sea_orm::Condition`].
src/services/data_service.rs:65
↓ 9 callers
Method
def
(&self)
src/database/entity/settings.rs:21
↓ 9 callers
Method
delete
Delete a user. # Arguments `user` - User to delete. `password` - If provided, will make sure that the correct password is provided.
src/services/user.rs:394
↓ 9 callers
Function
useStore
()
frontend/helpers/store.ts:34
↓ 8 callers
Function
get_env_or
(var: &str, default: T)
src/config.rs:143
↓ 7 callers
Method
by_id
Get [`Self::M`] by ID.
src/services/data_service.rs:52
↓ 7 callers
Method
to
()
src/database/entity/users.rs:36
↓ 7 callers
Method
to_option
(self)
src/services/mod.rs:49
↓ 7 callers
Function
useAppInfo
()
frontend/helpers/info.ts:5
↓ 6 callers
Method
from
(response: MessageResponse)
src/models/mod.rs:111
↓ 6 callers
Function
get_routes
()
src/routes/mod.rs:19
↓ 5 callers
Method
finally
(onFinally?: (() => void) | null)
frontend/client/core/CancelablePromise.ts:101
↓ 5 callers
Method
info
* Get current user information * - Minimum required role: `user` * - Allow unverified users: `true` * - Application token allowed: `tru
frontend/client/services/UserService.ts:25
↓ 5 callers
Method
new_jwt
Create a new JWT for the user
src/services/auth/mod.rs:179
↓ 5 callers
Method
next_id
Generate the next unique id. After the Sonyflake time overflows, next_id returns an error.
src/database/sonyflake.rs:84
↓ 5 callers
Function
resolve
(options: ApiRequestOptions, resolver?: T | Resolver<T>)
frontend/client/core/request.ts:138
↓ 5 callers
Method
resource_name
Get name of resource as string.
src/services/data_service.rs:44
↓ 4 callers
Method
get_auth_method
Get authentication method for a user.
src/services/auth/auth_method.rs:28
↓ 4 callers
Function
isString
(value: any)
frontend/client/core/request.ts:18
↓ 4 callers
Method
smtp_enabled
Is SMTP enabled?
src/services/user.rs:75
↓ 4 callers
Method
to_file_data
Convert a model to [`FileData`].
src/services/file/mod.rs:317
↓ 4 callers
Method
to_message_response
(self, code: StatusCode)
src/services/mod.rs:35
↓ 3 callers
Function
convertBytes
(usage: number, decimals = 0)
frontend/helpers/util.ts:16
↓ 3 callers
Method
create
* Create a new user * * @param requestBody * @returns UserData * @throws ApiError
frontend/client/services/UserService.ts:39
↓ 3 callers
Method
create_auth_method
Create and validate auth methods.
src/services/auth/auth_method.rs:178
↓ 3 callers
Method
create_verification
Create and send verification email. This will unverify a user if they are currently verified and delete currently existing verifications. This will o
src/services/user.rs:434
↓ 3 callers
Method
delete_objects
(&self, keys: Vec<String>)
src/services/file/providers/s3.rs:56
↓ 3 callers
Method
get_enabled_methods
Get all methods enabled for a user.
src/services/auth/auth_method.rs:42
↓ 3 callers
Method
get_oauth_client
(&self, provider_type: OAuthProvider)
src/services/auth/mod.rs:388
↓ 3 callers
Method
get_page
Get a [`ServicePage`] of [`M`].
src/services/data_service.rs:128
↓ 3 callers
Method
invite_only
Are registration keys required?
src/services/user.rs:80
↓ 3 callers
Function
isDefined
(value: T | null | undefined)
frontend/client/core/request.ts:14
↓ 3 callers
Function
isStringWithValue
(value: any)
frontend/client/core/request.ts:22
↓ 3 callers
Method
new_client
Create new client for the provider. # Arguments `config` - OAuth config. `callback_url` - Callback URL.
src/services/auth/oauth.rs:55
↓ 3 callers
Function
new_password
Validate a password and hash it.
src/services/auth/mod.rs:448
↓ 3 callers
Method
oauth_enabled
Check if the OAuth provider is enabled.
src/services/auth/mod.rs:209
↓ 3 callers
Function
process
(key: string, value: any)
frontend/client/core/request.ts:63
↓ 3 callers
Method
put_object
(&self, name: &str, data: &Vec<u8>)
src/services/file/providers/s3.rs:35
↓ 3 callers
Function
to_sonyflake_time
(time: DateTime<Utc>)
src/database/sonyflake.rs:125
↓ 3 callers
Function
validate_password
Validate a password.
src/services/auth/mod.rs:406
↓ 2 callers
Method
create_user
Create a user. # Arguments `username` - Users username `email` - User email `auth_method` - (method, identifier, optional username) `registration_ke
src/services/user.rs:107
↓ 2 callers
Function
dateToString
(date: Date)
frontend/helpers/util.ts:30
↓ 2 callers
Method
deleteFile
* Delete file data by ID. * - Minimum required role: `user` * - Allow unverified users: `false` * - Application token allowed: `true`
frontend/client/services/FileService.ts:148
↓ 2 callers
Method
delete_batch
Delete multiple files. # Arguments `ids` - List of file IDs. `user_id` - User who owns this file. If provided this will validate ownership.
src/services/file/mod.rs:124
↓ 2 callers
Method
delete_file
Delete a file. # Arguments `id` - File ID. `user_id` - User who owns this file. If provided this will validate ownership.
src/services/file/mod.rs:92
↓ 2 callers
Method
enabledMethods
* Get all enabled auth methods for this user. * * @returns AuthMethods * @throws ApiError
frontend/client/services/AuthenticationService.ts:45
↓ 2 callers
Method
get_by_identifier
Get a user by their username or email.
src/services/user.rs:85
↓ 2 callers
Method
get_file
Get a file. If you don't need ownership validation use `by_id` # Arguments `id` - File ID. `user_id` - User who owns this file. This will validate o
src/services/file/mod.rs:71
↓ 2 callers
Method
get_file_page
This should be used instead of [`DataService`]'s `get_page` for most cases.
src/services/file/mod.rs:286
↓ 2 callers
Function
get_token
(req: &HttpRequest)
src/internal/auth.rs:147
↓ 2 callers
Method
http_code
(&self)
src/services/mod.rs:133
↓ 2 callers
Function
isBlob
(value: any)
frontend/client/core/request.ts:26
↓ 2 callers
Method
list
* Get a paginated list of files * - Minimum required role: `user` * - Allow unverified users: `false` * - Application token allowed: `t
frontend/client/services/FileService.ts:76
↓ 2 callers
Function
make_redirect_url
( redirect: Option<String>, token: &str, include_redirect: bool, )
src/services/auth/mod.rs:471
↓ 2 callers
Method
oauthLogin
* Get URL for OAuth2 authentication. * If token is provided, this will link to the existing account. * * @param provider * @param
frontend/client/services/AuthenticationService.ts:62
↓ 2 callers
Function
random_digit_str
(digits: u32)
src/services/auth/mod.rs:466
↓ 2 callers
Method
settings
* Change user settings * - Minimum required role: `user` * - Allow unverified users: `true` * - Application token allowed: `false`
frontend/client/services/UserService.ts:104
↓ 2 callers
Method
use_key
Use a key once by its code.
src/services/registration_key.rs:57
↓ 2 callers
Method
validate_jwt
Validate JWT with specific parameters. # Arguments `allow_unverified` - Allow unverified users.
src/services/auth/mod.rs:118
↓ 2 callers
Function
validate_username
Validate a username.
src/services/user.rs:530
↓ 2 callers
Method
verify_password_action
Verify a password required action. If password method exists on the user, validate. This returns [`ServiceError::InvalidData`] if failed.
src/services/user.rs:481
↓ 2 callers
Method
verify_user
Verify a user based on the user themselves.
src/services/user.rs:330
↓ 1 callers
Function
append
(key: string, value: any)
frontend/client/core/request.ts:59
↓ 1 callers
Function
base64
(str: string)
frontend/client/core/request.ts:47
↓ 1 callers
Method
basic
* Login with email and password. * * @param requestBody * @returns TokenResponse * @throws ApiError
frontend/client/services/AuthenticationService.ts:25
↓ 1 callers
Function
can_have_thumbnail
Can the path trigger a thumbnail to be created.
src/internal/file.rs:21
↓ 1 callers
Method
cancel
()
frontend/client/core/CancelablePromise.ts:105
↓ 1 callers
Function
catchErrorCodes
(options: ApiRequestOptions, result: ApiResult)
frontend/client/core/request.ts:245
↓ 1 callers
Function
copyText
(text: string)
frontend/helpers/util.ts:45
↓ 1 callers
Method
create_application
Create an application. # Arguments `user_id` - User who owns the application. `name` - Name of the application (must be unique). Returns [`Applicat
src/services/application.rs:76
↓ 1 callers
Method
create_or_set_method
Creates or sets the value of an auth method on a user.
src/services/auth/auth_method.rs:143
↓ 1 callers
Method
create_registration_key
Create a new registration key. # Arguments `issuer` - User who issued the registration key. `uses_left` - Amount of times the key should be used. `e
src/services/registration_key.rs:36
↓ 1 callers
Function
create_thumbnail_image
(bytes: &Vec<u8>)
src/services/file/mod.rs:334
↓ 1 callers
Function
current_elapsed_time
(start_time: i64)
src/database/sonyflake.rs:129
↓ 1 callers
Method
delete
* Delete a user and all files owned by the user * - Minimum required role: `user` * - Allow unverified users: `true` * - Application to
frontend/client/services/UserService.ts:60
↓ 1 callers
Method
enabled_methods
Get the amount of enabled auth methods.
src/models/auth.rs:34
↓ 1 callers
Function
generate_thumbnails
TODO: Move this to admin panel with a websocket. Regenerate all thumbnails. This is a multithreaded blocking operation used in the CLI.
src/main.rs:283
↓ 1 callers
Method
generate_token
Get a token for an application. # Arguments `id` - ID of the application. `user_id` - User who owns the application, if there is a mismatch this will
src/services/application.rs:37
↓ 1 callers
Function
getExtension
(fileName: string)
frontend/helpers/util.ts:42
↓ 1 callers
Function
getFormData
(options: ApiRequestOptions)
frontend/client/core/request.ts:109
↓ 1 callers
Function
getHeaders
(config: OpenAPIConfig, options: ApiRequestOptions, formData?: FormData)
frontend/client/core/request.ts:145
↓ 1 callers
Function
getQueryString
(params: Record<string, any>)
frontend/client/core/request.ts:56
↓ 1 callers
Function
getRequestBody
(options: ApiRequestOptions)
frontend/client/core/request.ts:188
↓ 1 callers
Function
getResponseBody
(response: AxiosResponse<any>)
frontend/client/core/request.ts:238
↓ 1 callers
Function
getResponseHeader
(response: AxiosResponse<any>, responseHeader?: string)
frontend/client/core/request.ts:228
↓ 1 callers
Function
getUrl
(config: OpenAPIConfig, options: ApiRequestOptions)
frontend/client/core/request.ts:90
↓ 1 callers
Method
get_by_code
Get a registration key by UUID.
src/services/registration_key.rs:22
↓ 1 callers
Method
get_object
(&self, key: &str)
src/services/file/providers/s3.rs:77
↓ 1 callers
Function
get_thumbnail_image
(bytes: &Vec<u8>)
src/internal/file.rs:8
↓ 1 callers
Method
get_user_by_value
Get a user by authentication method and value. This also updates `last_accessed`
src/services/auth/auth_method.rs:105
next →
1–100 of 296, ranked by callers