From 4870edde515cc2484be16bb2b52aa7d4c411b8bb Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Fri, 3 Jun 2022 19:48:15 +0200 Subject: [PATCH] docs(slate): add Git Repositories API docs --- README.md | 34 ++++++ docs/api/source/images/logo.png | Bin 22317 -> 0 bytes docs/api/source/includes/_errors.md | 22 ---- docs/api/source/includes/_git.md | 148 ++++++++++++++++++++++++ docs/api/source/includes/_repository.md | 6 +- docs/api/source/index.html.md | 1 - docs/config.toml | 14 ++- docs/content/api-old.md | 89 -------------- 8 files changed, 195 insertions(+), 119 deletions(-) delete mode 100644 docs/api/source/images/logo.png delete mode 100644 docs/api/source/includes/_errors.md delete mode 100644 docs/content/api-old.md diff --git a/README.md b/README.md index 138282a2..34e6fd3a 100644 --- a/README.md +++ b/README.md @@ -65,3 +65,37 @@ If you wish to contribute to the project, please take note of the following: * Please follow the [Conventional Commits](https://www.conventionalcommits.org/) style for your commit messages. + +### Writing documentation + +The `docs` directory contains a Hugo site consisting of all user & +administrator documentation. `docs/api` on the other hand is a +[slate](https://github.com/slatedocs/slate) project describing the HTTP web +API. + +To modify the Hugo documentation, you'll need to install Hugo. Afterwards, you +can use the following commands inside the `docs` directory: + +```sh +# Build the documentation +hugo + +# Host an auto-refreshing web server with the documentation. Important to note +is that the files will be at `http://localhost:1313/docs/vieter` instead of +just `http://localhost:1313/docs/vieter` +hugo server +``` + +For the Slate docs, I personally just start a docker container: + +```sh +docker run \ + --rm \ + -p 4567:4567 \ + --name slate \ + -v $(pwd)/docs/api/source:/srv/slate/source slatedocs/slate serve +``` + +This'll make the slate docs available at http://localhost:4567. Sadly, this +server doesn't auto-refresh, so you'll have to manually refresh your browser +every time you make a change. diff --git a/docs/api/source/images/logo.png b/docs/api/source/images/logo.png deleted file mode 100644 index 68a478fae3611d878af18c575cf8218b818f41db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22317 zcmeFZWo%qs(JSi6L=X^=@bIwUZ?M&v zZNPsZoz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*=stS65K@YZ0@IZ#HI|c)`?yr2zZkY(Q;iu#JfQnm19hOBCp&#(bKYX{?Z?a@ zzEfQ>oR3MIJUaEGIeUi(-Qi}`{}(--BFvDHAUGv?wo0y|L&8PbBlJ)ARAQUF+MpsPS3x+00!x4ls~b4 F`9JqINYVfR diff --git a/docs/api/source/includes/_errors.md b/docs/api/source/includes/_errors.md deleted file mode 100644 index 7b35e92b..00000000 --- a/docs/api/source/includes/_errors.md +++ /dev/null @@ -1,22 +0,0 @@ -# Errors - - - -The Kittn API uses the following error codes: - - -Error Code | Meaning ----------- | ------- -400 | Bad Request -- Your request is invalid. -401 | Unauthorized -- Your API key is wrong. -403 | Forbidden -- The kitten requested is hidden for administrators only. -404 | Not Found -- The specified kitten could not be found. -405 | Method Not Allowed -- You tried to access a kitten with an invalid method. -406 | Not Acceptable -- You requested a format that isn't json. -410 | Gone -- The kitten requested has been removed from our servers. -418 | I'm a teapot. -429 | Too Many Requests -- You're requesting too many kittens! Slow down! -500 | Internal Server Error -- We had a problem with our server. Try again later. -503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. diff --git a/docs/api/source/includes/_git.md b/docs/api/source/includes/_git.md index e69de29b..f797a639 100644 --- a/docs/api/source/includes/_git.md +++ b/docs/api/source/includes/_git.md @@ -0,0 +1,148 @@ +# Git Repositories + + + +Endpoints for interacting with the list of Git repositories stored on the +server. + +## List repos + +```shell +curl \ + -H 'X-Api-Key: secret' \ + https://example.com/api/repos?offset=10&limit=20 +``` + +> JSON Output format + +```json +{ + "message": "", + "data": [ + { + "id": 1, + "url": "https://aur.archlinux.org/discord-ptb.git", + "branch": "master", + "repo": "bur", + "schedule": "", + "arch": [ + { + "id": 1, + "repo_id": 1, + "value": "x86_64" + } + ] + } + ] +} +``` + +Retrieve a list of Git repositories. + +### HTTP Request + +`GET /api/repos` + +### Query Parameters + +Parameter | Description +--------- | ----------- +limit | Maximum amount of results to return. +offset | Offset of results. +repo | Limit results to repositories that publish to the given repo. + +## Get a repo + +```shell +curl \ + -H 'X-Api-Key: secret' \ + https://example.com/api/repos/15 +``` + +> JSON Output format + +```json +{ + "message": "", + "data": { + "id": 1, + "url": "https://aur.archlinux.org/discord-ptb.git", + "branch": "master", + "repo": "bur", + "schedule": " 0 3", + "arch": [ + { + "id": 1, + "repo_id": 1, + "value": "x86_64" + } + ] + } +} +``` + +Get info about a specific Git repository. + +### HTTP Request + +`GET /api/repos/:id` + +### URL Parameters + +Parameter | Description +--------- | ----------- +repo | ID of requested repo + +## Create a new repo + +Create a new Git repository with the given data. + +### HTTP Request + +`POST /api/repos` + +### Query Parameters + +Parameter | Description +--------- | ----------- +url | URL of the Git repository. +branch | Branch of the Git repository. +repo | Vieter repository to publish built packages to. +schedule | Cron build schedule +arch | Comma-separated list of architectures to build package on. + +## Modify a repo + +Modify the data of an existing Git repository. + +### HTTP Request + +`PATCH /api/repos` + +### Query Parameters + +Parameter | Description +--------- | ----------- +url | URL of the Git repository. +branch | Branch of the Git repository. +repo | Vieter repository to publish built packages to. +schedule | Cron build schedule +arch | Comma-separated list of architectures to build package on. + +## Remove a repo + +Remove a Git repository from the server. + +### HTTP Request + +`DELETE /api/repos/:id` + +### URL Parameters + +Parameter | Description +--------- | ----------- +repo | ID of repo to remove diff --git a/docs/api/source/includes/_repository.md b/docs/api/source/includes/_repository.md index 20f5e5fe..fbbc329a 100644 --- a/docs/api/source/includes/_repository.md +++ b/docs/api/source/includes/_repository.md @@ -7,7 +7,7 @@ possible. ## Get a package archive or database file ```shell -curl -OL https://example.com/bur/x86_64/tuxedo-keyboard-3.0.10-1-x86_64.pkg.tar.zst +curl -L https://example.com/bur/x86_64/tuxedo-keyboard-3.0.10-1-x86_64.pkg.tar.zst ``` This endpoint is really the entire repository. It serves both the package @@ -43,7 +43,7 @@ filename | actual filename to request ## Check whether file exists ```shell -curl -IL https://example.com/bur/x86_64/tuxedo-keyboard-3.0.10-1-x86_64.pkg.tar.zst +curl -L https://example.com/bur/x86_64/tuxedo-keyboard-3.0.10-1-x86_64.pkg.tar.zst ``` The above request can also be performed as a HEAD request. The behavior is the @@ -73,7 +73,7 @@ This endpoint requests authentication. ```shell curl \ -H 'X-Api-Key: secret' \ - -XPOST + -XPOST \ -T tuxedo-keyboard-3.0.10-1-x86_64.pkg.tar.zst \ https://example.com/some-repo/publish ``` diff --git a/docs/api/source/index.html.md b/docs/api/source/index.html.md index a46d47ea..74774982 100644 --- a/docs/api/source/index.html.md +++ b/docs/api/source/index.html.md @@ -11,7 +11,6 @@ includes: - repository - git - logs - - errors search: true diff --git a/docs/config.toml b/docs/config.toml index 7f7e1863..5b0f20f4 100644 --- a/docs/config.toml +++ b/docs/config.toml @@ -27,16 +27,22 @@ enableGitInfo = true weight = 1 [menu] -# [[menu.before]] +[[menu.after]] + name = "API Documentation" + url = "https://rustybever.be/docs/vieter/api" + weight = 10 +[[menu.after]] + name = "Man Pages" + url = "https://rustybever.be/man/vieter/vieter.1.html" + weight = 20 [[menu.after]] name = "Source" url = "https://git.rustybever.be/Chewing_Bever/docs" - weight = 10 - + weight = 30 [[menu.after]] name = "Hugo Theme" url = "https://github.com/alex-shpak/hugo-book" - weight = 20 + weight = 40 [params] # (Optional, default light) Sets color theme: light, dark or auto. diff --git a/docs/content/api-old.md b/docs/content/api-old.md deleted file mode 100644 index 0fbb694f..00000000 --- a/docs/content/api-old.md +++ /dev/null @@ -1,89 +0,0 @@ -# API Reference - -All routes that return JSON use the following shape: - -```json -{ - "message": "some message", - "data": {} -} -``` - -Here, data can be any JSON object, so it's not guaranteed to be a struct. - -### `GET ///` - -This route serves the contents of a specific architecture' repo. - -If `` is one of `.db`, `.files`, `.db.tar.gz` or -`.files.tar.gz`, it will serve the respective archive file from the -repository. - -If `` contains `.pkg`, it assumes the request to be for a package -archive & will serve that file from the specific arch-repo's package directory. - -Finally, if none of the above are true, Vieter assumes it to be request for a -package version's desc file & tries to serve this instead. This functionality -is very useful for the build system for checking whether a package needs to be -rebuilt or not. - -### `HEAD ///` - -Behaves the same as the above route, but instead of returning actual data, it -returns either 200 or 404, depending on whether the file exists. This route is -used by the build system to determine whether a package needs to be rebuilt. - -### `POST //publish` - -This route is used to upload packages to a repository. It requires the API -key to be provided using the `X-Api-Key` HTTP header. Vieter will parse the -package's contents & update the repository files accordingely. I find the -easiest way to use this route is using cURL: - -```sh -curl -XPOST -T "path-to-package.pkg.tar.zst" -H "X-API-KEY: your-api-key" https://example.com/somerepo/publish -``` - -Packages are automatically added to the correct arch-repo. If a package type is -`any`, the package is added to the configured `default_arch`, as well as all -already present arch-repos. To prevent unnecessary duplication of package -files, these packages are shared between arch-repos' package directories using -hard links. - -{{< hint info >}} -**Note** -Vieter only supports uploading archives compressed using either gzip, zstd or -xz at the moment. -{{< /hint >}} - -### `GET /health` - -This endpoint's only use is to be used with healthchecks. It returns a JSON -response with the message "Healthy.". - -## API - -All API routes require the API key to provided using the `X-Api-Key` header. -Otherwise, they'll return a status code 401. - -### `GET /api/repos` - -Returns the current list of Git repositories. - -### `GET /api/repos/` - -Get the information for the Git repo with the given ID. - -### `POST /api/repos?&&&` - -Adds a new Git repository with the provided URL, Git branch & comma-separated -list of architectures. - -### `DELETE /api/repos/` - -Deletes the Git repository with the provided ID. - -### `PATCH /api/repos/?&&&` - -Updates the provided parameters for the repo with the given ID. All arguments -are optional.