libsql-rest

module
v0.0.0-...-d09092c Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT

README

libsql-rest

Expose libSQL (Turso) tables over http as a "RESTful" API. The concept is exactly the same as pRESTd or PostgREST.

This repo is very much still a work in progress and currently testing viability. Only a basic table endpoint exposing an equivelent SELECT * FROM {table} is implemented.

Planned features

Things planned in no specificic order:

  • Basic crud
    • list tables
    • fetch single record
    • fetch list of records
    • update record
    • create record
    • delete record
  • Authentication and some form of RLS similar to Postresql
    • JWT based auth
  • Basic filtering
    • pagination, limit results
    • ordering
  • Table allow list
  • Advanced filtering through WHERE clauses from query params

Hacking

Requirements:

  • Go 1.22
  • turso-cli

Create configuration at $HOME/.libsql-rest.yaml and populate with

server:
  port: 8081

db:
  token: "foo"
  uri: "http://127.0.0.1:8080"

Run turso dev -f libsql.db to create run local turso.

Directories

Path Synopsis
internal
cmd
db

Jump to

Keyboard shortcuts

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