api

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 20 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) http.Handler

New gives the API, reachable by web pages from origin only (none when empty), with a valid token only.

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 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 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 wrong password in a row, at the login and on the OAuth consent page.
Package throttle makes an address wait longer after each wrong password in a row, at the login and on the OAuth consent page.
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.

Jump to

Keyboard shortcuts

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