plugins

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package plugins lists the plugins tern add knows and tern.land shows: Tern's own, under plugins/, and the community's. To list a plugin of yours, add it to registry.json in a pull request.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	// Name is what tern add takes, such as "compress".
	Name        string `json:"name"`
	Description string `json:"description"`
	// Import is the plugin's package.
	Import string `json:"import"`
	// Module is the Go module to go get, when it isn't Tern's own.
	Module string `json:"module,omitempty"`
	// Add is the expression that makes the plugin, which tern add puts in
	// the app's kit.WithPlugins; "" when it needs configuration first.
	Add string `json:"add,omitempty"`
	// Imports are other packages Add uses, such as "os".
	Imports []string `json:"imports,omitempty"`
	// Env are the environment variables it reads.
	Env []string `json:"env,omitempty"`
	// Notes say what to do after adding it.
	Notes  string `json:"notes,omitempty"`
	Docs   string `json:"docs"`
	Author string `json:"author"`
	// URL is the plugin's home, for community plugins.
	URL string `json:"url,omitempty"`
}

Plugin is an entry of the registry.

func All

func All() []Plugin

All returns the registry, in its order.

func Find

func Find(name string) (Plugin, bool)

Find returns the plugin named name, or with the import path name.

func (Plugin) Official

func (p Plugin) Official() bool

Official reports whether the plugin is part of Tern.

Directories

Path Synopsis
Package compress gzips a Tern app's dynamic responses (pages, data, endpoint JSON) for clients that accept it:
Package compress gzips a Tern app's dynamic responses (pages, data, endpoint JSON) for clients that accept it:
Package cors lets other origins call a Tern app's endpoints:
Package cors lets other origins call a Tern app's endpoints:
Package health adds liveness and readiness endpoints to a Tern app:
Package health adds liveness and readiness endpoints to a Tern app:
Package images resizes remote images for <Image src="https://…">:
Package images resizes remote images for <Image src="https://…">:
Package metrics exposes Prometheus metrics for a Tern app, with no dependencies:
Package metrics exposes Prometheus metrics for a Tern app, with no dependencies:
Package oauth adds "Sign in with GitHub, Google or any OpenID Connect provider" to a Tern app:
Package oauth adds "Sign in with GitHub, Google or any OpenID Connect provider" to a Tern app:
Package oidc makes a Tern app an OAuth 2.0 authorization server and OpenID Connect provider: other apps (or your own frontends, mobile apps and services) sign users in with it, and your APIs accept its tokens.
Package oidc makes a Tern app an OAuth 2.0 authorization server and OpenID Connect provider: other apps (or your own frontends, mobile apps and services) sign users in with it, and your APIs accept its tokens.
Package ratelimit limits how often each client can call a Tern app:
Package ratelimit limits how often each client can call a Tern app:
Package requestlog logs every request a Tern app serves, with slog:
Package requestlog logs every request a Tern app serves, with slog:
Package secure sets security headers on every response of a Tern app:
Package secure sets security headers on every response of a Tern app:
Package sessions stores per-user data in an encrypted cookie:
Package sessions stores per-user data in an encrypted cookie:
Package signals tells people from bots and recognizes devices, from what the server sees of each request: its TLS ClientHello (JA4), its HTTP/2 settings and the order of its headers, how its headers fit the browser its User-Agent claims, and, optionally, a client check in the browser with a proof of work.
Package signals tells people from bots and recognizes devices, from what the server sees of each request: its TLS ClientHello (JA4), its HTTP/2 settings and the order of its headers, how its headers fit the browser its User-Agent claims, and, optionally, a client check in the browser with a proof of work.

Jump to

Keyboard shortcuts

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