🐘
pREST
  • pRESTd
    • Who uses pREST
    • pRESTd Key Features
    • Contributing to pRESTd
    • pREST in the Media
    • Code of Conduct
    • Code of Ethics
  • Get pREST
    • Development Guide
    • Start with Docker
    • Start with Golang
    • Start with Homebrew
  • Get Started
    • Configuring pREST
    • CORS Support
    • Cache
    • Migrating
    • Permissions
  • API Reference
    • Custom Queries
    • Auth
    • Parameters
    • Advanced Queries
  • Deployment
    • Deploying with Docker
    • Deploy in Heroku
  • Plugins
    • Middleware Plugin
    • Endpoint Plugin
  • Integrations
    • Amazon Redshift
    • TimescaleDB
    • YugabyteDB
Powered by GitBook
On this page
  • Extension-supported modules
  • Process of building

Was this helpful?

Edit on GitHub

Plugins

PreviousDeploy in HerokuNextMiddleware Plugin

Was this helpful?

prestd is an extensible software via plugins (OpenCore model), we use standard operating system library for new functionality.

is a discussion of how we arrived at this architecture.

It is possible to create custom endpoints and middleware by writing an operating system library (.so) and prestd can load it when starting the server (api).

We use the to load the lib, unfortunately it doesn't work well with Microsoft Windows yet - if you are working with prestd on Windows the plugin endpoint will not exist.

When starting the prestd server and there is a plugin in the ./lib folder they are automatically compiled and loaded when accessing their respective endpoint for the first time.

Change where the libraries will be: PREST_PLUGINPATH is the name of the environment variable that has this purpose, by default it comes with the value ./lib.

or via toml:

pluginpath = ./lib

Extension-supported modules

  • Endpoint

  • Middleware

Process of building

In the first version of the prestd plugin system we are working with Go code.

This doesn't mean that prestd doesn't read plugins (library .so) written in other technologies (e.g. c, cpp, rust, java and ...). The automatic constructor is designed to work with Go code, in the future we will write for other technologies.

Here
plugin system of the Go language