Slots

Magic creates the following dynamic slots during startup. Notice, most of these slots are there exclusively to make sure the middleware of Magic works correctly, and are not intended to be used directly by you in your own Hyperlambda code, unless explicitly stated otherwise, and/or you’re extending Magic, or replacing parts of its core with your own custom logic.

  • [magic.auth.authenticate] - Authenticates a user and returns a JWT token
  • [magic.auth.change-password] - Allows a user to reset his or her password
  • [magic.auth.create-user] - Creates a new user in Magic
  • [magic.auth.ensure-role] - Ensures the specified role exists, and if not, creates it
  • [magic.db.mysql.databases] - Returns all databases for a specified connection string
  • [magic.db.mysql.tables] - Returns all tables for the specified connection-string/database combination
  • [magic.db.mysql.columns] - Returns all columns for a specified connection-string/database/table combination
  • [magic.db.mysql.foreign_keys] - Returns all foreign keys for a specified connection-string/database/table combination
  • [magic.db.mysql.indexes] - Returns all indexes for the specified connection-string/database/table combination
  • [magic.db.mssql.*] - SQL Server versions of the five slots above
  • [magic.db.pgsql.*] - PostgreSQL versions of the five slots above
  • [magic.db.sqlite.*] - SQLite versions of the five slots above
  • [magic.io.file.load-recursively] - Loads all files from within some folder recursively
  • [magic.modules.ensure-database] - Ensures some database exists by executing its create database SQL file
  • [magic.modules.install-module] - Installs a module in your system
  • [transformers.hash-password] - Hashes a specified password in place

Slot reference

The reference documentation is organised by concept. Each page below documents every slot within its category; its arguments, example usage, and what the slot returns.