API Reference Gemini v0.2.0

Modules

Gemini is a lightweight application protocol. This server implements a lightweight server implementation using Elixir.

This protocol serializes data structures to the gemini protocol.

Represents a single connection. Spawned by :ranch.

This module keeps track of IP addresses for rate-limiting.

This module receives requests from Gemini.ClientConnection and forwards it to the appropriate server instance.

Behaviour module for complex meta types. Modules of this type can be used in place of string MIME types in Gemini.Response.

This module encodes text/plain texts. You can provide text/plain directly as a meta type in Gemini.Response, so this module is not really necessary.

This behaviour keeps track of IP addresses for rate-limiting.

A request as defined in the Gemini Protocol Specification. Stores the url of the request, an optional user certificate as {id, meta, cert} and optional user input.

A response as defined in the Gemini Protocol Specification. status is a two-digit tuple, meta is either a string (which will be copied into the response) or a tuple of Gemini.Meta module and arguments of that module. body is nil (no body), a binary (meta is a string), or any data that will be passed to the Gemini.Meta module. authenticated is set to false (no auth required), true (authenticated) or :required (user auth required).

Behaviour for router modules.

Base module for sites. Use it with use Gemini.Site. If the use call is made with the option :check_path then forward_request/2 will only be called if the URL path matches exactly. It is a good idea to enable that for "leaf" sites, i.e. sites that do not forward to other sites.

This module blocks requests without a user certificate.

This module prints information about the running elixir/erlang system as a text/gemini response. You probably only want this during development/testing.

This module returns file contents as a gemini response.

This module asks the user for input.

This module returns all information that the server stores about your request and associated user certificate.

Module for configuring :ranch in a Supervisor.

This module stores active sessions.