Starting content to test deployment
This commit is contained in:
parent
cf490419a2
commit
fbf4880d46
4
.gitignore
vendored
4
.gitignore
vendored
@ -8,3 +8,7 @@ server-api/.vscode/launch.json
|
||||
tui/example-config.json
|
||||
|
||||
bin/
|
||||
|
||||
# Genereated in pipelines only
|
||||
docs/resources
|
||||
docs/public/
|
||||
|
@ -1,9 +1,14 @@
|
||||
image: shockrah/freechat:0.4
|
||||
|
||||
stages:
|
||||
- docs
|
||||
- build
|
||||
- test
|
||||
|
||||
workflow:
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH'
|
||||
|
||||
variables:
|
||||
CARGO_HOME: $CI_PROJECT_DIR/.cargo
|
||||
|
||||
@ -35,6 +40,7 @@ test-json-api:
|
||||
stage: test
|
||||
needs:
|
||||
- build-json-api
|
||||
only: [ "master" ]
|
||||
|
||||
dependencies:
|
||||
- build-json-api
|
||||
@ -49,3 +55,19 @@ test-json-api:
|
||||
expire_in: 1 week
|
||||
name: json-api
|
||||
|
||||
|
||||
build-wiki:
|
||||
# Cheap as hell so we run on master basically everytime
|
||||
image: registry.gitlab.com/pages/hugo:latest
|
||||
|
||||
only: [ "master" ]
|
||||
stage: docs
|
||||
|
||||
script:
|
||||
- cd docs/
|
||||
- hugo
|
||||
- cp -r public/ ../
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
|
6
docs/archetypes/default.md
Normal file
6
docs/archetypes/default.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
draft: true
|
||||
---
|
||||
|
7
docs/config.toml
Normal file
7
docs/config.toml
Normal file
@ -0,0 +1,7 @@
|
||||
baseURL = "https://freechat.shockrah.xyz"
|
||||
languageCode = "en-us"
|
||||
theme = "kraiklyn"
|
||||
title = "Freechat Reference"
|
||||
|
||||
[params]
|
||||
externalTitle = "Freechat docs"
|
97
docs/content/structures/_index.md
Normal file
97
docs/content/structures/_index.md
Normal file
@ -0,0 +1,97 @@
|
||||
# Structures
|
||||
|
||||
This section details what kind of data structures are returned by the json-api.
|
||||
|
||||
**IMPORTANT**: All structures are returned in [JSON form](https://www.json.org/json-en.html).
|
||||
|
||||
## General Data Notation
|
||||
|
||||
* u64
|
||||
|
||||
* Unsigned 64 bit integer
|
||||
|
||||
* i64
|
||||
|
||||
* Signed 64 bit integer
|
||||
|
||||
* String
|
||||
|
||||
## Channels
|
||||
|
||||
Channels are made up of the following components
|
||||
|
||||
Name | Type
|
||||
:------:|:--------:
|
||||
id | `u64`
|
||||
name | `String`
|
||||
kind | `i32`
|
||||
|
||||
|
||||
Channels have two valid types or (more semantically) `kind` values:
|
||||
|
||||
* Voice Channel = 1
|
||||
|
||||
* Text Channel = 2
|
||||
|
||||
## Users
|
||||
|
||||
### Personal User
|
||||
|
||||
If you need to get your own user data, with `/users/me` then the data received on success has the following fields:
|
||||
|
||||
Name | Type
|
||||
:------:|:-----:
|
||||
id | `u64`
|
||||
secret | `String`
|
||||
joindate| `i64`
|
||||
status | `i32`
|
||||
permissions| `u64`
|
||||
|
||||
### JWT
|
||||
|
||||
This data is retrieved after a sucessful `/login` hit.
|
||||
|
||||
Name | Type
|
||||
:-----:|:------:
|
||||
jwt | `String`
|
||||
|
||||
### Full Public User
|
||||
|
||||
Name | Type
|
||||
:-----:|:-----:
|
||||
id | `u64`
|
||||
name | `String`
|
||||
joindate| `i64`
|
||||
status | `i32`
|
||||
permissions| `u64`
|
||||
|
||||
For users _without_ the `USER_FETCH` permission the only two fields with actual data is `id` and `name`. The other fields will be set to 0.
|
||||
|
||||
## Messages
|
||||
|
||||
Name | Type
|
||||
:-----:|:-----:
|
||||
id | `u64`
|
||||
time | `i64`
|
||||
content | `String`
|
||||
type | `String`
|
||||
author_id | `u64`
|
||||
channel_id | `u64`
|
||||
|
||||
|
||||
Acceptable values
|
||||
|
||||
## Invites
|
||||
|
||||
When requesting a code from `/invite/create` successful data contains:
|
||||
|
||||
Name | Type
|
||||
:-----:|:-----:
|
||||
id | `i64`
|
||||
uses | `null|i64`
|
||||
expires| `bool`
|
||||
|
||||
Most clients should format this code for usage as `https://domain.net:port/join?code=<id>`. The other data is merely for tracking the server's end.
|
||||
|
||||
|
||||
|
3
docs/layouts/partials/logo.html
Normal file
3
docs/layouts/partials/logo.html
Normal file
@ -0,0 +1,3 @@
|
||||
<div>
|
||||
From shockrah with <3
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user