v1api

package
v0.167.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 19 Imported by: 0 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 v1api serves version 1 of the HTTP API, mounted at /api/v1.

It is a composition rather than an implementation: apigraph provides the GraphQL endpoint that is the whole management API — logging in included — apisend the endpoint an application uses to send a templated message, and apimail the one that hands back a stored message as a file. Keeping them apart means each has only the dependencies it uses, and a version 2 can reuse the parts it does not intend to change.

There is one management API, not a GraphQL one with REST endpoints beside it for the awkward parts. Logging in was the awkward part: a browser holds a cookie rather than a bearer token, and a cookie is a response header. That is a reason to give a resolver the response writer, not a reason to keep a second protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(
	database db.Database,
	configuration config.Store,
	messages storage.Storage,
	locator geoip.Locator,
	verifier dns.Verifier,
	sender mailer.Mailer,
	upgrader upgrade.Manager,
	authenticator web.Authenticator,
	ceremonies ceremony.Store,
	settings *api.Settings,
) (web.Component, error)

New builds every component of version 1.

Types

This section is empty.

Directories

Path Synopsis
Package apigraph implements the GraphQL endpoint, which is the whole of the management API.
Package apigraph implements the GraphQL endpoint, which is the whole of the management API.
Package apimail serves a stored message in its original form.
Package apimail serves a stored message in its original form.
Package apimedia stores the pictures an operator puts in a template and serves them to the mail programs that later ask for them.
Package apimedia stores the pictures an operator puts in a template and serves them to the mail programs that later ask for them.
Package apioauth answers the questions a program asks before it has a credential: who authorizes this server, and where do I go to be let in.
Package apioauth answers the questions a program asks before it has a credential: who authorizes this server, and where do I go to be let in.
Package apipush serves the push relay: what a TeaNode server does when the operator holds the TeaNode app's Apple push key and turns agent.push.relay.enabled on.
Package apipush serves the push relay: what a TeaNode server does when the operator holds the TeaNode app's Apple push key and turns agent.push.relay.enabled on.
Package apisend implements the endpoint that sends a templated message.
Package apisend implements the endpoint that sends a templated message.
Package apisso is the two HTTP paths a single sign-on passes through: the one that sends the browser to the identity provider, and the one it comes back to.
Package apisso is the two HTTP paths a single sign-on passes through: the one that sends the browser to the identity provider, and the one it comes back to.

Jump to

Keyboard shortcuts

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