Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
conduwuit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
🥺
conduwuit
Commits
92641d06
Commit
92641d06
authored
1 year ago
by
🥺
Committed by
🥺
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
first of many small code documentation
Signed-off-by:
strawberry
<
strawberry@puppygock.gay
>
parent
ad1d272e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/api/client_server/media.rs
+4
-2
4 additions, 2 deletions
src/api/client_server/media.rs
src/api/client_server/mod.rs
+7
-0
7 additions, 0 deletions
src/api/client_server/mod.rs
src/config/mod.rs
+3
-0
3 additions, 0 deletions
src/config/mod.rs
with
14 additions
and
2 deletions
src/api/client_server/media.rs
+
4
−
2
View file @
92641d06
...
...
@@ -9,9 +9,10 @@
},
};
/// generated MXC ID (`media-id`) length
const
MXC_LENGTH
:
usize
=
32
;
/// # `GET /_matrix/media/
r0
/config`
/// # `GET /_matrix/media/
v3
/config`
///
/// Returns max upload size.
pub
async
fn
get_media_config_route
(
...
...
@@ -22,7 +23,7 @@ pub async fn get_media_config_route(
})
}
/// # `POST /_matrix/media/
r0
/upload`
/// # `POST /_matrix/media/
v3
/upload`
///
/// Permanently save media in the server.
///
...
...
@@ -58,6 +59,7 @@ pub async fn create_content_route(
})
}
/// helper method to fetch remote media from other servers over federation
pub
async
fn
get_remote_content
(
mxc
:
&
str
,
server_name
:
&
ruma
::
ServerName
,
...
...
This diff is collapsed.
Click to expand it.
src/api/client_server/mod.rs
+
7
−
0
View file @
92641d06
...
...
@@ -68,7 +68,14 @@
pub
use
user_directory
::
*
;
pub
use
voip
::
*
;
/// generated device ID length
pub
const
DEVICE_ID_LENGTH
:
usize
=
10
;
/// generated user access token length
pub
const
TOKEN_LENGTH
:
usize
=
32
;
/// generated user session ID length
pub
const
SESSION_ID_LENGTH
:
usize
=
32
;
/// auto-generated password length
pub
const
AUTO_GEN_PASSWORD_LENGTH
:
usize
=
25
;
This diff is collapsed.
Click to expand it.
src/config/mod.rs
+
3
−
0
View file @
92641d06
...
...
@@ -14,10 +14,13 @@
use
self
::
proxy
::
ProxyConfig
;
/// all the config options for conduwuit
#[derive(Clone,
Debug,
Deserialize)]
pub
struct
Config
{
/// [`IpAddr`] conduwuit will listen on (can be IPv4 or IPv6)
#[serde(default
=
"default_address"
)]
pub
address
:
IpAddr
,
/// default TCP port conduwuit will listen on
#[serde(default
=
"default_port"
)]
pub
port
:
u16
,
pub
tls
:
Option
<
TlsConfig
>
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment