api

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 24 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package api is the HTTP API: one folder per route, each running a process of core/services/process.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(db bun.IDB, origin string, mode domain.ServerMode) http.Handler

New gives the API, reachable by web pages from origin only (none when empty), with a valid token only, running in mode: the routes of the accounts exist in the multi mode only, 404 otherwise.

Types

This section is empty.

Directories

Path Synopsis
Package createapplications creates applications: POST /api/applications.
Package createapplications creates applications: POST /api/applications.
Package deleteapplications deletes applications: DELETE /api/applications.
Package deleteapplications deletes applications: DELETE /api/applications.
Package editapplications changes applications: PATCH /api/applications.
Package editapplications changes applications: PATCH /api/applications.
Package exportdata gives everything the account wrote as one JSON file: GET /api/export.
Package exportdata gives everything the account wrote as one JSON file: GET /api/export.
Package forgetapplications deletes applications from the trash for good: DELETE /api/applications/deleted.
Package forgetapplications deletes applications from the trash for good: DELETE /api/applications/deleted.
Package importdata restores an export: POST /api/import.
Package importdata restores an export: POST /api/import.
Package invites is the invitations to sign up, which an admin hands out in the invitation mode.
Package invites is the invitations to sign up, which an admin hands out in the invitation mode.
Package login is the session: log in, log out, and who is asking.
Package login is the session: log in, log out, and who is asking.
Package preferences reads and changes the preferences of the account: GET and PATCH /api/preferences.
Package preferences reads and changes the preferences of the account: GET and PATCH /api/preferences.
Package purgeapplications deletes every application, to start a new job search: DELETE /api/data.
Package purgeapplications deletes every application, to start a new job search: DELETE /api/data.
Package readapplications lists applications: GET /api/applications.
Package readapplications lists applications: GET /api/applications.
Package readcountries lists the countries an application can name: GET /api/countries.
Package readcountries lists the countries an application can name: GET /api/countries.
Package readdeletedapplications lists the trash: GET /api/applications/deleted.
Package readdeletedapplications lists the trash: GET /api/applications/deleted.
Package readsources lists the sources in use: GET /api/sources.
Package readsources lists the sources in use: GET /api/sources.
Package readstats counts the applications: GET /api/stats.
Package readstats counts the applications: GET /api/stats.
Package readstatuschanges gives the status history: GET /api/status-changes.
Package readstatuschanges gives the status history: GET /api/status-changes.
Package restoreapplications restores deleted applications: POST /api/applications/restore.
Package restoreapplications restores deleted applications: POST /api/applications/restore.
services
auth
Package auth lets through the requests with a valid token only, and tells the routes which one.
Package auth lets through the requests with a valid token only, and tells the routes which one.
guard
Package guard keeps the web pages of other sites away from the API: they could use the session cookie.
Package guard keeps the web pages of other sites away from the API: they could use the session cookie.
respond
Package respond is what every route shares: reading the request, writing JSON, turning process errors into statuses.
Package respond is what every route shares: reading the request, writing JSON, turning process errors into statuses.
throttle
Package throttle makes an address wait longer after each try in a row: wrong passwords at the login and on the OAuth consent page, accounts created from one address at the public sign-up.
Package throttle makes an address wait longer after each try in a row: wrong passwords at the login and on the OAuth consent page, accounts created from one address at the public sign-up.
Package tokens manages the API tokens and OAuth connections: refused to a token, a login only.
Package tokens manages the API tokens and OAuth connections: refused to a token, a login only.
Package users is the accounts of the multi mode: the sign-up, and the routes an admin runs the others with.
Package users is the accounts of the multi mode: the sign-up, and the routes an admin runs the others with.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL