A web application environment.
About Radiance
Radiance is a web application environment, which is sort of like a web framework, but more general, more flexible. It should let you write personal websites and generally deployable applications easily and in such a way that they can be used on practically any setup without having to undergo special adaptations.
Getting It
Radiance and associated modules and applications are distributed via Quicklisp in a separate dist. To install Radiance, do:
(ql-dist:install-dist "http://dist.shirakumo.org/shirakumo.txt")
(ql:quickload :radiance)
From there on out you should be able to load and use any kind of Radiance module like Purplish directly via Quicklisp's quickload
.
A Lengthy and In-Depth Example
You can find a tutorial that introduces Radiance and most of the important concepts, and explores how to write a web application in general, here. It should give you a good feeling for how to go about things, and give you pointers about where to look if you need a particular feature. In the last part it'll also go into the actual setup and deployment of a Radiance installation on a production server.
A Simple Example
The most basic thing you most likely want to do is serve some kind of HTML. So let's work towards that and gradually extend it. Before we can begin, we need to start up Radiance.
(ql:quickload :radiance)
(radiance:startup)
If this is your first time setting up Radiance, you'll get a note about it using the r-welcome
module. It should also give you a link that you can open in your browser to see a little greeting page. For now we'll just want to put up our own little page alongside it.
(in-package :rad-user)
(define-page example "/example" ()
(setf (content-type *response*) "text/plain")
"Hi!")
Visiting localhost:8080/example should now just show "Hi". Rather boring indeed. So let's spit out some HTML instead. For now, we'll use cl-who since it is very simple. First quickload it, then run the following:
(define-page example "/example" ()
(cl-who:with-html-output-to-string (o)
(cl-who:htm
(:html
(:head (:title "Example Page"))
(:body (:header (:h1 "Couldn't Be Simpler."))
(:main (:p "Trust me on this one.")))))))
A recompile and refresh later and we have some font styling going on. Next we'll probably want to add a CSS file to it to style it properly. We could serve the CSS using another page as well, but that isn't the best way to go about things in the long term.
Let's instead look at how to create a module, which will allow us to organise things in a more orderly fashion. You can create the files for a module manually, but for now we'll settle with an automatically generated skeleton that Radiance can provide you with.
(create-module "example")
It should return you a path on which the module resides. It should contain an ASDF system, a main lisp file, and two folders, static
and template
. Surprisingly enough, the static
folder is where statically served files go, and template
is for template documents, if you happen to use a template system.
Let's open up the example.lisp
and carry over our example page from it.
(define-page example "/example" ()
(cl-who:with-html-output-to-string (o)
(cl-who:htm
(:html
(:head (:title "Example Page"))
(:body (:header (:h1 "Couldn't Be Simpler."))
(:main (:p "Trust me on this one.")))))))
Pages are identified by a name symbol. Since we now have our own module, and thus our own package, the example symbol above won't be the same as the one we've used before. We'll just have to remove the page in the rad-user
package to avoid the clash.
(remove-page 'rad-user::example)
Make sure to load the example file whenever you change it now for the changes to take effect.
Next let's create a simple CSS file to spruce things up a little. The file will be example.css
placed in the static
folder. Here's a sample CSS if you don't want to write your own.
body{
font-family: sans-serif;
font-size: 12pt;
background: #EEE;
}
header{
text-align: center;
}
main{
width: 800px;
margin: 0 auto 0 auto;
background: #FFF;
padding: 10px;
border: 1px solid #BBB;
border-radius: 5px;
}
Next we need to modify our HTML to actually link to the style sheet. In order to get the address to the stylesheet we'll have to make use of Radiance's routing system. Don't worry though, it's not much of a hassle.
(define-page example "/example" ()
(cl-who:with-html-output-to-string (o)
(cl-who:htm
(:html
(:head (:title "Example Page")
(:link :rel "stylesheet" :type "text/css"
:href (uri-to-url "/static/example/example.css" :representation :external)))
(:body (:header (:h1 "Couldn't Be Simpler."))
(:main (:p "Trust me on this one.")))))))
Refresh the page, and voilĂ , now it's got some pizzazz to it too. You'll probably want an explanation for the whole uri-to-url
business. Explaining it in full is handled by the sections following this one, but the gist of it is that it ensures that the link to the static file is properly resolved under any setup.
1. Radiance Concepts & Parts
1.1 URI
One of the most central concepts in Radiance is that of a URI. A URI is an object that consists of a list of domains, an optional port number, and a path (see uri
). It is essentially a stripped down version of a general URI, and as such doesn't include a schema, query, or fragment part. Another important difference is that the domains
URIs are used at several points throughout the framework, both to capture locations and to handle dispatch matching.
Note that URIs are mutable. This is important for performance, as URI modifications have to happen in several parts that lie on the critical path. However, in the usual case it is not expected that URIs are modified outside of a few select functions. Modifying a URI's parts in unexpected ways may lead to strange behaviour.
URIs have a unique string representation and can be serialised to string and parsed back into a full URI object again. URIs can also be dumped to FASL files as literals, so emitting them from macros is fine. The syntax for a URI is as follows:
URI ::= DOMAINS? (':' PORT)? '/' PATH?
DOMAINS ::= DOMAIN ('.' DOMAIN)*
DOMAIN ::= ('a'..'Z' | '0'..'9' | '-')
PORT ::= ('0'..'9'){1, 5}
PATH ::= .*
You can use uri-to-url
to turn a URI into a concrete URL. Reversal, encoding, and proper formatting of all the parts is handled for you automatically there.
See uri
, domains
, port
, path
, matcher
, uri-string
, make-uri
, make-url
, ensure-uri
, copy-uri
, parse-uri
, uri<
, uri>
, uri=
, uri-matches
, merge-uris
, represent-uri
, uri-to-url
.
1.2 Request and Response
In order to encapsulate the data that is sent to and from, we have the idea of a Request (request
) and Response (response
) object. The Request object holds the URI that represents to which location the request goes, and all the data contained in the HTTP payload like post, get, header, and cookie variables. The Response object holds the return-code, headers, cookies, and the actual body data.
During the processing of a request, these two objects must always be present and bound to the *request*
and *response*
variables. They encapsulate a lot of very vital information that is necessary to generate dynamic pages. Additionally, the Request contains an opaque data
table in which you can store arbitrary data. This is useful when you need to exchange pieces of information between individual parts of the system that may be reached during the request execution.
Requests don't necessarily have to come from the HTTP server. In order to test things you can also construct a request yourself and send it out programmatically. Whatever the case, the primary interface to dispatch a request is called request
. This will construct a Request and Response object for you and appropriately handle the URI. If you want to do that yourself and really just send out a complete Request object, you can use execute-request
.
For the actual handling of a request, see dispatchers, pages, and API endpoints.
See *request*
, *response*
, *default-external-format*
, *default-content-type*
, request
, uri
, http-method
, body-stream
, headers
, post-data
, get-data
, cookies
, user-agent
, referer
, domain
, remote
, data
, issue-time
, response
, data
, return-code
, content-type
, external-format
, headers
, cookies
, cookie
, name
, value
, domain
, path
, expires
, http-only
, secure
, cookie-header
, cookie
, get-var
, post-var
, post/get
, header
, file
, redirect
, serve-file
, request-run-time
, *debugger*
, handle-condition
, render-error-page
, execute-request
, set-data
, request
1.3 Route
Before a Request can be dispatched on, it goes through something called the routing system. Unlike in other frameworks, where 'routes' designate what handles a request, in Radiance a Route (route
) is a form of URI translator. This part of the system is what's responsible for creating and upholding two "universes", an internal and an external one.
The internal universe is the one actual web applications live in. The external universe is the one the HTTP server and a user of the website lives in. This distinction is necessary in order to allow you to, one one hand, write web applications without having to worry about what a potential setup on a server might look like at some point. You don't have to worry about what kind of domain, port, path setup may be necessary to run your application. On the other hand, it allows you, as a webadmin, to customise and run the system to your exact desires without fear of breaking things.
This all is facilitated by routes, of which there are two kinds: mapping, and reversal routes. Mapping routes are responsible for turning a URI from the external universe into one of the internal universe. Usually this involves cutting away the top-level domain and perhaps doing a mapping of subdomains. Reversal routes do the opposite-- they go from the internal universe to the external. This is necessary in order to make links in your served pages refer to resources that are actually accessible from the outside. Usually this involves reversing the subdomain mapping and adding the top-level domain again.
Routes can perform arbitrary work. At the most basic level, they are merely functions that modify a URI in some fashion. This allows you to create a very flexible system that should be powerful enough to accommodate to all of your needs as an administrator. As an application writer, you just need to make sure to use external-uri
or uri-to-url
on all of the links that you put into your pages.
See route
, name
, direction
, priority
, translator
, route
, remove-route
, list-routes
, define-route
, define-matching-route
, define-target-route
, define-string-route
, internal-uri
, external-uri
1.4 URI Dispatcher
Finally we come to the part that actually generates content for a request. URI dispatchers are a subclass of URI that also carry a name, a function, and a priority. The live in a priority-sorted list, which is processed whenever a request arrives. The Request's URI is matched against each dispatcher. The function of the first dispatcher that matches is then executed.
And that's it. The dispatcher's function is responsible for setting the necessary values in the Response object to deliver the page content. In order to do this it can either directly set the data
field of the Response object, or you can return an appropriate value from the function. Radiance only accepts four types of values: stream
, pathname
, string
, and (array (unsigned-byte 8))
.
If a URI dispatcher does not have an explicit priority number, its priority over others is determined by the specificity of the URI. See the URI sorting function uri>
for an explanation on how exactly this is calculated.
See uri-dispatcher
, name
, dispatch-function
, priority
, uri-dispatcher
, remove-uri-dispatcher
, list-uri-dispatchers
, uri-dispatcher>
, define-uri-dispatcher
, dispatch
1.5 Page
Pages are what you will likely use to define your actual content serving functions. However, a page is just a uri-dispatcher with some extra functionality in the definition macro that makes things easier on you. Most notably are the extensible options, for which you can find an explanation below.
There are a couple of default pages set up by Radiance itself. First there's the favicon
and robots
pages, which simply serve the respective files from Radiance's static/
directory. You'll probably want to either provide your own pages for that or update the files on your production server.
Then there's the static
page, which is responsible for serving static contents for all web applications and modules. It should be active on any domain and always on the path /static/...
where ...
must have a form where the first directory is the name of a module, and the rest is a path within that module's static/
directory. This allows you to always be able to refer to static files like CSS, JS, and images through a common path.
Finally there's the api
page, which is responsible for handling the dispatch of API endpoints, which are explained in the following section. The page acts similarly to the static one by capturing the /api/...
path on all domains.
See page
, remove-page
, define-page
1.6 API Endpoint
Radiance provides integrated support for REST API definition. This is not just a tacked-on feature, but rather because most modern applications want to provide an API of some kind, and because Radiance advises a certain way of writing your applications that necessarily involves API endpoints.
Conceptually, API endpoints are functions that are callable through a browser request. Their response is then serialised to a format that is readable by the requester, whatever that may be. Important to remember however is that API endpoints should be usable by both users and programs. Radiance encourages this because usually any kind of action that can be performed programmatically through an API will also have to be performed by the user in some way. In order to avoid duplication, the two can be conflated.
As such, usually any kind of data modification action should be provided through an API endpoint that reacts slightly differently depending on whether a user or an application requests it. In the case of a user, it should usually redirect back to an appropriate page, and in the case of an application it should provide a data payload in a readable format.
The first part of all of this is the API format system, which is responsible for serialising data to some specified format. By default only an S-expression based format is supplied, but a contrib to get JSON output can easily be loaded.
The second part is the specification of the browser
POST/GET parameter. If that parameter contains the exact string "true"
, then the API request is treated as coming from a user, and thus a redirect rather than a data payload should be outputted.
Your application should make use of those things in order to provide a properly integrated api. Now, an actual endpoint definition is composed of a name, a raw function, a lambda-list describing the arguments of the function, and a request parsing function. Typically for your arguments, only required and optional arguments make sense. After all, an HTTP request only has "keyword arguments" that it can provide, and those can either be present or missing.
The name of an API endpoint also serves as the identifier that tells you where you can reach it. API endpoints live on the /api/
path, followed by the name of the endpoint. As such, you are responsible for prefixing your endpoints with the name of your module or application in order to avoid accidentally tripping over other endpoints. This is unlike in uri dispatchers, because API endpoints have to match exactly and don't allow any ambiguity or processing of the path. Thus every endpoint must have a unique path, which can also immediately serve as the name.
The raw function is the function that the API provides an interface for. It is responsible for performing the requested action and returning the appropriate data as described above. For returning formatted API data, see api-output
. For redirecting in the case of a browser request, see redirect
.
Finally, the request parsing function is responsible for taking a Request object, extracting the arguments the function needs from it, and finally calling that function with the appropriate arguments-- if possible. The parsing function may signal an api-argument-missing
error if a required argument is missing. Superfluous arguments should be ignored.
You can also programmatically call an API endpoint using call-api
, or simulate a Request call with call-api-request
, without having to go through the whole URI dispatch mechanism.
Similarly to pages, API endpoint definitions also accept extensible options that make definition simpler. See the following section for an explanation of options.
See api
, *default-api-format*
, *serialize-fallback*
, api-format
, remove-api-format
, list-api-formats
, define-api-format
, api-output
, api-serialize
, api-endpoint
, remove-api-endpoint
, list-api-endpoints
, api-endpoint
, name
, handler
, argslist
, request-handler
, call-api-request
, call-api
, define-api
1.7 Options
Options are a way of providing an extensible definition macro. This is useful when a framework provides a common way of defining something, but other parts may want to provide extensions to that in order to make common operations shorter. For example, a common task is to restrict a page or API endpoint to people who have the required access credentials.
In order to facilitate this, Radiance provides a rather generic options mechanism. Options are divided up by an option type that designates to which definition macro the option belongs. Radiance provides the api
and page
option types out of the box.
Each option has a keyword for a name and an expander function that must accept a number of arguments, depending on the option type. Always provided as arguments are the name of the thing being defined, the list of body forms of the definition, and a final, optional, value that was provided to the option in the options list, if it was mentioned at all. This expansion function is then responsible for transforming the body forms of the definition macro in some way. It can also emit a second form that is placed outside of the definition itself, in order to allow setting up the environment in some manner.
See option
, option-type
, name
, expander
, option
, remove-option
, list-options
, define-option
, expand-options
1.8 Module
The concept of a module is essential to Radiance. It serves as the representation of a "part" of the whole. On a technical level, a module is a package that has special metadata attached to it. It is provided by the modularize
system and is used to facilitate hooks and triggers, interfaces, and the tracking of a few other pieces of information.
What this means for you is that instead of a standard defpackage
you should use a define-module
form to define your primary package. The syntax is the same as defpackage
, but includes some extra options like :domain
, which allows you to specify the primary domain on which this module should operate (if any).
The module system also allows the tying of an ASDF system to a module. If that is done, then the ASDF system becomes a "virtual module". In order to do this, you must add three options to your system definition:
:defsystem-depends-on (:radiance)
:class "radiance:virtual-module"
:module-name "MY-MODULE"
This allows Radiance to identify and associate ASDF system information to your module. For automated creation of the necessary system and module definitions for a new module, see create-module
.
See virtual-module
, virtual-module-name
, define-module
, define-module-extension
, delete-module
, module
, module-p
, module-storage
, module-storage-remove
, module-identifier
, module-name
, current-module
, module-domain
, module-permissions
, module-dependencies
, module-required-interfaces
, module-required-systems
, module-pages
, module-api-endpoints
, describe-module
, find-modules-directory
, *modules-directory*
, create-module
1.9 Hooks
One of the mechanisms that Radiance provides to allow integrating modules into each other is hooks. Hooks allow you to run an arbitrary function in response to some kind of event. For example, a forum software might set up a hook that is triggered whenever a new post is created. An extension could then define a trigger on that hook that performs additional tasks.
A hook can have an arbitrary number of triggers defined on it, but you should ensure that a trigger does not take too long, as triggering a hook is a blocking operation that won't finish until all of the triggers have completed. As such, a long-running trigger operation might delay a request response for too long.
Sometimes hooks should function more like switches, where they can be "on" for a long time, until they're turned "off" again later. If new triggers are defined during that time, they should be called automatically. This is what the define-hook-switch
facilitates. It produces two hooks. Once the first one has been triggered, any trigger that is defined on it later is called automatically until the second hook is triggered. This allows triggers on hooks like server-start
to function properly even if the trigger is only defined after the server has already been started.
See list-hooks
, define-hook
, remove-hook
, define-trigger
, remove-trigger
, trigger
, define-hook-switch
1.10 Interface
In order to avoid becoming monolithic, and in order to allow extensible backends, Radiance includes an interface system. In the most general sense, an interface provides a promise as to how some functions, macros, variables, etc. should work, but does not actually implement them. The actual functionality that makes everything that the interface outlines work is pushed off to an implementation. This allows users to code against an interface and make use of its provided functionality, without tying themselves to any particular backend.
For a concrete example, let's say there's an interface for a database. This is sensible, since there are many different kinds of databases, that all offer many differing ways of interaction, but still all also offer some very common operations: storing data, retrieving data, and modifying the data. Thus we create an interface that offers these common operations. It is then up to an implementation for a specific kind of database to make the actual operations work. As an application writer, you can then make use of the database interface, and with it, make your application automatically work with lots of different databases.
Aside from giving application writers an advantage, the decoupling that the interfaces provide also mean that a system administrator can write their own implementation with relative ease, should their particular requirements not be met by existing implementations. Thanks to the opaqueness of the interfaces, an implementation can both provide a bridge to something that runs in the lisp process, and something that is completely external. This leaves a lot of choice open for the administrator of a production system to allow them to pick exactly what they need.
In practise, interfaces are special kinds of modules, and thus special kinds of packages. As part of their definition, they include a series of definitions for other bindings like functions, variables, etc. Since it is a package, as a user you can use the interface's components just like you would use anything else in any other package. There is no difference. As an implementation writer, you then simply redefine all the definitions that the interface outlines.
In order to actually load a module that makes use of an interface, an implementation for the interface has to be loaded beforehand. Otherwise, macros could not work properly. Thus, in order to allow depending on interfaces in your ASDF system definition without having to refer to a specific implementation, Radiance provides an ASDF extension. This extension makes it possible to add a list like (:interface :foo)
to your :depends-on
list. Radiance will then resolve the interface to a concrete implementation thereof when the module is loaded.
Radiance provides a bunch of standard interfaces. Each of those interfaces has at least one standard implementation provided by radiance-contribs. The interfaces are:
admin
Provides an extensible administration site.auth
Handles everything about authentication and login.ban
Allows banning users from the site by their IP address.cache
Provides a very simple caching interface.database
A flexible database interface that allows both object-stores and relational databases as backends.logger
A simple logging interface to allow printing debug and information messages.mail
Minimal interface to send emails with.profile
Provides an extensible user profile site and user fields.rate
Allows rate limitation for access to certain resources.server
The interface that bridges to a server to connect Radiance with an external universe.session
Ensures persistent sessions for users to allow tracking them.user
Provides user accounts and permissions.
The interfaces are described in-depth below.
See interface
, interface-p
, implementation
, implements
, reset-interface
, define-interface-extension
, find-implementation
, load-implementation
, define-interface
, define-implement-trigger
1.11 Environment
In order to permit running multiple instances of Radiance with different setups on the same machine, Radiance provides what it calls an Environment system. The Environment is basically the set of configuration and runtime files for Radiance itself and all of the loaded modules. The Radiance configuration also includes the mapping of interface to chosen implementation and thus decides what should be picked if an interface is requested.
The particular environment that is used is chosen at the latest when startup
is called, and the earliest when a module is loaded. In the latter case, interactive restarts are provided to allow you to pick an environment. This is necessary, as otherwise Radiance won't be able to resolve the interface mapping.
As part of the environment system, Radiance provides you with a configuration system that you can --and probably should-- use for your application. It ensures that the settings are properly multiplexed for each environment, and that the settings are always persistent. It also uses a human-readable storage format, such that the files can be read and modified without requiring any special tools.
See ubiquitous for the actual handling and use-instructions of the configuration storage. Just note that instead of the value
functions, Radiance provides config
functions.
Aside from configuration files, the environment also provides consistent storage locations for runtime data files, such as user uploads, cache files, and so forth. You can retrieve this location by using environment-module-directory
and environment-module-pathname
. When storing uploads and caches, a module should make use of these paths to present a consistent interface to the administrator.
On a deployed system it might be desired to change the location of the environment storage paths, in which case the administrator is encouraged to supply new methods on environment-directory
and environment-module-directory
to customise the behaviour as desired. See also the associated documentation strings for further details and default actions.
The environment also allows administrator overrides. Using the :static
and :template
types for environment-module-directory
gives you the path to store files that should override a module's standard template and static files. The paths within the respective directories have to match with those of the module's own source files. Note that the static and template files a module actually makes use of are cached at module load-time, and thus will not change unless the Lisp image is restarted, or the module's source files are reloaded.
See environment-change
, environment
, environment-directory
, environment-module-directory
, environment-module-pathname
, check-environment
, mconfig-pathname
, mconfig-storage
, mconfig
, defaulted-mconfig
, config
, defaulted-config
, template-file
, @template
, static-file
, @static
1.12 Migration System
Sometimes systems evolve in backwards incompatible ways. In that case, for existing setups to continue functioning with the new version, runtime data migration is necessary. Radiance offers a system to automate this process and allow a smooth upgrade.
The migration between versions should occur automatically during Radiance's startup sequence. As an administrator or author you should not need to perform any additional steps for migrations to occur. However, as a module author, you will naturally have to provide the code to perform the necessary data migration steps for your module.
In order for a module to be migratable, it needs to be loaded by an ASDF system that has a version specification. The version should follow the standard dotted number scheme, with an optional version hash that can be added at the end. You may then define migration steps between individual versions by using define-version-migration
. Once defined, Radiance will automatically pick up on concrete versions and perform the necessary migrations in sequence to reach the current target version. For more information on the precise procedure and what you can do, see migrate
and migrate-versions
.
See last-known-system-version
, migrate-versions
, define-version-migration
, ready-dependency-for-migration
, ensure-dependencies-ready
, versions
, migrate
1.13 Instance Management
Finally, Radiance provides a standard startup and shutdown sequence that should ensure things are properly setup and readied, and afterwards cleaned up nicely again. A large part of that sequence is just ensuring that certain hooks are called in the proper order and at the appropriate times.
While you can start a server manually by using the appropriate interface function, you should not expect applications to run properly if you do it that way. Many of them will expect certain hooks to be called in order to work properly. This is why you should always, unless you exactly know what you're doing, use startup
and shutdown
to manage a Radiance instance. The documentation of the two functions should explain exactly which hooks are triggered and in which order. An implementation may provide additional, unspecified definitions on symbols in the interface package, as long as said symbols are not exported.
See *startup-time*
, uptime
, server-start
, server-ready
, server-stop
, server-shutdown
, startup
, startup-done
, shutdown
, shutdown-done
, started-p
2. Standard Interfaces
These interfaces are distributed with Radiance and are part of the core package. Libraries may provide for additional interfaces, however. For implementations of standard interfaces, the following relaxations of interface definition constraints are allowed:
The lambda-lists that contain &key
arguments can be extended by further, implementation-dependant keyword arguments. Lambda-lists that contain &optional
but no &key
or &rest
may be extended by further optional arguments. Lambda-lists that contain only required arguments may be extended by further optional or keyword arguments.
2.1 admin
This interface provides for an administration page. It should be used for any kind of user-configurable settings, or system information display. Note that despite being called "administration", this is not intended solely for administrators of the system. The page should be usable for any user.
The administration page is required to be able to display a categorised menu, and a panel. The panels are provided by other modules and can be added through admin:define-panel
. Panels that give access to sensitive operations should be appropriately restricted through the :access
option and a non-default permission. See the user interface for an explanation on the permissions.
In order to link to the administration page, or a specific panel on it, use the page
resource type.
See admin:list-panels
, admin:remove-panel
, admin:define-panel
, admin:panel
2.2 auth
The authentication interface is responsible for tying a user to a request. For this reason it must provide some manner by which a user can authenticate themselves against the system. How this is done exactly is up to the implementation. The implementation must however provide a page on which the authentication process is initiated. You can get a URI to it through the page
resource and passing "login"
as argument.
You can test for the user currently tied to the request by auth:current
. This may also return NIL
, in which case the user should be interpreted as being "anonymous"
. See the user interface for more information.
See auth:*login-timeout*
, auth:page
, auth:current
, auth:associate
2.3 ban
This interface provides for IP-banning. It must prevent any client connecting through a banned IP from seeing the content of the actual page they're requesting. Bans can be lifted manually or automatically after a timeout. The implementation may or may not exert additional effort to track users across IPs.
See ban:jail
, ban:list
, ban:jail-time
, ban:release
2.4 cache
The cache interface provides for a generic caching mechanism with a customisable invalidation test. You can explicitly renew the cache by cache:renew
. To define a cached block, simply use cache:with-cache
, which will cause the cached value of the body to be returned if the test form evaluates to true.
The exact manner by which the cached value is stored is up to the implementation and cache:get
or cache:with-cache
may coerce the cached value to a string or byte array. The implementation may support any number of types of values to cache, but must in the very least support strings and byte arrays.
The name for a cached value must be a symbol whose name and package name do not contain any of the following characters: <>:"/\|?*.
The variant for a cached value must be an object that can be discriminated by its printed (as by princ
) representation. The same character constraints as for the name apply.
See cache:get
, cache:renew
, cache:with-cache
2.5 database
This interface provides you with a data persistence layer, usually called a database. This does not have to be a relational database, but may be one. In order to preserve implementation variance, only basic database operations are supported (no joins, triggers, etc). Data types are also restricted to integers, floats, and strings. Despite these constraints, the database interface is sufficiently useful for most applications.
Note that particular terminology is used to distance from traditional RDBMS terms: a schema is called a "structure". A table is called a "collection". A row is called a "record".
Performing database operations before the database is connected results in undefined behaviour. Thus, you should put your collection creation forms (db:create
) within a trigger on db:connected
. Radiance ensures that the database is connected while Radiance is running, so using the database interface in any page, api, or uri dispatcher definitions is completely fine.
The functions for actually performing data storage are, intuitively enough, called db:insert
, db:remove
, db:update
, db:select
, and db:iterate
. The behaviour thereof should be pretty much what you'd expect. See the respective docstrings for a close inspection. Also see the docstring of db:create
for a lengthy explanation on how to create a collection and what kind of restrictions are imposed.
The database must ensure that once a data manipulation operation has completed, the changes caused by it will be persisted across a restart of Radiance, the lisp image, or the machine, even in the case of an unforeseen crash.
See database:condition
, database:connection-failed
, database:connection-already-open
, database:collection-condition
, database:invalid-collection
, database:collection-already-exists
, database:invalid-field
, database:id
, database:ensure-id
, database:connect
, database:disconnect
, database:connected-p
, database:collections
, database:collection-exists-p
, database:create
, database:structure
, database:empty
, database:drop
, database:iterate
, database:select
, database:count
, database:insert
, database:remove
, database:update
, database:with-transaction
, database:query
, database:connected
, database:disconnected
2.6 logger
This interface provides primitive logging functions so that you can log messages about relevant happenings in the system. The actual configuration of what gets logged where and how is up to the implementation and the administrator of the system.
See logger:log
, logger:trace
, logger:debug
, logger:info
, logger:warn
, logger:error
, logger:severe
, logger:fatal
2.7 Mail
With the mail interface you get a very minimal facility to send emails. A variety of components might need email access, in order to reach users outside of the website itself. The configuration of the way the emails are sent --remote server, local sendmail, etc.-- is implementation dependant.
The mail:send
hook provided by the interface allows you to react to outgoing emails before they are sent.
See mail:send
2.8 profile
The profile interface provides extensions to the user interface that are commonly used in applications that want users to have some kind of presence. As part of this, the interface must provide for a page on which a user's "profile" can be displayed. The profile must show panels of some kind. The panels are provided by other modules and can be added by profile:define-panel
.
You can get a URI pointing to the profile page of a user through the page
resource type.
The interface also provides access to an "avatar image" to visually identify the user (profile:avatar
), a customisable name that the user can change (profile:name
), and field types to what kind of data is contained in a user's field and whether it should be public information or not (profile:fields
profile:add-field
profile:remove-field
).
See profile:page
, profile:avatar
, profile:name
, profile:fields
, profile:add-field
, profile:remove-field
, profile:list-panels
, profile:remove-panel
, profile:define-panel
, profile:panel
2.9 rate
This interface provides for a rate limitation mechanism to prevent spamming or overly eager access to potentially sensitive or costly resources. This happens in two steps. First, the behaviour of the rate limitation is defined for a particular resource by rate:define-limit
. Then the resource is protected through the rate:with-limitation
macro. If the access to the block by a certain user is too frequent, the block is not called, and the code in the limit definition is evaluated instead.
Note that rate limitation is per-client, -user, or -session depending on the implementation, but certainly not global.
See rate:define-limit
, rate:left
, rate:with-limitation
2.10 server
This and the logger interface are the only interfaces Radiance requires an implementation for in order to start. It is responsible for accepting and replying to HTTP requests in some manner. The implementation must accept requests and relay them to the Radiance request
function, and then relay the returned response
back to the requester.
Note that the actual arguments that specify the listener behaviour are implementation-dependant, as is configuration thereof. However, if applicable, the implementation must provide for a standard listener that is accessible on localhost
on the port configured in (mconfig :radiance :port)
and is started when radiance:startup
is called.
See server:start
, server:stop
, server:listeners
, server:started
, server:stopped
2.11 session
The session interface provides for tracking a client over the course of multiple requests. It however cannot guarantee to track clients perfectly, as they may do several things in order to cloak or mask themselves or falsify information. Still, for most users, the session tracking should work fine enough.
The session interface is usually used by other interfaces or lower-lying libraries in order to provide persistence of information such as user authentication.
See session:*default-timeout*
, session:session
, session:=
, session:start
, session:get
, session:list
, session:id
, session:field
, session:timeout
, session:end
, session:active-p
, session:create
2.12 user
This interface provides for persistent user objects and a permissions system. It does not take care of authentication, identification, tracking, or anything of the sort. It merely provides a user object upon which to build and with which permissions can be managed.
See user:user
for a description of permissions and their behaviour.
See user:condition
, user:not-found
, user:user
, user:=
, user:list
, user:get
, user:id
, user:username
, user:fields
, user:field
, user:remove-field
, user:remove
, user:check
, user:grant
, user:revoke
, user:add-default-permissions
, user:create
, user:remove
, user:action
, user:ready
, user:unready
2.13 relational-database
This is an extension of the database interface. Any module implementing this interface must also implement the database interface. This interface provides some extensions to allow more expressive database operations that are only directly supported by relational database systems.
See relational-database:join
, relational-database:sql
Version Changes
1.0 -> 2.0
- The variable
*environment-root*
has been removed as per issue #28 and fix #29. It has instead been replaced by a more generic mechanism for environment directories, incorporated by the functionenvironment-directory
. If you previously customised*environment-root*
, please now changeenvironment-directory
instead, as described in §1.11. - A new facility to automate migration for changes between module versions has been added as per issue #30 and fix #31. This facility is already being used in existing modules and Radiance itself to account for the new environment directories and automatically move previously existing data to the correct, new locations. Please see §1.12 for an explanation of the facility.
- It is now possible for an administrator to override templates and static files of a module without changing the module's source as per issue #26. Please see §1.11 for the relevant environment documentation, as well as functions
template-file
andstatic-file
. - The user interface is now required to support an integer
user:id
identifier for each user object, allowing you to reference users in databases and records more efficiently. - The database interface is now required to support the keyword
:unique
ondb:select
anddb:iterate
.
Also See
- modularize For the primary package metadata system
- modularize-interfaces For the interface and implementations extensions
- modularize-hooks For the hooks and triggers mechanisms
- ubiquitous For configuration management
- radiance-contribs Default interface implementations and other convenience modules for Radiance
- radiance-bootstrap A script to automate Radiance deployments on production systems
Support
If you'd like to support the continued development of Radiance, please consider becoming a backer on Patreon:
System Information
Definition Index
-
RADIANCE-CORE
- ORG.SHIRAKUMO.RADIANCE.CORE
- RADIANCE
- MODULARIZE.MOD.RADIANCE-CORE
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *DEBUGGER*
Whether the debugger should be invoked when an error occurs during a request execution. Can be one of the following values: :IF-SWANK-CONNECTED -- Only invoke the debugger if there is an active swank connection. T -- Always invoke the debugger. NIL -- Never invoke the debugger. See MAYBE-INVOKE-DEBUGGER See HANDLE-CONDITION See EXECUTE-REQUEST
-
EXTERNAL SPECIAL-VARIABLE *DEFAULT-API-FORMAT*
The API format to use if no specific one is requested. See *API-FORMATS*
-
EXTERNAL SPECIAL-VARIABLE *DEFAULT-CONTENT-TYPE*
The default content-type to use to send out the data. See RESPONSE
-
EXTERNAL SPECIAL-VARIABLE *DEFAULT-EXTERNAL-FORMAT*
The default external character encoding to use to send out the data. See RESPONSE
-
EXTERNAL SPECIAL-VARIABLE *MODULES-DIRECTORY*
Defines the path where modules should be created.
-
EXTERNAL SPECIAL-VARIABLE *RANDOM-STRING-CHARACTERS*
A string that contains all the characters that can form a random-string. See MAKE-RANDOM-STRING
-
EXTERNAL SPECIAL-VARIABLE *REQUEST*
Bound to the current request object in the context of a request. See EXECUTE-REQUEST See REQUEST
-
EXTERNAL SPECIAL-VARIABLE *RESPONSE*
Bound to the current response object in the context of a request. See EXECUTE-REQUEST See RESPONSE
-
EXTERNAL SPECIAL-VARIABLE *STARTUP-TIME*
-
EXTERNAL ROUTE DOMAIN
Ensures that top-level domains are stripped from the uri. Depends on *DOMAIN-INTERNALIZERS*
-
EXTERNAL ROUTE DOMAIN
Ensures that the appropriate top-level domain is added to the uri.
-
EXTERNAL ROUTE VIRTUAL-MODULE
Allows using a path of /!/module/path to simulate a call to a subdomain. This translates the path by prepending the module to the subdomains of the uri and resetting the path to the sub-path. The module is also stored in the request's data field called VIRTUAL-MODULE.
-
EXTERNAL ROUTE VIRTUAL-MODULE
Properly reverses the uri if the current request context was made under a virtual-module. Uses the request's data field called VIRTUAL-MODULE to know where we came from.
-
EXTERNAL OPTION HOOK
Adds a hook that is automatically triggered when the page is called. Unless otherwise specified, the hook is named the same as the page.
-
EXTERNAL RESOURCE-TYPE API
Returns an internal URI that is a representation of the path on which the given API endpoint can be called. It expects one or more arguments, where the first is the endpoint's name and the rest are key-value pairs of the arguments for the call.
-
EXTERNAL RESOURCE-TYPE DOMAIN
Returns an internal URI that is a representation of the domain on which the module operates.
-
EXTERNAL RESOURCE-TYPE PAGE
Returns an internal URI that points to the requested page. The following values are returned: 1. URI 2. QUERY-ALIST 3. FRAGMENT The QUERY-ALIST and FRAGMENT can be used as arguments to URI-TO-URL. By default a page with the name corresponding to the symbol of the given name in the module's package is used if available. However, a module or interface may special-case certain page names to provide a specified name to point to a page of particular interest.
-
EXTERNAL RESOURCE-TYPE STATIC
Returns an internal URI that is a representation of the requested static resource. Requires a single argument, namely the name of the resource.
-
EXTERNAL CLASS API-ENDPOINT
Container for an api endpoint. See NAME See HANDLER See ARGSLIST See REQUEST-HANDLER
-
EXTERNAL CLASS COOKIE
-
EXTERNAL CLASS DOCUMENTABLE
Superclass for all classes that can be documented. Use DOCUMENTATION to access the docstring. See CL:DOCUMENTATION See DEFINE-DOCUMENTABLE
-
EXTERNAL CLASS HOOK
No documentation provided. -
EXTERNAL CLASS MODULE
ASDF system subclass for modules. See MODULARIZE:MODULE
-
EXTERNAL CLASS OPTION
Container class for an option expander. See OPTION-TYPE See NAME See EXPANDER See OPTION
-
EXTERNAL CLASS REQUEST
Container class to represent a request that was made against radiance. See URI See HTTP-METHOD See BODY-STREAM See HEADERS See POST-DATA See GET-DATA See COOKIES See DOMAIN See REMOTE See DATA See ISSUE-TIME See REQUEST See USER-AGENT See REFERER See COOKIE See GET-VAR See POST-VAR See POST/GET See HEADER See FILE See REQUEST-RUN-TIME
-
EXTERNAL CLASS RESOURCE-TYPE
Container class for a resource type. See NAME See LOCATORS See RESOURCE-TYPE See DEFINE-RESOURCE-TYPE
-
EXTERNAL CLASS RESPONSE
Container class to represent a response that should be sent out for a request. See DATA See RETURN-CODE See CONTENT-TYPE See EXTERNAL-FORMAT See HEADERS See COOKIES See COOKIE See HEADER See REDIRECT See SERVE-FILE
-
EXTERNAL CLASS ROUTE
Container class for a URI translation route. See NAME See DIRECTION See PRIORITY See TRANSLATOR See ROUTE See REMOVE-ROUTE See LIST-ROUTES See DEFINE-ROUTE
-
EXTERNAL CLASS URI
Class to represent a URI in the system. URIs are used to access and define resources that should be accessible both internally and externally. If MATCHER is T, then the matcher is automatically set to the scanner created from the path or an empty string should the path be NIL. See DOMAINS See PORT See PATH See MATCHER See MAKE-URI See COPY-URI See URI< See URI> See URI= See URI-MATCHES See MERGE-URIS See REPRESENT-URI See URI-TO-URL
-
EXTERNAL CLASS URI-DISPATCHER
Container object for a link between a uri and a page function. A uri-dispatcher should be called from a request and is then responsible for generating the content of the response. See NAME See DISPATCH-FUNCTION See PRIORITY See DISPATCH See URI-DISPATCHER
-
EXTERNAL CLASS VIRTUAL-MODULE
No documentation provided. -
EXTERNAL CONDITION API-ARGUMENT-INVALID
Error signalled when an argument was not of a permitted value. Contains an ARGUMENT slot that holds the name of the invalid argument. See API-ERROR
-
EXTERNAL CONDITION API-ARGUMENT-MISSING
Error signalled when a required argument for the api endpoint was not supplied. Contains an ARGUMENT slot that holds the name of the missing argument. See API-ERROR
-
EXTERNAL CONDITION API-AUTH-ERROR
Error signalled when a request to an api endpoint was unauthorised. See API-ERROR
-
EXTERNAL CONDITION API-CALL-NOT-FOUND
Error signalled when an api endpoint was requested that does not exist. See API-ERROR
-
EXTERNAL CONDITION API-ERROR
Base condition class for api related errors. See REQUEST-ERROR
-
EXTERNAL CONDITION API-UNKNOWN-FORMAT
Error signalled when an api format was required that is unknown. Contains a FORMAT slot that holds the name of the requested but missing api format. See API-FORMAT See API-ERROR
-
EXTERNAL CONDITION API-UNSERIALIZABLE-OBJECT
Error signalled when an object was attempted to be serialized that cannot be. Contains an OBJECT slot that holds the object that could not be serialized. See API-ERROR
-
EXTERNAL CONDITION BACKWARDS-MIGRATION-NOT-ALLOWED
Error signalled when a migration from a later version to an earlier version is attempted. See MIGRATE See RADIANCE-ERROR
-
EXTERNAL CONDITION DEFINITION-FOR-SHARED-PACKAGE
Warning signalled when a definition is made on a symbol that may lead to unintentional clashes. This warning gives you an indication for when you might be accidentally exposing your definition to overrides by other systems. See RADIANCE-WARNING
-
EXTERNAL CONDITION ENVIRONMENT-NOT-SET
Error signalled when an action was performed that requires an initialised environment, but no environment has been configured yet. See ENVIRONMENT See RADIANCE-ERROR
-
EXTERNAL CONDITION FILE-TO-SERVE-DOES-NOT-EXIST
Error signalled when a file is attempted to be served that does not exist on the filesystem. Contains a FILE slot that holds the pathname of the requested file. See REQUEST-ERROR
-
EXTERNAL CONDITION INTERFACE-IMPLEMENTATION-NOT-SET
Error signalled when an implementation for an interface was attempted to be loaded, but no corresponding implementation is configured. See INTERFACE-CONDITION See RADIANCE-ERROR
-
EXTERNAL CONDITION INTERNAL-ERROR
Base condition class for internal errors that are unrecoverable. See RADIANCE-ERROR
-
EXTERNAL CONDITION NO-SUCH-POST-PARAMETER
Error signalled when a post parameter was requested that does not exist. Contains a PARAMETER slot that holds the name of the requested slot. See REQUEST-ERROR
-
EXTERNAL CONDITION POST-PARAMETER-NOT-A-FILE
Error signalled when a post parameter was attempted to be interpreted as a file, while it is not actually one. Contains a PARAMETER slot that holds the name of the requested slot. See REQUEST-ERROR
-
EXTERNAL CONDITION RADIANCE-CONDITION
Base condition class for all conditions related to radiance. Contains a MESSAGE slot that may hold a string that explains the reason around the condition in human- readable format. See MESSAGE
-
EXTERNAL CONDITION REQUEST-DENIED
Error signalled when a resource was requested that cannot be displayed to the requestor as they do not have sufficient permission. See REQUEST-ERROR
-
EXTERNAL CONDITION REQUEST-EMPTY
Error signalled when the reply body to the request was empty. See REQUEST-ERROR
-
EXTERNAL CONDITION REQUEST-ERROR
Base condition class for errors related to requests. Contains a REQUEST slot that holds the request that caused the issue. See RADIANCE-ERROR
-
EXTERNAL CONDITION REQUEST-NOT-FOUND
Error signalled when a resource was requested that does not exist. See REQUEST-ERROR
-
EXTERNAL CONDITION SYSTEM-HAS-NO-VERSION
Error signalled when an ASDF system does not store a version string. Without a version string, Radiance is incapable of tracking what the current version of a system is and is thus unable to automatically migrate it. This error should be continuable. See MIGRATE See RADIANCE-ERROR
-
EXTERNAL CONDITION UNPARSABLE-URI-STRING
Error signalled when a string was attempted to be turned into an URI object that could not be parsed according to the URI rules. Contains a STRING slot that holds the string that was attempted to be parsed. See URI See RADIANCE-ERROR
-
EXTERNAL HOOK ENVIRONMENT-CHANGE
This hook is triggered after the environment has been changed. At this point the environment is already set up and the configuration has been reloaded or purged as necessary.
-
EXTERNAL HOOK REQUEST
- REQUEST
- RESPONSE
This hook is triggered whenever a request is executed. It has two arguments: the request and the response object. Note that at this point dispatch has not yet happened, but the routing is already complete and the request's URI should be in the internal representation.
-
EXTERNAL HOOK SERVER-READY
This hook is triggered after the server has been started up and is ready to receive requests. Note that this is a sticky hook and will remain active until SERVER-STOP is triggered.
-
EXTERNAL HOOK SERVER-SHUTDOWN
This hook is triggered after the server has been stopped and is shut down. Note that this causes the SERVER-START hook to become unstickied. See SERVER-START
-
EXTERNAL HOOK SERVER-START
This hook is triggered right after the server interface has been loaded. At this point the server should be loaded to go, but not necessarily yet running. This hook in itself causes the server to start itself up. Note that this is a sticky hook and will remain active until SERVER-SHUTDOWN is triggered. See SERVER-READY See SERVER-SHUTDOWN
-
EXTERNAL HOOK SERVER-STOP
This hook causes the server to stop and shut down. Note that this causes the SERVER-READY hook to become unstickied. See SERVER-READY
-
EXTERNAL HOOK SHUTDOWN
This hook is triggered at the beginning of the shutdown sequence. At this point nothing has been shut down yet. Note that this causes the STARTUP hook to become unstickied. See STARTUP
-
EXTERNAL HOOK SHUTDOWN-DONE
This hook is triggered at the end of the shutdown sequence. At this point the sequence is complete and the system should be completely shut down.
-
EXTERNAL HOOK STARTUP
This hook is triggered early in the startup sequence. At this point the environment has been set and the logger interface has been loaded, but nothing else has been started yet. Note that this is a sticky hook and will remain active until SHUTDOWN is triggered. See SHUTDOWN
-
EXTERNAL HOOK STARTUP-DONE
This hook is triggered at the end of the startup sequence. At this point the sequence is complete and the system should be readily running.
-
EXTERNAL URI-DISPATCHER API
Standard page to handle and dispatch to API endpoints. Respects the "browser" post/get property, which if set to the string "true", causes a redirect to the referer on an api-error rather than displaying a machine-readable error output. See API-ENDPOINT See CALL-API-REQUEST
-
EXTERNAL URI-DISPATCHER FAVICON
Standard page for the favicon.ico root image.
-
EXTERNAL URI-DISPATCHER ROBOTS
Standard page for the robots.txt root file.
-
EXTERNAL URI-DISPATCHER STATIC
Standard delegate for static files. The address must be of the form /static/module/path where the path is translated to one relative to the module's static resource directory. See STATIC-FILE
-
EXTERNAL API-ENDPOINT Fallback api endpoint that signals an API-CALL-NOT-FOUND error.
-
EXTERNAL FUNCTION *REQUEST*
Returns the value of *REQUEST* See *REQUEST*
-
EXTERNAL FUNCTION *RESPONSE*
Returns the value of *RESPONSE* See *RESPONSE*
-
EXTERNAL FUNCTION ABORT-HANDLING
Aborts the current handling and continues dispatch. This is a wrapper function that simply invokes the ABORT-HANDLING restart. See DISPATCH
-
EXTERNAL FUNCTION ADD-DOMAIN
- DOMAIN
Adds a new top-level domain to the list of recognised domains. Adds the name to (MCONFIG :RADIANCE :SERVER :DOMAINS) The top-level domain as thought of by radiance is any domain that does not contain any subdomains in its name. For example, if your website is hosted on example.com then that would be a top-level domain. Or, if your domain is some.deep.thing.network.internal then that too would be a top-level domain. Radiance needs to know this in order to be able to distinguish when subdomains for its own purposes start and end since it is not generally predictable for an arbitrary domain name. See MCONFIG See REMOVE-DOMAIN
-
EXTERNAL FUNCTION API-ENDPOINT
- PATH
Accessor to the api-endpoint instances. See API-ENDPOINT See REMOVE-API-ENDPOINT See LIST-API-ENDPOINT
-
EXTERNAL FUNCTION (SETF API-ENDPOINT)
- PAGE
- PATH
No documentation provided. -
EXTERNAL FUNCTION API-FORMAT
- NAME
Accessor to the api formats. The api format function should accept a single argument, the object to translate, and should configure the response to output the correct data, or in the very least return an acceptable value for the response's data. The name must be a string designator. See *API-FORMATS* See REMOVE-API-FORMAT See LIST-API-FORMATS See DEFINE-API-FORMAT See API-OUTPUT
-
EXTERNAL FUNCTION (SETF API-FORMAT)
- PARSE-FUNC
- NAME
No documentation provided. -
EXTERNAL FUNCTION API-OUTPUT
- DATA
- &REST
- METADATA
- &KEY
- STATUS
- MESSAGE
- FORMAT
- &ALLOW-OTHER-KEYS
Emits the given data as a response. This function should be called for any and all return data from an api endpoint. It ensures the data proper structure, failure handling, and data translation to the desired output format. The proper structure for an API response from an endpoint should be an object/table/map with the following fields: status --- The HTTP status code. message --- A supplied human-readable message that describes the success or failure. data --- The data payload of the api output. The types of objects that can be serialised via this function are restricted to the following set: - REAL - (EQL NIL) - (EQL T) - STRING - LIST (proper ones) - VECTOR - HASH-TABLE An api format may support additional types, but is not required to. Thus, in order to be conforming, the data you pass to this function must not reference any values that have a type outside of this set. See API-FORMAT
-
EXTERNAL FUNCTION CALL-API
- API-ENDPOINT
- &REST
- ARGUMENTS
Calls the given api-endpoint directly with the supplied arguments. See HANDLER See ENSURE-API-ENDPOINT
-
EXTERNAL FUNCTION CALL-API-REQUEST
- API-ENDPOINT
- &OPTIONAL
- REQUEST
Calls the given api-endpoint with the given request. This rebinds *REQUEST*. See REQUEST-HANDLER See ENSURE-API-ENDPOINT
-
EXTERNAL FUNCTION CHECK-ENVIRONMENT
Checks whether the environment is properly configured. If no environment is present, an error of type ENVIRONMENT-NOT-SET is signalled. Two restarts will be present at the time: CONTINUE --- Sets the environment to "default" SET-ENVIRONMENT --- Sets the environment to the one passed in the argument. See ENVIRONMENT
-
EXTERNAL FUNCTION COOKIE
- NAME
- &OPTIONAL
- REQUEST/RESPONSE
Accesses the cookie instance of the request. The SETF function will construct the proper cookie instance for you. See COOKIES See COOKIE See *RESPONSE* See *REQUEST*
-
EXTERNAL FUNCTION (SETF COOKIE)
- VALUE
- NAME
- &KEY
- DOMAIN
- PATH
- TIMEOUT
- HTTP-ONLY
- SECURE
- RESPONSE
No documentation provided. -
EXTERNAL FUNCTION COOKIE-HEADER
- COOKIE
Returns a string representation of the cookie as a header. See COOKIE
-
EXTERNAL FUNCTION COPY-URI
- URI
-
EXTERNAL FUNCTION CREATE-MODULE
- NAME
- &KEY
- BASE-FILE
- DEPENDENCIES
- ROOT
Creates a new stub module. Creates the following files and directories: name/ name/static name/template name/name.asd name/name.lisp If Quicklisp is present, the local-projects are registered and the project is loaded after the files have been created. See *MODULES-DIRECTORY*
-
EXTERNAL FUNCTION DEFAULTED-MCONFIG
- DEFAULT
- MODULE
- &REST
- PATH
Sets the configuration variable to the given default if it has not been set previously and returns the value. See UBIQUITOUS:DEFAULTED-VALUE See MCONFIG-STORAGE
-
EXTERNAL FUNCTION DELETE-MODULE
- MODULE
Attempts to completely delete the given module. This first calls the delete hooks, then demodularizes the package, unbinds all symbols in the package from values and functions, and finally deletes the package.
-
EXTERNAL FUNCTION DESCRIBE-MODULE
- MODULE
- STREAM
Writes a human-readable description of the module to the stream. This is useful for inspection and debugging, to see a quick overview of what the module does or has. This function is called by DESCRIBE if it is called on a module. Signals an error if the argument cannot be coerced to a module. See MODULE-DOMAIN See MODULE-PERMISSIONS See MODULE-REQUIRED-INTERFACES See MODULE-REQUIRED-SYSTEMS See MODULE-PAGES See MODULE-API-ENDPOINTS See MODULARIZE:MODULE
-
EXTERNAL FUNCTION DISPATCH
- URI
Calls the appropriate uri-dispatcher that is set up to handle the given uri. Usually, only a single uri-dispatcher will be called, if any. In order for a dispatcher to be called, the uri must match the dispatcher's by URI-MATCHES. In the case where two uri-dispatchers have a matching uri, then the one with the higher priority will be executed. This is achived by simply following the order present in the *URI-PRIORITY* vector. A uri-dispatcher that has been dispatched may call the ABORT-HANDLING restart, in which case it is considered as not having matched, and the dispatching continues. If no matching uri-dispatcher is available, the function in *URI-FALLBACK* will be called instead. See URI-MATCHES See URI-DISPATCHER> See DISPATCH-FUNCTION See ABORT-HANDLING See *URI-PRIORITY* See *URI-FALLBACK*
-
EXTERNAL FUNCTION ENSURE-URI
- URI-ISH
-
EXTERNAL FUNCTION ENVIRONMENT
Accessor to the current environment. The environment decides the namespace for the configuration and data files of Radiance and all modules that use its system. Note that changing the environment after one has already been loaded and modules have been loaded with it, is currently not supported and will lead to strange behaviour. See *ENVIRONMENT* See CHECK-ENVIRONMENT See MCONFIG-PATHNAME
-
EXTERNAL FUNCTION (SETF ENVIRONMENT)
- ENVIRONMENT
No documentation provided. -
EXTERNAL FUNCTION ENVIRONMENT-MODULE-PATHNAME
- MODULE
- KIND
- PATHNAME
Returns a path within the module's file directory for the given kind. This simply performs a merge-pathnames call on the given pathname and the corresponding ENVIRONMENT-MODULE-DIRECTORY. See ENVIRONMENT-MODULE-DIRECTORY
-
EXTERNAL FUNCTION EXECUTE-REQUEST
- REQUEST
- &OPTIONAL
- RESPONSE
Directly executes the given request and response instances. If an error occurs during the execution, HANDLE-CONDITION is called to handle it. The REQUEST hook is called at the beginning of execution. Then the request is dispatched on and the result converted into data for the response if applicable. See RESPONSE See REQUEST See DISPATCH See HANDLE-CONDITION
-
EXTERNAL FUNCTION EXPAND-OPTIONS
- TYPE
- OPTIONS
- NAME
- BODY
- &REST
- ARGS
Expands all options of the given type. Returns two values, the new body forms and the list of forms to output before the actual definition. An error is signalled if an unknown option is used. See OPTION See DEFINE-OPTION
-
EXTERNAL FUNCTION EXTERNAL-URI
- URI
Modifies the URI by pushing it through all reversal routes so that it becomes an external URI. See *ROUTE-REVERSAL*
-
EXTERNAL FUNCTION FILE
- NAME
- &OPTIONAL
- REQUEST
-
EXTERNAL FUNCTION FILE-SIZE
- PATHSPEC
Returns the file size in bytes.
-
EXTERNAL FUNCTION FIND-ALL-MODULES
- DIRECTORY
Attempts to find all module systems in a directory. This works as follows: it scans the directory tree for all files with the type ASD. For each attempts of these, it attempts to find an ASDF system with the file's name, and if the system can be found and is of type VIRTUAL-MODULE, it is returned. See VIRTUAL-MODULE
-
EXTERNAL FUNCTION FIND-IMPLEMENTATION
- INTERFACE
- &OPTIONAL
- SYSTEM
Attempts to find a suitable implementation for the given interface. This checks for the value of the configuration in MCONFIG :RADIANCE :INTERFACES interface-name-as-keyword If SYSTEM is T, then the ASDF system object is returned otherwise the implementation's system name. If Quicklisp is available and the implementing system has not yet been installed, it is installed automatically. The system is not loaded, however. If no implementation has been configured for the interface, an INTERFACE-IMPLEMENTATION-NOT-SET error is signalled. You may SETF this place to a suitable implementation for the given interface. The implementation should be a virtual module designator.
-
EXTERNAL FUNCTION (SETF FIND-IMPLEMENTATION)
- IMPLEMENTATION
- INTERFACE
No documentation provided. -
EXTERNAL FUNCTION FORMAT-CLOCK-TIME
- STAMP
- &OPTIONAL
- STREAM
Returns a string representing the given timestamp in wall-clock time. Bot universal-time stamp and local-time:timestamp are accepted. The effective format is "hh:mm:ss" See FORMAT-MACHINE-DATE See FORMAT-HUMAN-DATE See FORMAT-FANCY-DATE
-
EXTERNAL FUNCTION FORMAT-FANCY-DATE
- STAMP
- &OPTIONAL
- STREAM
Returns a string representing the given timestamp in an extensive, fancy date. Bot universal-time stamp and local-time:timestamp are accepted. The effective format is "WEEKDAY, DAY of MONTH Y, H:MM:SS UTC" See FORMAT-CLOCK-TIME See FORMAT-MACHINE-DATE See FORMAT-HUMAN-DATE
-
EXTERNAL FUNCTION FORMAT-HUMAN-DATE
- STAMP
- &OPTIONAL
- STREAM
Returns a string representing the given timestamp in human-readable date. Bot universal-time stamp and local-time:timestamp are accepted. The effective format is "YYYY.MM.DD hh:mm:ss" See FORMAT-CLOCK-TIME See FORMAT-MACHINE-DATE See FORMAT-FANCY-DATE See FORMAT-TIME
-
EXTERNAL FUNCTION FORMAT-MACHINE-DATE
- STAMP
- &OPTIONAL
- STREAM
Returns a string representing the given timestamp in machine-readable date. Bot universal-time stamp and local-time:timestamp are accepted. The effective format is "YYYY-MM-DDThh:mm:ss" See FORMAT-CLOCK-TIME See FORMAT-HUMAN-DATE See FORMAT-FANCY-DATE
-
EXTERNAL FUNCTION FORMAT-ONLY-DATE
- STAMP
- &OPTIONAL
- STREAM
No documentation provided. -
EXTERNAL FUNCTION FORMAT-RELATIVE-TIME
- STAMP
- &OPTIONAL
- STREAM
Returns a string representing the given timestamp seconds as a relative time. Bot universal-time stamp and local-time:timestamp are accepted. It divides the time up into seconds, minutes, hours, days, weeks, months, years, decades, centuries, and finally æons. Example: 63 results in "1 minute 3 seconds" See FORMAT-TIME
-
EXTERNAL FUNCTION FORMAT-TIME
- STAMP
- &OPTIONAL
- RELATIVE-TIME-THRESHOLD
- STREAM
Returns a string representing the given timestamp in an intuitive way. If the difference from the current time is below the RELATIVE-TIME-THRESHOLD, the time is formatted relatively, otherwise absolutely. See FORMAT-RELATIVE-TIME See FORMAT-HUMAN-DATE
-
EXTERNAL FUNCTION FORMAT-URI
- URI-STRING
- &REST
- FORMAT-ARGS
A shorthand function to construct a URI with a format string. This is basically just the following: (parse-uri (format NIL ..)) See PARSE-URI
-
EXTERNAL FUNCTION GET-UNIX-TIME
Return the current time as a unix timestamp in seconds since 1970.
-
EXTERNAL FUNCTION GET-VAR
- NAME
- &OPTIONAL
- REQUEST
-
EXTERNAL FUNCTION HANDLE-CONDITION
- CONDITION
Responsible for handling a condition during a request execution. Might invoke the debugger depending on *DEBUGGER*. Otherwise invokes the SET-DATA restart with the return-value of calling RENDER-ERROR-PAGE. See *DEBUGGER* See MAYBE-INVOKE-DEBUGGER See EXECUTE-REQUEST See RENDER-ERROR-PAGE
-
EXTERNAL FUNCTION HEADER
- NAME
- &OPTIONAL
- REQUEST/RESPONSE
Accesses the value of the header in the request or response. This is case-insensitive See HEADERS See *REQUEST* See *RESPONSE*
-
EXTERNAL FUNCTION (SETF HEADER)
- VALUE
- NAME
- &OPTIONAL
- RESPONSE
No documentation provided. -
EXTERNAL FUNCTION HOOK
- NAME
- &OPTIONAL
- MODULE
- ERROR
No documentation provided. -
EXTERNAL FUNCTION (SETF HOOK)
- HOOK
- NAME
- &OPTIONAL
- MODULE
No documentation provided. -
EXTERNAL FUNCTION IMPLEMENTATION
- INTERFACE
Returns the currently active implementation of the interface.
-
EXTERNAL FUNCTION (SETF IMPLEMENTATION)
- IMPLEMENTATION
- INTERFACE
Attempts to set the implementation of an interface. Interfaces can only be implemented by modules and if a different module already implements the interface a condition is signalled. The following restarts are available: DELETE Deletes the old implementation through DELETE-MODULE. OVERRIDE Overrides the implementation and leaves the old module. ABORT Aborts the setting of the implementation completely. If the implementation setting was successful, TEST-INTERFACE is called. If the implementation is set to NIL, RESET-INTERFACE is called.
-
EXTERNAL FUNCTION IMPLEMENTS
- MODULE
Returns a list of interfaces this module implements.
-
EXTERNAL FUNCTION INTERFACE
- OBJECT
Returns the interface package module as identified by the object. See MODULE for more.
-
EXTERNAL FUNCTION INTERFACE-P
- OBJECT
Returns T if the passed object is or names an interface, otherwise NIL.
-
EXTERNAL FUNCTION INTERNAL-URI
- URI
Modifies the URI by pushing it through all mapping routes so that it becomes an internal URI. See *ROUTE-MAPPING*
-
EXTERNAL FUNCTION LIST-API-ENDPOINTS
Lists all known api page instances. See API-ENDPOINT
-
EXTERNAL FUNCTION LIST-API-FORMATS
No documentation provided. -
EXTERNAL FUNCTION LIST-HOOKS
- &OPTIONAL
- MODULE
No documentation provided. -
EXTERNAL FUNCTION LIST-MODULES
Returns a list of all modules in no particular order.
-
EXTERNAL FUNCTION LIST-OPTIONS
- TYPE
Lists all option instances that are registered. See OPTION See *OPTIONS* See REMOVE-OPTION
-
EXTERNAL FUNCTION LIST-RESOURCE-TYPES
Returns a list of names of defined resource types. See *RESOURCE-TYPES* See RESOURCE-TYPE See REMOVE-RESOURCE-TYPE
-
EXTERNAL FUNCTION LIST-ROUTES
Lists all the route instances that are registered. See *ROUTE-REGISTRY* See ROUTE See REMOVE-ROUTE
-
EXTERNAL FUNCTION LIST-URI-DISPATCHERS
Returns a list of all uri-dispatchers that are registered. See *URI-REGISTRY* See URI-DISPATCHER
-
EXTERNAL FUNCTION LOAD-IMPLEMENTATION
- INTERFACE
Attempts to silently load the implementation for the interface if necessary. This function is called whenever an interface is requested as a dependency in an ASDF system definition. See FIND-IMPLEMENTATION
-
EXTERNAL FUNCTION MAKE-RANDOM-STRING
- &OPTIONAL
- LENGTH
- CHARS
Constructs a string composed of random characters. See *RANDOM-STRING-CHARACTERS*
-
EXTERNAL FUNCTION MAKE-URI
- &KEY
- DOMAINS
- PORT
- PATH
- MATCHER
Creates a new URI instance according t o the given parts. See URI
-
EXTERNAL FUNCTION MAKE-URL
- &KEY
- DOMAINS
- PORT
- PATH
- SCHEMA
- QUERY
- FRAGMENT
- REPRESENTATION
A shorthand function for constructing URL strings. This basically encompasses the combination of a MAKE-URI and a URI-TO-URL rather directly. The representation is set to :EXTERNAL for convenience as that is usually the preferred option for use-cases of this function. See MAKE-URI See URI-TO-URL
-
EXTERNAL FUNCTION MAYBE-INVOKE-DEBUGGER
- CONDITION
- &OPTIONAL
- RESTART
- &REST
- VALUES
Might call INVOKE-DEBUGGER depending on the value of *DEBUGGER*. If the debugger is invoked, it is always invoked with a CONTINUE restart surrounding it to avoid handling the condition. If the debugger is not invoked, or declines to handle the condition via the CONTINUE restart, and the RESTART argument is given, then the given restart is automatically invoked with the remaining values. See *DEBUGGER*
-
EXTERNAL FUNCTION MCONFIG
- MODULE
- &REST
- PATH
Accesses a configuration variable for the given module's storage. See UBIQUITOUS:VALUE See MCONFIG-STORAGE
-
EXTERNAL FUNCTION (SETF MCONFIG)
- VALUE
- MODULE
- &REST
- PATH
No documentation provided. -
EXTERNAL FUNCTION MCONFIG-PATHNAME
- MODULE
- &OPTIONAL
- TYPE
Returns the proper pathname to the module according to the current environment. The path is constructed according to: :NAME Set to the downcased module-name. :TYPE Set to conf.TYPE with type downcased. :DEFAULTS ENVIRONMENT-MODULE-DIRECTORY for the given module and the :CONFIGURATION kind. An environment must have been configured prior to calling this function. See ENVIRONMENT-MODULE-DIRECTORY See ENVIRONMENT
-
EXTERNAL FUNCTION MCONFIG-STORAGE
- MODULE
Returns the storage object for the given module. The storage object is cached and will only be loaded if it has not previously been loaded. This means that unless explicit cache purging occurs, changes to the underlying configuration file will be lost on subsequent writes. The object is cached in the module-storage slot :CONFIG See MODULARIZE:MODULE-STORAGE See MCONFIG-PATHNAME See UBIQUITOUS:RESTORE See UBIQUITOUS:OFFLOAD
-
EXTERNAL FUNCTION MERGE-URIS
- URI
- &OPTIONAL
- DEFAULTS
Creates a new URI by merging the given two. See URI
-
EXTERNAL FUNCTION MERGE-URL
- URL
- &KEY
- SCHEMA
- DOMAINS
- PORT
- PATH
- PARAMETERS
- FRAGMENT
Rewrites the URL, merging the given parts where appropriate. Accepts a URL string, a URI, or a PURI:URI. In the case of a URI, the URI is treated as-is and no routing is performed. Returns the rewritten URL as a string. The meanings of the parameters are the same as for URIs URI-TO-URL respectively, namely: SCHEMA --- The schema or scheme of the url as a string. Overrides if already existing. DOMAINS --- A list of domains in order. Eg: (com example www) These domains are prepended in the rendered URL. Eg: "www"+"example.com" = "www.example.com" PORT --- The port as an integer. Overrides if already existing. PATH --- The directory path as a string. The path will appear appended in the rendered URL. Eg: "foo"+"/bar" = "/bar/foo" PARAMETERS --- Query GET parameters as an alist. The parameters are prepended in the rendered URL. Eg: "a=b"+"a=a" = "a=b&a=a" FRAGMENT --- The URL fragment or anchor as a string. Overrides if already existing. All of these parameters should /NOT/ be passed URL-ENCODED. This function will take care of the appropriate URL-ENCODING if necessary. This function can be especially useful for automating redirects. For instance, if you would like to redirect back but add a message that should be displayed, you can use APPEND-URL on the REFERER and add the message with the PARAMETERS argument. See URI See URI-TO-URL See REWRITE-URL
-
EXTERNAL FUNCTION MODULE
- &OPTIONAL
- IDENTIFIER
Coerces the requested module. See MODULARIZE:MODULE
-
EXTERNAL FUNCTION MODULE-API-ENDPOINTS
- MODULE
Returns the list of names of the api endpoints that the module has registered. Signals an error if the argument cannot be coerced to a module. See MODULARIZE:MODULE
-
EXTERNAL FUNCTION MODULE-DEPENDENCIES
- MODULE
Returns the list of dependencies for the given module. Signals an error if the argument cannot be coerced to a module. Signals an error if the module does not have an associated virtual module. See ASDF:SYSTEM-DEPENDS-ON See MODULARIZE:MODULE See MODULARIZE:VIRTUAL-MODULE
-
EXTERNAL FUNCTION MODULE-DOMAIN
- MODULE
Returns the domain on which the module acts primarily. Signals an error if the argument cannot be coerced to a module. Signals an error of type INTERFACE-IMPLEMENTATION-NOT-PRESENT if an interface was passed that does not have an implementation yet. If not explicit domain was configured, the module's name is returned. See MODULARIZE:MODULE
-
EXTERNAL FUNCTION MODULE-IDENTIFIER
- MODULE
Returns the identifier of the module.
-
EXTERNAL FUNCTION MODULE-NAME
- MODULE
Returns the name of the module.
-
EXTERNAL FUNCTION MODULE-P
- OBJECT
Returns non-NIL if the passed object is or resolves to a module package, otherwise NIL.
-
EXTERNAL FUNCTION MODULE-PAGES
- MODULE
Returns the list of URIs for pages that the module has registered. Signals an error if the argument cannot be coerced to a module. See MODULARIZE:MODULE
-
EXTERNAL FUNCTION MODULE-PERMISSIONS
- MODULE
Returns the list of permissions that are known to exist for the module. Signals an error if the argument cannot be coerced to a module. See PERM See MODULARIZE:MODULE
-
EXTERNAL FUNCTION (SETF MODULE-PERMISSIONS)
- LIST
- MODULE
No documentation provided. -
EXTERNAL FUNCTION MODULE-REQUIRED-INTERFACES
- MODULE
Returns the list of interfaces that the module depends on. Signals an error if the argument cannot be coerced to a module. See MODULE-DEPENDENCIES See MODULARIZE:MODULE
-
EXTERNAL FUNCTION MODULE-REQUIRED-SYSTEMS
- MODULE
Returns the list of systems that the module depends on. Signals an error if the argument cannot be coerced to a module. See MODULE-DEPENDENCIES See MODULARIZE:MODULE
-
EXTERNAL FUNCTION MODULE-STORAGE
- MODULE
- &OPTIONAL
- KEY
Accesses the module storage table of the module or a field from it if a key is passed.
-
EXTERNAL FUNCTION (SETF MODULE-STORAGE)
- VALUE
- MODULE
- &OPTIONAL
- KEY
No documentation provided. -
EXTERNAL FUNCTION MODULE-STORAGE-REMOVE
- MODULE
- KEY
Removes a key from the module storage table.
-
EXTERNAL FUNCTION OPTION
- TYPE
- NAME
Accessor to an option instance. See OPTION See *OPTIONS* See REMOVE-OPTION See LIST-OPTIONS
-
EXTERNAL FUNCTION (SETF OPTION)
- OPTION
- TYPE
- NAME
No documentation provided. -
EXTERNAL FUNCTION PARSE-PATH-SAFELY
- NAMESTRING
Parses the given namestring as a path that only understands relative directories, name, and type. Furthmore, no special path syntax is allowed and everything is parsed verbatim. This avoids exploits where an URL is turned into a pathname and uses special characters like ~ or ..
-
EXTERNAL FUNCTION PARSE-TIME
- TIME
- &KEY
- TIME-ZONE
- ERROR
- DEFAULT
No documentation provided. -
EXTERNAL FUNCTION PARSE-URI
- URI-STRING
Parses the given URI into a string if possible. Signals an error of type UNPARSABLE-URI-STRING if the string cannot be parsed. See URI
-
EXTERNAL FUNCTION POST-VAR
- NAME
- &OPTIONAL
- REQUEST
-
EXTERNAL FUNCTION POST/GET
- NAME
- &OPTIONAL
- REQUEST
-
EXTERNAL FUNCTION REDIRECT
- NEW-ADDRESS
- &OPTIONAL
- REPRESENTATION
- CODE
- RESPONSE
Sets the response up to cause a redirect to the given address. By default, if a URI instance is given, the URI is externalised. See URI-TO-URL See RETURN-CODE See *RESPONSE*
-
EXTERNAL FUNCTION REFERER
- &OPTIONAL
- REQUEST
-
EXTERNAL FUNCTION (SETF REFERER)
- VALUE
- &OPTIONAL
- REQUEST
No documentation provided. -
EXTERNAL FUNCTION RELOAD-ENVIRONMENT
Reloads the current environment from disk. Note that configuration files are reloaded lazily, with the exception of the radiance-core configuration. See CHECK-ENVIRONMENT See ENVIRONMENT
-
EXTERNAL FUNCTION REMMCONFIG
- MODULE
- &REST
- PATH
Removes the configuration place from the given module's configuration. See UBIQUITOUS:REMVALUE See MCONFIG-STORAGE
-
EXTERNAL FUNCTION REMOVE-API-ENDPOINT
- PATH
Removes the given api page again if it exists. See API-ENDPOINT
-
EXTERNAL FUNCTION REMOVE-API-FORMAT
- NAME
Removes the named api format if it exists. The name must be a string designator. See *API-FORMATS* See API-FORMAT
-
EXTERNAL FUNCTION REMOVE-DOMAIN
- DOMAIN
Removes a known top-level domain. See ADD-DOMAIN
-
EXTERNAL FUNCTION REMOVE-HOOK
- NAME
- &OPTIONAL
- MODULE
Removes the hook as named.
-
EXTERNAL FUNCTION REMOVE-OPTION
- TYPE
- NAME
Removes an option instance again, if it exists. See OPTION See *OPTIONS* See LIST-OPTIONS
-
EXTERNAL FUNCTION REMOVE-PAGE
- NAME
No documentation provided. -
EXTERNAL FUNCTION REMOVE-RESOURCE-TYPE
- TYPE
Removes the given resource type, if it exists. See *RESOURCE-TYPES* See RESOURCE-TYPE See LIST-RESOURCE-TYPES
-
EXTERNAL FUNCTION REMOVE-ROUTE
- NAME
- DIRECTION
Removes the specified route, if any. Automatically calls REBUILD-ROUTE-VECTORS See REBUILD-ROUTE-VECTORS See *ROUTE-REGISTRY* See ROUTE See LIST-ROUTES
-
EXTERNAL FUNCTION REMOVE-TRIGGER
- HOOK
- &OPTIONAL
- IDENT
- MODULE
Attempts to remove the trigger from the hook.
-
EXTERNAL FUNCTION REMOVE-URI-DISPATCHER
- NAME
Removes the named uri-dispatcher, if any. See *URI-REGISTRY* See URI-DISPATCHER
-
EXTERNAL FUNCTION RENDER-ERROR-PAGE
- CONDITION
This function is responsible for rendering an appropriate response for the given condition. A module is allowed to redefine this function to do as it sees fit. See HANDLE-CONDITION
-
EXTERNAL FUNCTION REPRESENT-URI
- URI
- REPRESENTATION
Returns a new URI that is represented accordingly. REPRESENTATION can be one of the following: :AS-IS NIL --- The URI is simply copied :EXTERNAL :REVERSE --- The URI is externalised :INTERNAL :MAP --- The URI is internalised See COPY-URI See EXTERNAL-URI See INTERNAL-URI
-
EXTERNAL FUNCTION REQUEST
- TO-URI
- &KEY
- REPRESENTATION
- HTTP-METHOD
- BODY-STREAM
- HEADERS
- POST
- GET
- COOKIES
- REMOTE
- RESPONSE
Handle a request to the given URI with the given parameters. This creates an appropriate request object, translates the URI object if necessary, and then calls EXECUTE-REQUEST to actually perform the request proper. See REQUEST See ENSURE-REQUEST-HASH-TABLE See REPRESENT-URI See EXECUTE-REQUEST
-
EXTERNAL FUNCTION REQUEST-RUN-TIME
- &OPTIONAL
- REQUEST
Returns the number of seconds since the request was issued. See ISSUE-TIME See *REQUEST*
-
EXTERNAL FUNCTION RESET-INTERFACE
- INTERFACE
Resets the interface by redefining it with stubs as per its component definitions.
-
EXTERNAL FUNCTION RESOLVE-BASE
- THING
Resolves the filesystem directory of the thing if possible.
-
EXTERNAL FUNCTION RESOURCE
- MODULE
- TYPE
- &REST
- ARGS
Returns the requested resource type on the given module. If the module does not have a specific locator, the default locator is called. If no default exists, an error is signalled. The applicable structure and number of the arguments is dependant on the locator being called. See LIST-RESOURCE-TYPES See DEFINE-RESOURCE-LOCATOR
-
EXTERNAL FUNCTION RESOURCE-LOCATOR
- TYPE
- IDENT
Accessor to a locator function on the given resource type. Signals an error if the ident is T and there is no default resource locator defined on the resource type. See RESOURCE-TYPE
-
EXTERNAL FUNCTION (SETF RESOURCE-LOCATOR)
- VALUE
- TYPE
- IDENT
No documentation provided. -
EXTERNAL FUNCTION RESOURCE-TYPE
- NAME
Accessor for the resource types. If the requested type does not exist, an error is signalled. See *RESOURCE-TYPES* See RESOURCE-TYPE See REMOVE-RESOURCE-TYPE See LIST-RESOURCE-TYPES See DEFINE-RESOURCE-TYPE
-
EXTERNAL FUNCTION (SETF RESOURCE-TYPE)
- TYPE
- NAME
No documentation provided. -
EXTERNAL FUNCTION REWRITE-URL
- URL
- &KEY
- SCHEMA
- DOMAINS
- PORT
- PATH
- PARAMETERS
- FRAGMENT
Rewrites the URL, replacing components with the given parts. Accepts a URL string, a URI, or a PURI:URI. In the case of a URI, the URI is treated as-is and no routing is performed. Returns the rewritten URL as a string. The meanings of the parameters are the same as for URIs URI-TO-URL respectively, namely: SCHEMA --- The schema or scheme of the url as a string. DOMAINS --- A list of domains in order. Eg: (com example www) PORT --- The port as an integer. PATH --- The directory path as a string. PARAMETERS --- Query GET parameters as an alist. FRAGMENT --- The URL fragment or anchor as a string. All of these parameters should /NOT/ be passed URL-ENCODED. This function will take care of the appropriate URL-ENCODING if necessary. If a parameter is passed as NIL, it means that the component should be absent from the URL. See URI See URI-TO-URL See MERGE-URL
-
EXTERNAL FUNCTION ROUTE
- NAME
- DIRECTION
Accesses the route instance of the given name and direction. Automatically calls REBUILD-ROUTE-VECTORS when a route is changed. See REBUILD-ROUTE-VECTORS See *ROUTE-REGISTRY* See REMOVE-ROUTE See LIST-ROUTES See ROUTE
-
EXTERNAL FUNCTION (SETF ROUTE)
- ROUTE
- NAME
- DIRECTION
No documentation provided. -
EXTERNAL FUNCTION SERVE-FILE
- PATHNAME
- &OPTIONAL
- CONTENT-TYPE
- RESPONSE
Sets the response up to serve the given file. If the file does not exist, an error of type FILE-TO-SERVE-DOES-NOT-EXIST is signalled. The content-type, if not explicitly given, is attempted to be automatically discovered by MIMES:MIME-LOOKUP and falls back to application/octet-stream. See FILE-TO-SERVE-DOES-NOT-EXIST See MIMES:MIME-LOOKUP See CONTENT-TYPE See DATA See *RESPONSE*
-
EXTERNAL FUNCTION SHUTDOWN
Stops Radiance and cleans up all connections. If Radiance is not already running, an error is signalled. The shutdown sequence proceeds as follows: 1. SHUTDOWN is triggered 2. SERVER-STOP is triggered 3. *RUNNING* is set to NIL 4. SERVER-SHUTDOWN is triggered 5. *STARTUP-TIME* is set to NIL 6. SHUTDOWN-DONE is triggered See STARTUP See STARTED-P
-
EXTERNAL FUNCTION STARTED-P
-
EXTERNAL FUNCTION STARTUP
- &OPTIONAL
- ENVIRONMENT
Starts up Radiance and prepares it for use. If Radiance is already running, an error is signalled. If ENVIRONMENT is not a string, an error is signalled. The startup sequence proceeds as follows: 1. *STARTUP-TIME* is saved 2. The environment is changed 3. STARTUP is triggered 4. The implementation for the LOGGER interface is loaded 5. The implementation for the SERVER interface is loaded 6. SERVER-START is triggered 7. *RUNNING* is set to T 8. SERVER-READY is triggered 9. The systems in the (MCONFIG :RADIANCE :STARTUP) configuration are loaded in sequence 10. STARTUP-DONE is triggered See SHUTDOWN See STARTED-P
-
EXTERNAL FUNCTION STATIC-FILE
- NAMESTRING
- &OPTIONAL
- BASE
Returns the static file for the given base. The base will usually be your local module. This function will return the path returned by ENVIRONMENT-MODULE-PATHNAME for the given base, :STATIC type, and namestring if the file exists, or otherwise merge the namestring with the static/ subdirectory within your module's source directory. For instance, a module named FOO asking for the BAR static file while the file is overridden would return a path like the following under default setups: ~/.local/share/radiance/default/static/foo/bar If this override file did not exist, the following path would be returned instead assuming FOO's project root is at ~/Projects/: ~/Projects/foo/static/bar See @STATIC
-
EXTERNAL FUNCTION SYNC-ENVIRONMENT
Forces the writing of all configuration files. This will cause the configuration file for every loaded module to be written to disk. Note that this will /not/ necessarily first try to load the files from disk, so changes to the files may be overwritten and lost by this operation. Typically configuration files are automatically synced to disc on write, so this function should not be necessary most of the time. See MODULARIZE:LIST-MODULES See MCONFIG-STORAGE
-
EXTERNAL FUNCTION TEMPLATE-FILE
- NAMESTRING
- &OPTIONAL
- BASE
Returns the template file for the given base. The base will usually be your local module. This function will return the path returned by ENVIRONMENT-MODULE-PATHNAME for the given base, :TEMPLATE type, and namestring if the file exists, or otherwise merge the namestring with the template/ subdirectory within your module's source directory. For instance, a module named FOO asking for the BAR template file while the file is overridden would return a path like the following under default setups: ~/.local/share/radiance/default/template/foo/bar If this override file did not exist, the following path would be returned instead assuming FOO's project root is at ~/Projects/: ~/Projects/foo/template/bar See @TEMPLATE
-
EXTERNAL FUNCTION TRIGGER
- HOOK
- &REST
- ARGS
Calls all triggers registered on the hook with the given arguments.
-
EXTERNAL FUNCTION UNIVERSAL-TO-UNIX-TIME
- UNIVERSAL-TIME
Translate the given universal-time to a unix-time See +UNIX-EPOCH-DIFFERENCE+
-
EXTERNAL FUNCTION UNIX-TO-UNIVERSAL-TIME
- UNIX-TIME
Translate the given unix-time to a universal-time See +UNIX-EPOCH-DIFFERENCE+
-
EXTERNAL FUNCTION UPTIME
Returns the amount of seconds that radiance has been started for, if at all. See STARTUP See SHUTDOWN See *STARTUP-TIME*
-
EXTERNAL FUNCTION URI-DISPATCHER
- NAME
Accessor to the registered uri-dispatcher instances. Setting this automatically invokes a rebuild of the *uri-priority* vector. See *URI-REGISTRY* See URI-DISPATCHER See REMOVE-URI-DISPATCHER See LIST-URI-DISPATCHERS See REBUILD-URI-PRIORITY
-
EXTERNAL FUNCTION (SETF URI-DISPATCHER)
- DISPATCHER
- NAME
No documentation provided. -
EXTERNAL FUNCTION URI-DISPATCHER>
- A
- B
Returns true if the uri-dispatcher A has a higher priority than B. If neither A nor B have a priority set, the comparison is the same as URI>. If only A has a priority set, then T is returned. If only B has a priority set, then NIL is returned. Otherwise T is returned if the priority of A is greater or equal to that of B. See URI>
-
EXTERNAL FUNCTION URI-MATCHES
- URI
- PATTERN-URI
Returns T if the URI matches the PATTERN-URI. Sepcifically, in order to match: The matcher of the pattern must match the path of the uri. All the domains must be in the same order and match by STRING-EQUAL. Either one of them does not have a port set, or the ports must match by =. See MATCHER See URI
-
EXTERNAL FUNCTION URI-STRING
- URI
Returns a parsable string representation of the URI. See URI
-
EXTERNAL FUNCTION URI-TO-URL
- URI
- &KEY
- REPRESENTATION
- SCHEMA
- QUERY
- FRAGMENT
Returns a URL representation of the URI. The QUERY argument takes an alist of keys and variables to be used in the query part of the resulting URL. The fragment is the optional fragment part. The schema is, unless explicitly given, automatically set to HTTPS if the translated URI's port is 443, the value of the X-Forwarded-Proto header if present, or HTTP otherwise. The path, query, and fragment are url-encoded as necessary. See REPRESENT-URI See URL-ENCODE See MAKE-URL
-
EXTERNAL FUNCTION URI<
- A
- B
Returns T if A logically precedes B in specificity. In more detail (short-circuiting top to bottom): T A does not have a port, but B does T A's number of domains is less than B's T A's length of the path is greater than B's NIL for everything else See URI
-
EXTERNAL FUNCTION URI=
- A
- B
Returns T if A and B represent the same URIs. Specifically: Ports must be EQL Paths must be EQUAL Domains must be the same order and be STRING-EQUAL See URI
-
EXTERNAL FUNCTION URI>
- A
- B
Returns T if A logically follows B in specificity. See URI<
-
EXTERNAL FUNCTION URL-ENCODE
- THING
- &KEY
- STREAM
- EXTERNAL-FORMAT
- ALLOWED
Encodes the given string to the stream in url-encoded format. This means that characters that are not one of a-Z 0-9 - . _ ~ are written down in percent-encoded schema.
-
EXTERNAL FUNCTION USER-AGENT
- &OPTIONAL
- REQUEST
-
EXTERNAL FUNCTION (SETF USER-AGENT)
- VALUE
- &OPTIONAL
- REQUEST
No documentation provided. -
EXTERNAL FUNCTION VIRTUAL-MODULE
- MODULE
No documentation provided. -
EXTERNAL GENERIC-FUNCTION API-SERIALIZE
- OBJECT
Cause the object to be serialised into a more favourable structure. This function should be used by api-format providers to transform objects that cannot be directly emitted into a structure that can. If the object is not serializable, an error of type API-UNSERIALIZABLE-OBJECT is signalled.
-
EXTERNAL GENERIC-FUNCTION ARGSLIST
- OBJECT
Accesses the lambda-list of the api-endpoint's handler. This describes the public interface's arguments. Arguments are usually received as GET or POST parameters of the same name as the argument symbol and it thus only makes sense for the lambda-list to contain required and optional arguments. See API-ENDPOINT
-
EXTERNAL GENERIC-FUNCTION (SETF ARGSLIST)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION BODY-STREAM
- OBJECT
Accesses the request's binary input stream for the HTTP body. This may return NIL, or a closed or empty stream if the HTTP request was made with a content-type that is either application/x-www-form-urlencoded or multipart/form-data. In that case, the POST-DATA table will be populated with the body contents instead. Otherwise, this stream will allow you to read the request body data and parse it as appropriate. If a stream is returned, it must have the element-type (UNSIGNED-BYTE 8). Consult the content-type and content-length headers for how to handle the data encoded in this stream. See REQUEST See HEADER
-
EXTERNAL GENERIC-FUNCTION (SETF BODY-STREAM)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION CONTENT-LENGTH
- REQUEST
Retrieves the HTTP content-length header. This returns the number of octets of content to be read from the BODY-STREAM, or NIL if the header was absent or malformed. Note that even if this header is set, you should not trust the returned number unconditionally as it could be arbitrarily forged. If you need to buffer the whole data from the body stream, you should make sure to check an upper bound on the content-length first. See HEADER See REQUEST See BODY-STREAM
-
EXTERNAL GENERIC-FUNCTION CONTENT-TYPE
- OBJECT
Accesses the HTTP content-type header. For a REQUEST object, this simply acts as a shorthand for (HEADER "content-type"), which should identify the type of content that the client sent to the server and how it should be decoded. For a RESPONSE object, this designates the content-type header to send out and defaults to *DEFAULT-CONTENT-TYPE*. See *DEFAULT-CONTENT-TYPE* See HEADER See REQUEST See RESPONSE
-
EXTERNAL GENERIC-FUNCTION (SETF CONTENT-TYPE)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION COOKIES
- OBJECT
-
EXTERNAL GENERIC-FUNCTION (SETF COOKIES)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION DATA
- OBJECT
-
EXTERNAL GENERIC-FUNCTION (SETF DATA)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION DIRECTION
- OBJECT
Accessor to the direction in which the route operates. Has to be one of :MAPPING :REVERSAL See ROUTE
-
EXTERNAL GENERIC-FUNCTION (SETF DIRECTION)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION DISPATCH-FUNCTION
- OBJECT
Accessor to the function that performs the actual response building of the dispatch. The function should not take any arguments. The body should either set the data of the *RESPONSE* object or return suitable data for it. See URI-DISPATCHER
-
EXTERNAL GENERIC-FUNCTION (SETF DISPATCH-FUNCTION)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION DOMAIN
- MODULE
-
EXTERNAL GENERIC-FUNCTION (SETF DOMAIN)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION DOMAINS
- OBJECT
Accesses the list of (sub)domains of the URI. The domains are in order of increasing specificity. This means they are the reverse of standard URL syntax. This is done for ease of matching and because it is honestly the more sensible way to represent a domain. See URI
-
EXTERNAL GENERIC-FUNCTION (SETF DOMAINS)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ENSURE-DEPENDENCIES-READY
- SYSTEM
- FROM
This function should ensure that all dependencies of the given system are ready for the system to perform a migration away from the given version. By default this will call READY-DEPENDENCY-FOR-MIGRATION on all systems that are recorded in the system's defsystem-dependencies and regular dependencies, AND are virtual-module systems. The user should supply methods on this function in case it is necessary to perform actions on other systems for the migration to perform smoothly. See READY-DEPENDENCY-FOR-MIGRATION See ASDF:SYSTEM-DEFSYSTEM-DEPENDS-ON See ASDF:SYSTEM-DEPENDS-ON
-
EXTERNAL GENERIC-FUNCTION ENVIRONMENT-DIRECTORY
- ENVIRONMENT
- TYPE
Returns the base directory for the given environment and file kind. If the ENVIRONMENT parameter is T, it is treated as if it were the value of (ENVIRONMENT). The administrator is encouraged to provide specialised methods on this generic function in order to redefine the base directories used for the environment's files. The following KINDs are currently recognised internally, though the user may supply further kinds. :CONFIGURATION --- The base for configuration files. The MCONFIG/CONFIG functions access files in this base directory. :CACHE --- The base for temporary cache files that may be cleared out without consequence. :DATA --- The base for data files. Modules may use this directory to store data files for runtime caches, user data, etc. :TEMPLATE --- The base for template files. Administrators may use this directory to provide overrides for a module's template files. :STATIC --- The base for static files. Administrators may use this directory to provide overrides for a module's static files. By default the base paths are determined as follows: :CONFIGURATION 1. A root is discovered as one of the following alternatives: 1.1. The XDG_CONFIG_HOME environment variable is consulted. 1.2. On Windows the AppData environment variable is consulted. 1.3. On Windows the directory ~/Application Data/ is used. 1.4. The directory ~/.config/ is used. 2. A subdirectory called "radiance" is added to the root. 3. A subdirectory with the environment name is added to the root. :CACHE 1. A root is discovered as one of the following alternatives: 1.1 The XDG_CACHE_HOME environment variable is consulted. 1.2 On Windows the TEMP environment variable is consulted. 1.3 On Windows the directory ~/Local Settings/Temp/ is used. 1.4 The directory ~/.cache/ is used. 2. A subdirectory called "radiance" is added to the root. 3. A subdirectory with the environment name is added to the root. :DATA/:TEMPLATE/:STATIC 1. A root is discovered as one of the following alternatives: 1.1 The XDG_DATA_HOME environment variable is consulted. 1.2 On Windows the LocalAppData environment variable is consulted. 1.3 On Windows the directory ~/Local Settings/ is used. 1.4 The directory ~/.local/share/ is used. 2. A subdirectory called "radiance" is added to the root. 3. A subdirectory with the environment name is added to the root. 4. A subdirectory with the name of the type (data/template/static) is added to the root. For instance, the environment directory on a clean Linux system for the "default" environment and :configuration kind would be: ~/.config/radiance/default/ The same on a recent (Vista+) Windows system would be: ~/AppData/Roaming/radiance/default/ And on an older (XP-) Windows system it would be: ~/Application Data/radiance/default/
-
EXTERNAL GENERIC-FUNCTION ENVIRONMENT-MODULE-DIRECTORY
- MODULE
- TYPE
Returns the base directory for the given module and file kind. The administrator is allowed to supply custom methods to this function that specialise on specific modules to tightly control the behaviour. If the environment is unset, this function will signal an error. By default this simply retrieves the environment root directory for the requested file kind and adds a subdirectory named after the downcased module name. For instance, the module directory for the radiance-core module in the default environment for the :configuration kind on Linux would be: ~/.config/radiance/default/radiance-core/ See ENVIRONMENT-DIRECTORY See ENVIRONMENT See CHECK-ENVIRONMENT
-
EXTERNAL GENERIC-FUNCTION EXPANDER
- OBJECT
Accesses the actual expansion function of the object. See OPTION
-
EXTERNAL GENERIC-FUNCTION (SETF EXPANDER)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION EXPIRES
- OBJECT
Accesses when the cookie will expire, if at all. See COOKIE
-
EXTERNAL GENERIC-FUNCTION (SETF EXPIRES)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION EXTERNAL-FORMAT
- OBJECT
Accesses the external-format to use to serialise the text data. Defaults to *DEFAULT-EXTERNAL-FORMAT* See *DEFAULT-EXTERNAL-FORMAT* See RESPONSE
-
EXTERNAL GENERIC-FUNCTION (SETF EXTERNAL-FORMAT)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION GET-DATA
- OBJECT
Accesses the hash table of GET variables that the request received. keys are strings, case-insensitive. If the key ends with "[]", the value is a list of strings, otherwise a single string. If no GET parameter of the given key was passed on the request, the value is NIL. See GET-VAR See POST/GET See REQUEST
-
EXTERNAL GENERIC-FUNCTION (SETF GET-DATA)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION HANDLER
- OBJECT
Accesses the handler function of the api-endpoint. The handler-function must have the same lambda-list as the api-endpoint's ARGSLIST. It must call API-OUTPUT at some point during its evaluation to emit data. See API-ENDPOINT
-
EXTERNAL GENERIC-FUNCTION (SETF HANDLER)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION HEADERS
- OBJECT
-
EXTERNAL GENERIC-FUNCTION (SETF HEADERS)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION HTTP-METHOD
- OBJECT
Accesses the HTTP method that was used to request the page. Should be one of :GET :HEAD :POST :PUT :DELETE :TRACE :CONNECT See REQUEST
-
EXTERNAL GENERIC-FUNCTION (SETF HTTP-METHOD)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION HTTP-ONLY
- OBJECT
Accesses whether the cookie should get the http-only flag. See COOKIE
-
EXTERNAL GENERIC-FUNCTION (SETF HTTP-ONLY)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ISSUE-TIME
- OBJECT
Accesses the universal-time at which the request was issued. See REQUEST
-
EXTERNAL GENERIC-FUNCTION (SETF ISSUE-TIME)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION LAST-KNOWN-SYSTEM-VERSION
- SYSTEM
Return the last known version of this system that had been migrated to. Returns the version as an encoded keyword or NIL if the system has not seen a migration previously. This version is automatically adapted after MIGRATE-VERSIONS on the system completes successfully. See MIGRATE-VERSIONS
-
EXTERNAL GENERIC-FUNCTION (SETF LAST-KNOWN-SYSTEM-VERSION)
- VERSION
- SYSTEM
No documentation provided. -
EXTERNAL GENERIC-FUNCTION LOCATORS
- OBJECT
Accessor to the resource type's locator functions.
-
EXTERNAL GENERIC-FUNCTION (SETF LOCATORS)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION MATCHER
- OBJECT
-
EXTERNAL GENERIC-FUNCTION (SETF MATCHER)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION MESSAGE
- CONDITION
Accessor to the message of the condition. See RADIANCE-CONDITION
-
EXTERNAL GENERIC-FUNCTION (SETF MESSAGE)
- NEW-VALUE
- CONDITION
No documentation provided. -
EXTERNAL GENERIC-FUNCTION MIGRATE
- SYSTEM
- FROM
- TO
Migrates the given system between the given versions. Sometimes when versions change, a migration of runtime data is required to ensure that the system still operates correctly on existing data. This function should ensure that this compatibility is achieved. The system should be a designator for an ASDF system. FROM may be one of the following: T --- The system is migrated from its last known version. NIL --- The system is migrated from a time before migrations. version --- The system is migrated from this specific version. TO may be one of the following: T --- The system is migrated to its current system version. version --- The system is migrated to this specific version. When this function is called it determines the list of concrete versions in the range of the specified FROM and TO versions. It then calls MIGRATE-VERSION on the system and each pair of versions in the computed range. For instance, if the list of versions is (1 2 3 4), then MIGRATE-VERSION is called with the pairs (1 2) (2 3) (3 4). If the target version is T and the system has no recorded version, an error of type SYSTEM-HAS-NO-VERSION is signalled. If the target version is considered less than the source version, an error of type BACKWARDS-MIGRATION-NOT-ALLOWED is signalled. Two restarts are established during migration: ABORT --- Aborts migration of the current system, leaving the last known system version the same. FORCE-VERSION --- Aborts the migration of the current system, but forces the last known system version to the requested target version. See ENSURE-PARSED-VERSION See VERSIONS See MIGRATE-VERSION See SYSTEM-HAS-NO-VERSION See BACKWARDS-MIGRATION-NOT-ALLOWED
-
EXTERNAL GENERIC-FUNCTION MIGRATE-VERSIONS
- SYSTEM
- FROM
- TO
Perform a migration of the system from the given source version to the given target version. If a system or module requires manual intervention to upgrade data or other parts in order to move between versions, the author of the system should specialise a method on this function that performs the requested upgrade step. FROM and TO should be encoded versions in keyword form. FROM can also be the NIL symbol, which is useful to migrate from previously unknown versions to another. Note that the version steps between migrate-version methods on the same system should be contiguous. This means that if a system has the concrete versions 1, 2, 3, and 4, then there should be methods (if necessary) to upgrade from 1 to 2, from 2 to 3, from 3 to 4. Migration steps with gaps, such as from 2 to 4, will not be triggered by the system. Also note that by default the list of concrete versions a system offers are inferred from the methods defined on this function. There is no need to further inform the system on available concrete versions of a system. A default method that performs no action is provided on this function, as in the majority of cases no migration step is required. As such, methods need only be added to this function if an action is required. Before the primary method is executed, ENSURE-DEPENDENCIES-READY is called on the system and the source version. This should ensure that dependant systems are on a required version for this system to perform its own actions. After the primary method has completed, the target version is recorded as the last known concrete system version. The user should NOT call this function. It is called by MIGRATE as appropriate. See DEFINE-VERSION-MIGRATION See VERSIONS See MIGRATE See ENSURE-DEPENDENCIES-READY See LAST-KNOWN-SYSTEM-VERSION
-
EXTERNAL GENERIC-FUNCTION NAME
- OBJECT
Accesses the name of the object. May be a symbol or a string depending on the object.
-
EXTERNAL GENERIC-FUNCTION (SETF NAME)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION OPTION-TYPE
- OBJECT
Accesses the type of option that this option object belongs to. See OPTION
-
EXTERNAL GENERIC-FUNCTION (SETF OPTION-TYPE)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION PATH
- OBJECT
-
EXTERNAL GENERIC-FUNCTION (SETF PATH)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION PORT
- OBJECT
Accesses the port of the URI. Must be of type (OR (INTEGER 0 65535) NULL) See URI
-
EXTERNAL GENERIC-FUNCTION (SETF PORT)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION POST-DATA
- OBJECT
Accesses the hash table of POST-body variables that the request received. keys are strings, case-insensitive. If the key ends with "[]", the value is a list of payloads, otherwise a single payload. If no POST parameter of the given key was passed on the request, the value is NIL. A payload is either a single data string, or if the request was performed with multipart/form-data and the parameter is a file upload, a list of (PATH ORIGINAL-FILENAME MIME-TYPE), the first being a pathname, the rest being strings. See POST-VAR See POST/GET See FILE See REQUEST
-
EXTERNAL GENERIC-FUNCTION (SETF POST-DATA)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION PRIORITY
- OBJECT
Accessor to the priority, which may be NIL or an INTEGER. See URI-DISPATCHER See DISPATCH See ROUTE
-
EXTERNAL GENERIC-FUNCTION (SETF PRIORITY)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION READY-DEPENDENCY-FOR-MIGRATION
- DEPENDENCY
- SYSTEM
- FROM
This function should ensure that the dependency conforms to the system's required state to migrate away from the given version. By default this will invoke MIGRATE on the dependency with both source and from versions being T. The user should supply methods on this function to customise the precise versions or features required to perform the migration of the system properly. See MIGRATE
-
EXTERNAL GENERIC-FUNCTION REMOTE
- OBJECT
Accesses the remote address that the request was sent out from. See REQUEST
-
EXTERNAL GENERIC-FUNCTION (SETF REMOTE)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION REQUEST-HANDLER
- OBJECT
Accesses the function to handle a direct request object and transform it into a proper api call. This function is usually automatically generated. It should read out the parameters from the request object and turn them into arguments for a call to the api-endpoint's handler function. The function only takes a single argument namely the request object to handle. See HANDLER See API-ENDPOINT
-
EXTERNAL GENERIC-FUNCTION (SETF REQUEST-HANDLER)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION RETURN-CODE
- OBJECT
Accesses the HTTP return code to send out. Defaults to 200. See RESPONSE
-
EXTERNAL GENERIC-FUNCTION (SETF RETURN-CODE)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION SECURE
- OBJECT
Accesses whether the cookie should get the secure flag. See COOKIE
-
EXTERNAL GENERIC-FUNCTION (SETF SECURE)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION TRANSLATOR
- OBJECT
Accessor to the route's translation function. The function should accept a single URI object as an argument and modify it as it sees fit. See ROUTE
-
EXTERNAL GENERIC-FUNCTION (SETF TRANSLATOR)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION URI
- OBJECT
Accesses the URI that the request operates on. Depending on the stage of the request, the URI may be either internal or external. See REQUEST
-
EXTERNAL GENERIC-FUNCTION (SETF URI)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION VALUE
- OBJECT
Accesses the cookie value. See COOKIE
-
EXTERNAL GENERIC-FUNCTION (SETF VALUE)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION VERSIONS
- SYSTEM
Returns a list of concrete version designators that are known for the given system. This list is deduplicated and sorted in such a way that lower versions come earlier in the list. By default this list is computed by inspecting the list of primary methods on MIGRATE-VERSION, extracting the version specifiers, and subsequently deduplicating and sorting the resulting list. The user may supply methods on this function in case the automatically computed list of versions is inadequate somehow. See VERSION< See MIGRATE See MIGRATE-VERSIONS
-
EXTERNAL GENERIC-FUNCTION VIRTUAL-MODULE-NAME
- OBJECT
Returns the module name associated with this virtual module.
-
EXTERNAL GENERIC-FUNCTION (SETF VIRTUAL-MODULE-NAME)
- NEW-VALUE
- OBJECT
No documentation provided. -
EXTERNAL MACRO @STATIC
- NAMESTRING
Expands to a pathname to the static file in the current module. This expands to a load-time-value form if the namestring is constant, ensuring that no expensive lookups are done at runtime. See STATIC-FILE
-
EXTERNAL MACRO @TEMPLATE
- NAMESTRING
Expands to a pathname to the template file in the current module. This expands to a load-time-value form if the namestring is constant, ensuring that no expensive lookups are done at runtime. See TEMPLATE-FILE
-
EXTERNAL MACRO API-ERROR
- FORMAT-STRING
- &REST
- FORMAT-ARGS
Shorthand for (ERROR 'API-ERROR :MESSAGE (FORMAT NIL ..)) See API-ERROR
-
EXTERNAL MACRO CONFIG
- &REST
- PATH
Shorthand to access the current module's configuration. This has to be a macro so that the current package can be captured. See MCONFIG
-
EXTERNAL MACRO CURRENT-MODULE
Macro that expands to the module in the current package. Useful to establish a module context.
-
EXTERNAL MACRO DEFAULTED-CONFIG
- DEFAULT
- &REST
- PATH
Shorthand to set/retrieve a defaulted value from the module's configuration. This has to be a macro so that the current package can be captured. See DEFAULTED-MCONFIG
-
EXTERNAL MACRO DEFINE-API
- NAME
- ARGS
- OPTIONS
- &BODY
- BODY
Defines a new api endpoint. NAME --- The name of the endpoint. This also designates where the endpoint will be reachable. By default any endpoint can be reached on a /api/[name] path. ARGS --- The lambda-list for the arguments to the api endpoint. Usually, unless a specific request-handler is used, only required and optional arguments can be used. Their names correspond to the names that will be used to read out their values from the POST/GET variables of a request. OPTIONS --- A list of options that modify the api endpoint in some way. BODY --- A number of body forms that compose the actual functionality of the api endpoint. Should call API-OUTPUT at some point. A standard uri-dispatcher called API is responsible for calling the api pages when the path /api/ is requested. Api definitions are transformed by options of the type API. See API-OUTPUT See API-ENDPOINT See HANDLER See REQUEST-HANDLER See CALL-API See CALL-API-REQUEST See EXPAND-OPTIONS
-
EXTERNAL MACRO DEFINE-API-FORMAT
- NAME
- ARGSVAR
- &BODY
- BODY
Define a new api format. You should configure the *RESPONSE* to output the properly serialised content of the argument you receive. Note that the structures must be recursively serialised and you may not error when encountering any of the types listed as permitted in API-OUTPUT. See API-FORMAT See API-OUTPUT
-
EXTERNAL MACRO DEFINE-DOCUMENTABLE
- NAME
- DIRECT-SUPERCLASSES
- DIRECT-SLOTS
- &REST
- OPTIONS
Defines a new documentable class. If the class-option :FIND-FUNCTION is given, shortcut functions for DOCUMENTATION are additionally created that allow using just the name of an instance to access the docstring. The find-function is called with a single argument, the name of the instance to find. See DOCUMENTABLE
-
EXTERNAL MACRO DEFINE-HOOK
- NAME
- ARGS
- &OPTIONAL
- DOCUMENTATION
Defines a new hook on which triggers can be defined. The name should be a symbol from the module that the hook should belong to.
-
EXTERNAL MACRO DEFINE-HOOK-SWITCH
- ON
- OFF
- ARGS
No documentation provided. -
EXTERNAL MACRO DEFINE-IMPLEMENT-TRIGGER
- INTERFACE
- &BODY
- BODY
Defines a trigger that will cause the body to be compiled and run once the interface becomes implemented. This is useful if you want to provide parts of a package that depend on an interface being implemented, but do not want to depend on the interface directly. Thus, using this you can achieve optional/soft dependencies. This depends on the IMPLEMENTED hook-switch present on every Radiance interface. Since it is a hook-switch, a trigger like this will be called automatically even if it is defined after the interface has already been implemented. Note that since the body is captured and quoted, and thus no compilation will occur until the hook is triggered. This means that you will potentially miss out on compilation errors or information until later. See DEFINE-INTERFACE
-
EXTERNAL MACRO DEFINE-INTERFACE
- NAME
- &BODY
- COMPONENTS
Define a new module interface. Unlike the native version of this macro, a hook-switch is always defined that provides an IMPLEMENTED and UNIMPLEMENTED hook, which will be called at the appropriate time. This lets you react to when an implementation becomes active and thus conditionally compile code without needing to incur a hard dependency. See MODULARIZE-INTERFACES:DEFINE-INTERFACE See DEFINE-IMPLEMENT-TRIGGER
-
EXTERNAL MACRO DEFINE-INTERFACE-EXTENSION
- NAME
- &BODY
- COMPONENTS
Currently not implemented.
-
EXTERNAL MACRO DEFINE-MATCHING-ROUTE
- NAME
- TYPE
- URIVAR
- DOMAINS
- PORT
- PATH
- &BODY
- BODY
Defines a route where the URI is bound to URIVAR and the body is only evaluated if the tests for the individual parts of the URI pass. See WITH-ROUTE-TEST-BINDINGS See DEFINE-ROUTE
-
EXTERNAL MACRO DEFINE-MODULE
- NAME
- &BODY
- OPTIONS
Defines a new module. This essentially defines a new package with the given name, calls MODULARIZE on it and then expands all options to extend the package/module.
-
EXTERNAL MACRO DEFINE-MODULE-EXTENSION
- MODULE-IDENTIFIER
- NAME
- &BODY
- OPTIONS
Defines a module extension. This gives the existing module new nicknames and expands the given options on it to add functionality.
-
EXTERNAL MACRO DEFINE-OPTION
- TYPE
- NAME
- ARGS
- &BODY
- BODY
Define a new option expander. Option expanders are used to present an extensible mechanism for adding functionality to various definition macros such as DEFINE-PAGE, DEFINE-API, etc. An option expander should return two values: 1. The new list of body forms to use 2. A single form to output before and outside of the definition. The argument list must be congruent with the one defined by the option type plus a final, optional value argument. Usually the arglist will look like so: NAME BODY ARGS* [VALUE] Where NAME is the definition name, BODY is the list of body forms, and ARGS is any number of additional arguments that the option type mandates. See OPTION See EXPAND-OPTIONS
-
EXTERNAL MACRO DEFINE-PAGE
- NAME
- URI
- OPTIONS
- &BODY
- BODY
Defines a new page that can be requested. NAME --- The name of the page. This is merely used to identify it uniquely. URI --- The actual URI on which the page will be found. This is an internal URI. The path is a regex. OPTIONS --- A list of options that modify the page definition in some way. BODY --- A number of body forms that compose the actual functionality of the page. Should set or return suitable data for the response. Page definitions are transformed by options of the type PAGE. See DEFINE-URI-DISPATCHER See EXPAND-OPTIONS
-
EXTERNAL MACRO DEFINE-RESOURCE-LOCATOR
- MODULE
- TYPE
- ARGS
- &BODY
- BODY
Define a resource locator for a given resource type. The arguments list can vary depending on the resource type and even between locators for the same resource. Ultimately the argument list is decided by the locator that ends up being called. Within the body, the local function CALL-DEFAULT-LOCATOR can be used to call the default locator for this resource type. If an attempt is made to define a locator for an inexistent resource type, an error is signalled. See DEFINE-RESOURCE-TYPE See RESOURCE
-
EXTERNAL MACRO DEFINE-RESOURCE-TYPE
- TYPE
- ARGS
- &BODY
- DEFAULT
Define a new resource type. A resource-type defines a way to retrieve a certain kind of information from a module. If DEFAULT is given, a fallback function is defined with it. You can retrieve this fallback by using T as the indent. The first argument of any resource call is always the module it was called for. See DEFINE-RESOURCE-LOCATOR See RESOURCE-TYPE See RESOURCE-LOCATOR See RESOURCE
-
EXTERNAL MACRO DEFINE-ROUTE
- NAME
- DIRECTION
- URIVAR
- &BODY
- BODY
Define a new route. DIRECTION has to be one of :MAPPING :REVERSAL where mapping routes transform URIs from the external to the internal representation and vice- versa. The body should modify the URI object it receives as it sees fit. While in general routes will be called in the context of a request, it is not absolutely necessary. See ROUTE See DEFINE-MATCHING-ROUTE See DEFINE-TARGET-ROUTE See DEFINE-STRING-ROUTE
-
EXTERNAL MACRO DEFINE-STRING-ROUTE
- NAME
- TYPE
- SOURCE
- TARGET
Defines a route where the URI is analysed by the given regex and translated into the interpolated string representation. The target string can reference regex capture groups. Note that the regexes are transformed in order to make the definition appear more "natural". Specifically, if no port is present in the source, it is prefixed with (?:[^/]*)? if no domain is present in source, it is prefixed with [^:/]* if the target does not contain a port, the port is not changed. The source is then surrounded by ^ and $. What this all does in effect is that it prevents regexes from matching too liberally for common URI changes. It allows something like this: /foo/bar => foo/bar to actually match and exchange an uri like this localhost:8080/foo/bar properly into the expected URI foo:8080/bar without changing a URI like this localhost:8080/bla/foo/bar as that would indeed not be what we expected to have specified. If you do not like these automatic changes to the regexes, you can easily enough define your own route that allows you full control. See CL-PPCRE:REGEX-REPLACE See DEFINE-ROUTE
-
EXTERNAL MACRO DEFINE-TARGET-ROUTE
- NAME
- TYPE
- DOMAINS
- PORT
- PATH
- TARGET-DOMAINS
- TARGET-PORT
- TARGET-PATH
Defines a route that attempts to automatically translate the URI according to the given test and result parts. The result parts can reference all variables introduced by the test parts. See DEFINE-MATCHING-ROUTE
-
EXTERNAL MACRO DEFINE-TRIGGER
- HOOK
- ARGS
- &BODY
- BODY
Defines a new trigger on the hook. A trigger can either accept no arguments or it has to match the hook in its arguments list. The name of the trigger defaults to the *PACKAGE*. If you want to have multiple triggers for the same hook in the same package, use a list of the following structure as the HOOK argument: (hook trigger-name hook-module)
-
EXTERNAL MACRO DEFINE-URI-DISPATCHER
- NAME
- URI
- &OPTIONAL
- PRIORITY
- &BODY
- BODY
Defines a new uri-dispatcher. The body forms will be evaluated if DISPATCH is called with a URI object that matches the URI given in the definition and if no other uri-dispatcher precedes this one in their priority. See URI-DISPATCHER See URI-DISPATCHER> See DISPATCH-FUNCTION See DISPATCH
-
EXTERNAL MACRO DEFINE-VERSION-MIGRATION
- SYSTEM
- FROM
- TO
- &BODY
- BODY
A shorthand to define a version migration method for a system. SYSTEM may be a string or symbol naming the ASDF system to define a migration action for. FROM may be NIL, a symbol, or a string naming the source version. TO may be a symbol or a string naming the target version. BODY should be a number of forms to be executed when the system is moved from the source version to the target version. See MIGRATE-VERSIONS
-
EXTERNAL MACRO OR*
- &REST
- VALS
Similar to OR, but treats empty strings as NIL. This is often handy in the context of query parameters from the outside world where an empty string represents no value.
-
EXTERNAL MACRO PERM
- &REST
- TREE
Macro to encompass a permission. You should use this wherever you reference a permission. Using this will ensure that the permission is registered with your module and thus inspectable from the outside.
-
EXTERNAL MACRO REMCONFIG
- &REST
- PATH
Shorthand to remove a place from the module's configuration This has to be a macro so that the current package can be captured. See REMMCONFIG
-
EXTERNAL MACRO WITH-ACTIONS
- ERROR
- INFO
- ACTION-CLAUSES
- &BODY
- BODY
A macro to help handle different actions in a submission context. ERROR and INFO are variables that hold objects that describe error and information messages that occurred during the handling of the action. First, the actual action is read out of the POST/GET variable "action". Then the matching action-clause, if any, is evaluated. If an error occurs during the evaluation thereof, the error is stored in the ERROR variable. After the action clause processing has finished, the body forms are evaluated. ACTION-CLAUSES ::= (clause body-form*) CLAUSE --- A string designator that names the action
-
ADMIN
- MODULARIZE.INT.ADMIN
- MODULARIZE.MOD.ADMIN
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *IMPLEMENTATION*
No documentation provided. -
EXTERNAL RESOURCE-TYPE PAGE
Returns an internal URI that points to the requested page. The following values are returned: 1. URI 2. QUERY-ALIST 3. FRAGMENT The QUERY-ALIST and FRAGMENT can be used as arguments to URI-TO-URL. By default a page with the name corresponding to the symbol of the given name in the module's package is used if available. However, a module or interface may special-case certain page names to provide a specified name to point to a page of particular interest.
-
EXTERNAL HOOK IMPLEMENTED
No documentation provided. -
EXTERNAL HOOK UNIMPLEMENTED
No documentation provided. -
EXTERNAL FUNCTION IMPLEMENTATION
No documentation provided. -
EXTERNAL FUNCTION (SETF IMPLEMENTATION)
- VALUE6
No documentation provided. -
EXTERNAL FUNCTION LIST-PANELS
Returns an alist of panel categories and their panels. See ADMIN:DEFINE-PANEL See ADMIN:REMOVE-PANEL
-
EXTERNAL FUNCTION REMOVE-PANEL
- CATEGORY
- NAME
Removes the specified panel if it exists. See ADMIN:DEFINE-PANEL
-
EXTERNAL MACRO DEFINE-PANEL
- CATEGORY
- NAME
- OPTIONS
- &BODY
- BODY
Defines a new administration panel. Category and panel names are case-insensitive. This is similar to DEFINE-PAGE, except it defines a panel within the administration interface. The body code should return HTML data to be emitted into the interface. Do not emit root elements such as <HTML> or <BODY>. The panel definition can be extended through the ADMIN:PANEL option. By default, the following options are guaranteed to exist: :ACCESS Will restrict access to it to users that pass the permission check. See USER:CHECK. :ICON Selects an icon to use for the panel in the administration's menu. The accepted range of values is implementation-dependant. :TOOLTIP A tooltip string to show when hovering over the panel entry in the administration's menu. In order to obtain the internal URI to an admin panel, use the PAGE resource with the category and panel names as arguments. See ADMIN:LIST-PANELS See ADMIN:REMOVE-PANEL
-
AUTH
- MODULARIZE.INT.AUTH
- MODULARIZE.MOD.AUTH
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *IMPLEMENTATION*
No documentation provided. -
EXTERNAL SPECIAL-VARIABLE *LOGIN-TIMEOUT*
The time, in seconds, for which an authenticated user should remain authenticated.
-
EXTERNAL RESOURCE-TYPE PAGE
Returns an internal URI that points to the requested page. The following values are returned: 1. URI 2. QUERY-ALIST 3. FRAGMENT The QUERY-ALIST and FRAGMENT can be used as arguments to URI-TO-URL. By default a page with the name corresponding to the symbol of the given name in the module's package is used if available. However, a module or interface may special-case certain page names to provide a specified name to point to a page of particular interest.
-
EXTERNAL HOOK ASSOCIATE
- SESSION
This hook is called when a session is associated with a user. The hook has an argument, the session object. You can retrieve the associated user through AUTH:CURRENT. See AUTH:CURRENT
-
EXTERNAL HOOK IMPLEMENTED
No documentation provided. -
EXTERNAL HOOK NO-ASSOCIATED-USER
This hook is called when AUTH:CURRENT is called but no user is found in the session. The hook has an argument, the session object. Triggers on this hook may associate new users at this time by using AUTH:ASSOCIATE. If a new user is associated by this hook, this user is returned by the original AUTH:CURRENT call. This allows third-party libraries to implement additional authentication mechanisms. See AUTH:CURRENT
-
EXTERNAL HOOK UNIMPLEMENTED
No documentation provided. -
EXTERNAL FUNCTION ASSOCIATE
- USER
- &OPTIONAL
- SESSION
Associates (authenticates) the user with the given session. If no session is passed, the one of the current request is retrieved by SESSION:GET. This effectively logs the session in as the user and makes it gain all permissions the user has. If the session was associated with a user already, the associated user is replaced. The auth interface must also provide a way for a user to authenticate themselves through a page. You can gain an internal URI to that page by the page resource and the page name "login". It accepts a single extra argument, which is t he URI or URL to redirect to after a successful login. If this argument is the string "#" the value of the current request's REFERER is used. The exact means by which a user can authenticate themselves on said page are implementation dependant. See SESSION:GET See AUTH:CURRENT
-
EXTERNAL FUNCTION CURRENT
- &OPTIONAL
- DEFAULT
- SESSION
Returns the user object that is authenticated with the given session. If no session is passed, the one of the current request is retrieved by SESSION:GET. If the session is not authenticated, the user designated by DEFAULT is returned instead, if given. If DEFAULT is NIL, then NIL is returned. See SESSION:GET See AUTH:ASSOCIATE
-
EXTERNAL FUNCTION IMPLEMENTATION
No documentation provided. -
EXTERNAL FUNCTION (SETF IMPLEMENTATION)
- VALUE3
No documentation provided.
-
BAN
- MODULARIZE.INT.BAN
- MODULARIZE.MOD.BAN
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *IMPLEMENTATION*
No documentation provided. -
EXTERNAL HOOK IMPLEMENTED
No documentation provided. -
EXTERNAL HOOK UNIMPLEMENTED
No documentation provided. -
EXTERNAL FUNCTION IMPLEMENTATION
No documentation provided. -
EXTERNAL FUNCTION (SETF IMPLEMENTATION)
- VALUE3
No documentation provided. -
EXTERNAL FUNCTION JAIL
- IP
- &KEY
- DURATION
Ban the given IP. The IP may be in IPv4 or IPv6 format as a string. The duration must be either an integer denoting the number of seconds to ban for, or T in which case the duration is taken as being infinite. If no duration is given, an implementation-dependant default is chosen. If the IP is already banned, the ban duration is extended by the given amount. See BAN:LIST See BAN:RELEASE
-
EXTERNAL FUNCTION JAIL-TIME
- &OPTIONAL
- IP
Returns the number of seconds the IP has left on its ban, T for infinity, or NIL for none. See BAN:JAIL See BAN:RELEASE
-
EXTERNAL FUNCTION LIST
Returns a list of banned IP addresses. See BAN:JAIL-TIME
-
EXTERNAL FUNCTION RELEASE
- IP
No documentation provided.
-
CACHE
- MODULARIZE.INT.CACHE
- MODULARIZE.MOD.CACHE
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *IMPLEMENTATION*
No documentation provided. -
EXTERNAL HOOK IMPLEMENTED
No documentation provided. -
EXTERNAL HOOK UNIMPLEMENTED
No documentation provided. -
EXTERNAL FUNCTION GET
- NAME
- &OPTIONAL
- VARIANT
Returns the contents cached under the given name and variant, if any. See CACHE:WITH-CACHE
-
EXTERNAL FUNCTION IMPLEMENTATION
No documentation provided. -
EXTERNAL FUNCTION (SETF IMPLEMENTATION)
- VALUE3
No documentation provided. -
EXTERNAL FUNCTION RENEW
- NAME
- &OPTIONAL
- VARIANT
Clears out the cache under the given name and variant and potentially refreshes it. The refresh may be deferred until the next time the associated WITH-CACHE form is evaluated. See CACHE:GET See CACHE:WITH-CACHE
-
EXTERNAL MACRO WITH-CACHE
- NAME
- &OPTIONAL
- VARIANT
- TEST-FORM
- &BODY
- REQUEST-GENERATOR
Caches the return value produced by the body under the name. The name is not evaluated and must be a direct symbol, but the variant is evaluated. Every time this form is evaluated, the TEST-FORM is evaluated. If it returns non-NIL, the body is evaluated and its return value is cached under the given name. If it returns T and the body has not yet been cached, then it is evaluated as well. Otherwise, the body is not evaluated and the cached value is returned instead. See CACHE:RENEW See CACHE:GET
-
DATABASE
- DB
- MODULARIZE.INT.DATABASE
- MODULARIZE.MOD.DATABASE
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *IMPLEMENTATION*
No documentation provided. -
EXTERNAL CONDITION COLLECTION-ALREADY-EXISTS
Error signalled when a new collection is attempted to be created where an old one already exists. See DATABASE:COLLECTION-CONDITION
-
EXTERNAL CONDITION COLLECTION-CONDITION
Base condition type for collection related conditions. See DATABASE:CONDITION See DATABASE:INVALID-COLLECTION See DATABASE:COLLECTION-ALREADY-EXISTS See DATABASE:INVALID-FIELD
-
EXTERNAL CONDITION CONDITION
Base condition type for all database related conditions. See DATABASE:CONNECTION-FAILED See DATABASE:CONNECTION-ALREADY-OPEN See DATABASE:COLLECTION-CONDITION See DATABASE:INVALID-COLLECTION See DATABASE:COLLECTION-ALREADY-EXISTS See DATABASE:INVALID-FIELD
-
EXTERNAL CONDITION CONNECTION-ALREADY-OPEN
Warning signalled when a new connection is established while an old one was already open. See DATABASE:CONDITION
-
EXTERNAL CONDITION CONNECTION-FAILED
Error signalled upon a failed connection attempt. See DATABASE:CONDITION
-
EXTERNAL CONDITION INVALID-COLLECTION
Error signalled when an invalidly named, or inexistent collection is accessed. See DATABASE:COLLECTION-CONDITION
-
EXTERNAL CONDITION INVALID-FIELD
Error signalled when an invalid field name or type is used. See DATABASE:COLLECTION-CONDITION
-
EXTERNAL TYPE-DEFINITION ID
Effective type of values for ID-type fields in a collection. See DATABASE:ENSURE-ID
-
EXTERNAL HOOK CONNECTED
- NAME
This hook is triggered after the database has been connected. The name of the connection is passed as an argument. Note that this is a sticky hook and will remain active until DATABASE:DISCONNECTED is triggered.
-
EXTERNAL HOOK DISCONNECTED
- NAME
This hook is triggered after the database has been disconnected. The name of the connection is passed as an argument. Note that this causes the DATABASE:CONNECTED hook to become unstickied.
-
EXTERNAL HOOK IMPLEMENTED
No documentation provided. -
EXTERNAL HOOK UNIMPLEMENTED
No documentation provided. -
EXTERNAL FUNCTION COLLECTION-EXISTS-P
- COLLECTION
Returns true if a collection of the given name already exists. Signals an error of type INVALID-COLLECTION if the name is not of the proper collection name format. See DATABASE:CREATE
-
EXTERNAL FUNCTION COLLECTIONS
Returns a list of names for all known collections. The names may be either symbols or strings. See DATABASE:CREATE
-
EXTERNAL FUNCTION CONNECT
- DATABASE-NAME
Establishes a connection to the database of the given name. The database connection must be configured by some implementation-defined manner beforehand. If the implementation cannot automatically configure itself, or cannot find a database of the requested name, an error of type DATABASE:CONNECTION-FAILED is signalled. If a previous connection is already open and a new one is attempted, a warning of type DATABASE:CONNECTION-ALREADY-OPEN is signalled, the previous connection is closed, and the new one is opened. If the connection fails for some other reason, an error of type DATABASE:CONNECTION-FAILED is signalled. Upon successful connection, the DATABASE:CONNECTED hook is triggered. Attempting to perform any database operations aside from connecting or disconnecting before a connection has been established results in undefined behaviour. See DATABASE:CONNECTED See DATABASE:DISCONNECT See DATABASE:CONNECTION-FAILED See DATABASE:CONNECTION-ALREADY-OPEN
-
EXTERNAL FUNCTION CONNECTED-P
Returns true if the database is currently connected. See DATABASE:CONNECT See DATABASE:DISCONNECT
-
EXTERNAL FUNCTION COUNT
- COLLECTION
- QUERY
Returns the number of records in the collection that match the query. The QUERY must be a value returned by the DATABASE:QUERY macro. If an invalid or inexistent collection name is passed, an error of type DATABASE:INVALID-COLLECTION is signalled. See DATABASE:CREATE See DATABASE:QUERY See DATABASE:INVALID-COLLECTION
-
EXTERNAL FUNCTION CREATE
- COLLECTION
- STRUCTURE
- &KEY
- INDICES
- IF-EXISTS
Creates a new collection on the database. COLLECTION must be a valid collection name. Namely, it must be either a symbol or a string, limited to the following set of characters: ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789-_/ Symbol names are coerced to string names in the following manner: A slash and the name of the symbol's package are prepended to the symbol's name. Thus, a symbol's name and package must be limited to the above set of characters in order to be usable as a collection name. The structure denotes the schema of the collection and must be of the following structure: STRUCTURE ::= (FIELD*) FIELD ::= (NAME TYPE) TYPE ::= ID | :text | :float | :boolean | VARCHAR | INTEGER ID ::= :id | (:id COLLECTION) INTEGER ::= :integer | (:integer BYTES) VARCHAR ::= (:varchar LENGTH) A valid name can be either a symbol or a string, where the symbol's name/string must underlie the same character restrictions as a collection name. The types of a field are specified as follows: :ID An implementation-defined type that is used to uniquely identify a record within a collection. :TEXT A string of arbitrary length. :FLOAT A double-float. :BOOLEAN A boolean (NIL or T) value. :INTEGER A signed integer within the range denoted by the number of bytes of its size in one's complement. Attempting to store a value outside of this range leads to undefined behaviour. The default number of bytes is 4. The maximum number of bytes that can be requested is 8. :VARCHAR A string of variable size but with a maximum length. Attempting to store a string beyond that length leads to undefined behaviour. If an invalid field name or field type is specified, an error of type DATABASE:INVALID-FIELD is signalled. The implementation is allowed to upgrade any field type to a type that can encompass the specified range and more. For example, an implementation is permitted to upgrade an (:integer 4) to an (:integer 8) or a (:varchar 5) to :text. If a COLLECTION is passed to an :ID field, the field is called a "reference field", and the ID must be of a record in the referenced collection. Upon inserting or updating a record with a reference field, the implementation may check that the referenced record does exist and, if it does not exist, will signal an error. Similarly, an implementation may delete records with a reference field if the record being referenced is deleted. This is commonly referred to as cascading deletes. Note that an implementation either must always perform the check or never, and must always perform the cascading delete or never. It must be predictable in the behaviour, if the behaviour is specified. The implementation may support additional field types not specified here. The implementation may or may not permit you to store data in fields outside of the ones specified in the structure of the collection. Each collection will always include a field called "_id" of type :ID that is filled by the implementation on record creation. IT stores the unique ID of the record within the collection. The concrete type of the ID is implementation- dependant. INDICES is a list of field names that should be indexed for fast access. The implementation is urged to optimise access to the fields, but is not required to. IF-EXISTS denotes the behaviour in case a collection of the same name already exists. The behaviour is as follows: :IGNORE Return NIL. This is the default. :ERROR Signal an error of type DATABASE:COLLECTION-ALREADY-EXISTS. :SUPERSEDE Drop the old collection and create a new one. If a new collection is created successfully, a non-NIL value is returned. See DATABASE:ID See DATABASE:STRUCTURE See DATABASE:COLLECTIONS See DATABASE:COLLECTION-EXISTS-P See DATABASE:DROP See DATABASE:INVALID-COLLECTION See DATABASE:COLLECTION-ALREADY-EXISTS See DATABASE:INVALID-FIELD
-
EXTERNAL FUNCTION DISCONNECT
Closes the current database connection, if any. Upon successful disconnect, the DATABASE:DISCONNECTED hook is triggered. See DATABASE:CONNECT See DATABASE:DISCONNECTED
-
EXTERNAL FUNCTION DROP
- COLLECTION
Deletes the collection entirely, including all of its data. If an invalid or inexistent collection name is passed, an error of type DATABASE:INVALID-COLLECTION is signalled. See DATABASE:CREATE
-
EXTERNAL FUNCTION EMPTY
- COLLECTION
Clears all records from the collection, making it empty. If an invalid or inexistent collection name is passed, an error of type DATABASE:INVALID-COLLECTION is signalled. Note that this may also clear the ID sequence, meaning that IDs produced for records after the emptying of the collection may be equal to IDs produced before the emptying. See DATABASE:CREATE
-
EXTERNAL FUNCTION ENSURE-ID
- ID-ISH
Coerces the given string into an ID, if possible. May signal an error on invalidly structured or invalid ID. The return value is of type DATABASE:ID See DATABASE:ID
-
EXTERNAL FUNCTION IMPLEMENTATION
No documentation provided. -
EXTERNAL FUNCTION (SETF IMPLEMENTATION)
- VALUE3
No documentation provided. -
EXTERNAL FUNCTION INSERT
- COLLECTION
- DATA
Inserts a new record into the collection. The DATA can be formatted as either an alist or a hash- table. If the data includes fields that are not defined in the structure of the collection, the implementation may signal an error of type DATABASE:INVALID-FIELD. If the data does not include a field that is defined in the structure of the collection, the field's value is set to NIL. If a data value is specified that does not match the field's type, an error of type DATABASE:INVALID-FIELD may be signalled. If the insertion of the record fails for whatever reason, an error of type DATABASE:CONDITION is signalled. On successful insert, the value of the "_id" field for the newly created record is returned. If an invalid or inexistent collection name is passed, an error of type DATABASE:INVALID-COLLECTION is signalled. See DATABASE:CREATE See DATABASE:CONDITION See DATABASE:INVALID-COLLECTION
-
EXTERNAL FUNCTION ITERATE
- COLLECTION
- QUERY
- FUNCTION
- &KEY
- FIELDS
- SKIP
- AMOUNT
- SORT
- UNIQUE
- ACCUMULATE
Iterates over the records in the collection that match the clauses. Effectively, FUNCTION is called with a single argument-- a hash-table filled with the requested field values-- for each record in the collection that satisfies the QUERY. The fields in the table are keyed by their name as a string with the case converted downwards. The consequences of calling another DATABASE function from within the FUNCTION are implementation dependant. The QUERY must be a value returned by the DATABASE:QUERY macro. If FIELDS is NIL, all fields are included. Otherwise it can be a list of field names to include in each record. The database may store more fields than were requested, but never less. If UNIQUE is non-NIL and FIELDS is a list of at least one field, records are only considered to match if the same record (each field compared under EQUAL) has not appeared previously. If SORT is NIL, the order in which the records are passed is unpredictable and may be random with every call. Otherwise, SORT should be a list of lists, where each inner list should contain the name of a field, and either :ASC or :DSC for ascending or descending order. SKIP specifies the number of matching records to skip. If AMOUNT is NIL, all matching records are passed. Otherwise it poses an upper bound on the number of records that the function is called with. If ACCUMULATE is non-NIL, then the values returned by the function call are accumulated into a list and returned by the DATABASE:ITERATE call. If an invalid or inexistent field name is specified, an error of type DATABASE:INVALID-FIELD is signalled. If an invalid or inexistent collection name is passed, an error of type DATABASE:INVALID-COLLECTION is signalled. See DATABASE:CREATE See DATABASE:SELECT See DATABASE:QUERY See DATABASE:INVALID-COLLECTION See DATABASE:INVALID-FIELD
-
EXTERNAL FUNCTION REMOVE
- COLLECTION
- QUERY
- &KEY
- SKIP
- AMOUNT
- SORT
Removes the records in the collection that match the clauses. See DATABASE:ITERATE for an explanation of the options. If the removal of the records fails for whatever reason, an error of type DATABASE:CONDITION is signalled. If an invalid or inexistent collection name is passed, an error of type DATABASE:INVALID-COLLECTION is signalled. See DATABASE:CREATE See DATABASE:ITERATE See DATABASE:INVALID-COLLECTION
-
EXTERNAL FUNCTION SELECT
- COLLECTION
- QUERY
- &KEY
- FIELDS
- SKIP
- AMOUNT
- SORT
- UNIQUE
Returns a list of hash-tables for the records that match the clauses. See DATABASE:ITERATE for an explanation of the options. The QUERY must be a value returned by the DATABASE:QUERY macro. If an invalid or inexistent field name is requested, an error of type DATABASE:INVALID-FIELD is signalled. If an invalid or inexistent collection name is passed, an error of type DATABASE:INVALID-COLLECTION is signalled. See DATABASE:CREATE See DATABASE:ITERATE See DATABASE:QUERY See DATABASE:INVALID-COLLECTION See DATABASE:INVALID-FIELD
-
EXTERNAL FUNCTION STRUCTURE
- COLLECTION
Returns the structure of the collection. If an invalid or inexistent collection name is passed, an error of type DATABASE:INVALID-COLLECTION is signalled. Note that the value returned by this does not have to be identical to the structure used to create the collection. The types in the returned structure may be upgraded variants of the defined types. The types returned do not have to correspond to the concrete types used to actually store the data. See DATABASE:CREATE
-
EXTERNAL FUNCTION UPDATE
- COLLECTION
- QUERY
- DATA
- &KEY
- SKIP
- AMOUNT
- SORT
Updates the records in the collection that match the clauses with the new data. See DATABASE:ITERATE for an explanation of the options. The DATA can be formatted as either an alist or a hash- table. If the data includes fields that are not defined in the structure of the collection, the implementation may signal an error of type DATABASE:INVALID-FIELD. If the data does not include a field that is defined in the structure of the collection, the field's value is not changed. If a data value is specified that does not match the field's type, an error of type DATABASE:INVALID-FIELD may be signalled. If the updating of the records fails for whatever reason, an error of type DATABASE:CONDITION is signalled. If an invalid or inexistent collection name is passed, an error of type DATABASE:INVALID-COLLECTION is signalled. See DATABASE:CREATE See DATABASE:ITERATE See DATABASE:INVALID-COLLECTION
-
EXTERNAL MACRO QUERY
- QUERY-FORM
Constructs a value to be used for the QUERY argument in database operations. The query form must be of the following structure: FORM ::= COMBINE | CLAUSE | :all COMBINE ::= (:and FORM*) | (:or FORM*) | (:not FORM) CLAUSE ::= (OPERATOR VALUE VALUE) | (:in VALUE VALUE*) | (:NULL VALUE) OPERATOR ::= := | :/= | :> | :< | :<= | :>= | :MATCHES | :MATCHES* VALUE ::= (:field NAME) | 'NAME | LFORM NAME --- A field name. LFORM --- A lisp form that evaluates to a lisp value. Where the combinators have the following effect: :AND The form is true if all of the subforms are true. :OR The form is true if one of the subforms is true. :NOT The form is true if the subform is not true. And the clauses have the following comparison behaviour: := True if the two values are EQUAL. :/= True if the two values are not EQUAL. :> True if the two values are > if they are both of type :integer or :float, or STRING> if they are both of type :varchar or :text. :< True if the two values are < if they are both of type :integer or :float, or STRING< if they are both of type :varchar or :text :<= True if the two values are <= if they are both of type :integer or :float, or STRING<= if they are both of type :varchar or :text :>= True if the two values are > if they are both of type :integer or :float, or STRING>= if they are both of type :varchar or :text :NULL True if the value is unset. :MATCHES True if the first value matches the regular expression of the second value. The extent of regular-expression syntax support is up to the implementation, but the following basic operators must be understood: . [] [^] * + ? () {} \ ^ $ | The following character classes must be understood as well: \d \w \s \D \W \S :MATCHES* Same as :MATCHES except the match is performed in case insensitive mode. :IN True if the first value is EQUAL to one of the remaining values. If the form does not correspond to the above description, an error is signalled at macro expansion time. Note that a special exception is made in the case of fields of type ID, where the equality comparison (:=, :!=, :IN) is performed in an implementation-dependant manner. The other comparison operators cannot be used with ID type fields. If the form is simply :all, all records in the collection are returned. Examples for queries: (db:query (:= 'name "Hans")) Matches all records with a name field of "Hans". (db:query (:= '_id id)) Matches the record with the ID equivalent to the one stored in the ID variable. (db:query (:and (:= 'health 0) (:= 'lives 0))) Matches all records where the health and lives fields are 0. (db:query (:IN 'name "Guybrush" "Elaine" "LeChuck")) Matches all records where the name is one of "Guybrush", "Elaine", or "LeChuck". (db:query (:MATCHES 'tags "^foo$|^foo,|,foo$|,foo,")) Matches all records whose tags includes the "foo" tag. See DATABASE:CREATE See DATABASE:ITERATE See DATABASE:SELECT See DATABASE:COUNT See DATABASE:REMOVE See DATABASE:UPDATE
-
EXTERNAL MACRO WITH-TRANSACTION
- &BODY
- BODY
Performs the database operations in its body within a transaction that ensures coherence. If two transactions occur in parallel that would each modify the same set of data and conflict in some manner, one of the two transactions must be aborted by way of an error being signalled. If the transaction body is exited abnormally, which is to say exited before the last form in the body has finished execution and can return its value, all the database operations that were performed within the body are reverted in such a way that it appears as if they had never been performed in the first place.
-
RELATIONAL-DATABASE
- RDB
- MODULARIZE.INT.RELATIONAL-DATABASE
- MODULARIZE.MOD.RELATIONAL-DATABASE
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *IMPLEMENTATION*
No documentation provided. -
EXTERNAL HOOK IMPLEMENTED
No documentation provided. -
EXTERNAL HOOK UNIMPLEMENTED
No documentation provided. -
EXTERNAL FUNCTION IMPLEMENTATION
No documentation provided. -
EXTERNAL FUNCTION (SETF IMPLEMENTATION)
- VALUE3
No documentation provided. -
EXTERNAL FUNCTION SQL
- QUERY
- &REST
- VARS
Execute a raw SQL prepared statement. SQL should be a SQL query in string form, with placeholder variables being denoted as a question mark (?). Those variables must be provided in the &rest arguments of the call. The return value is the same as for a DB:SELECT call, meaning all matched rows are returned as a list of hash tables. Please note that the exact set of supported SQL features, operators, types, and syntax are implementation-dependant. In order to ensure compatibility with different implementations, you should restrict your queries to standard SQL. An implementation MAY rewrite your query. For the proper name conversion of collections to table names, please see DATABASE:CREATE. See DATABASE:SELECT See DATABASE:CREATE
-
EXTERNAL MACRO JOIN
- LEFT-COLLECTION
- LEFT-FIELD
- RIGHT-COLLECTION
- RIGHT-FIELD
- &OPTIONAL
- TYPE
Constructs a value to be used for the COLLECTION argument in database operations. Using this for a COLLECTION is as if there were a real collection that had the joined records as designated by this construct. LEFT-COLLECTION and RIGHT-COLLECTION must follow this syntax: COLLECTION ::= NAME | (OPERAND OPERAND &optional TYPE) TYPE ::= :INNER | :LEFT | :RIGHT | :OUTER OPERAND ::= (COLLECTION FIELD) NAME --- A collection name. FIELD --- A field name. The COLLECTION recursion allows joining more than two collections together. TYPE designates the type of join and may take the following values: :INNER --- Only records that match in both left and right are included in the result. :LEFT --- Include all records from the left table and those that match in the right collection. Fields from the right side on records that did not match will be NIL. :RIGHT --- Include all records from the right collection and those that match in the left collection. Fields from the left side on records that did not match will be NIL. :OUTER --- Include all records from the left and right collections. Fields from the left or right side on records that do not have a matching left or right side will be NIL. The matching mentioned here only relates to the respective FIELD of both sides being considered equal (by := of a QUERY), not to any possible additional constraint on the records imposed by a QUERY argument passed to the database operation the JOIN was passed to. Fields from both the left and right hand side of a join are merged into the same namespace. The consequences of accessing a field, be that through a QUERY or by reading it out of the resulting records, with a name that exists in both the left and right collections is implementation dependant. See DATABASE:QUERY See DATABASE:ITERATE See DATABASE:SELECT See DATABASE:COUNT See DATABASE:REMOVE See DATABASE:UPDATE
-
LOGGER
- L
- MODULARIZE.INT.LOGGER
- MODULARIZE.MOD.LOGGER
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *IMPLEMENTATION*
No documentation provided. -
EXTERNAL HOOK IMPLEMENTED
No documentation provided. -
EXTERNAL HOOK UNIMPLEMENTED
No documentation provided. -
EXTERNAL FUNCTION DEBUG
- CATEGORY
- LOG-STRING
- &REST
- FORMAT-ARGS
Logs the given message in the category as a debug message. See LOGGER:LOG
-
EXTERNAL FUNCTION ERROR
- CATEGORY
- LOG-STRING
- &REST
- FORMAT-ARGS
Logs the given message in the category as an error message. See LOGGER:LOG
-
EXTERNAL FUNCTION FATAL
- CATEGORY
- LOG-STRING
- &REST
- FORMAT-ARGS
Logs the given message in the category as a fatal message. See LOGGER:LOG
-
EXTERNAL FUNCTION IMPLEMENTATION
No documentation provided. -
EXTERNAL FUNCTION (SETF IMPLEMENTATION)
- VALUE3
No documentation provided. -
EXTERNAL FUNCTION INFO
- CATEGORY
- LOG-STRING
- &REST
- FORMAT-ARGS
Logs the given message in the category as an information message. See LOGGER:LOG
-
EXTERNAL FUNCTION LOG
- LEVEL
- CATEGORY
- LOG-STRING
- &REST
- FORMAT-ARGS
Logs the given message under the level. LEVEL has to be one of :TRACE :DEBUG :INFO :WARN :ERROR :SEVERE :FATAL. Note that the exact means by which the message is presented or logged is up to the implementation. See LOGGER:TRACE See LOGGER:DEBUG See LOGGER:INFO See LOGGER:WARN See LOGGER:ERROR See LOGGER:SEVERE See LOGGER:FATAL
-
EXTERNAL FUNCTION SEVERE
- CATEGORY
- LOG-STRING
- &REST
- FORMAT-ARGS
Logs the given message in the category as a severe message. See LOGGER:LOG
-
EXTERNAL FUNCTION TRACE
- CATEGORY
- LOG-STRING
- &REST
- FORMAT-ARGS
Logs the given message in the category as a trace message. See LOGGER:LOG
-
EXTERNAL FUNCTION WARN
- CATEGORY
- LOG-STRING
- &REST
- FORMAT-ARGS
Logs the given message in the category as a warning message. See LOGGER:LOG
-
MAIL
- MODULARIZE.INT.MAIL
- MODULARIZE.MOD.MAIL
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *IMPLEMENTATION*
No documentation provided. -
EXTERNAL HOOK IMPLEMENTED
No documentation provided. -
EXTERNAL HOOK SEND
- TO
- SUBJECT
- MESSAGE
This hook is triggered right before a mail is sent out. The recipient, subject, and body text are passed as arguments. See MAIL:SEND
-
EXTERNAL HOOK UNIMPLEMENTED
No documentation provided. -
EXTERNAL FUNCTION IMPLEMENTATION
No documentation provided. -
EXTERNAL FUNCTION (SETF IMPLEMENTATION)
- VALUE3
No documentation provided. -
EXTERNAL FUNCTION SEND
- TO
- SUBJECT
- MESSAGE
Sends an email to the specified address. If the sending of the email should fail, an error must be signalled. This function may be extended with additional keyword arguments if the implementation supports extraneous information, such as additional headers, attachments, and so forth.
-
PROFILE
- MODULARIZE.INT.PROFILE
- MODULARIZE.MOD.PROFILE
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *IMPLEMENTATION*
No documentation provided. -
EXTERNAL RESOURCE-TYPE PAGE
Returns an internal URI that points to the requested page. The following values are returned: 1. URI 2. QUERY-ALIST 3. FRAGMENT The QUERY-ALIST and FRAGMENT can be used as arguments to URI-TO-URL. By default a page with the name corresponding to the symbol of the given name in the module's package is used if available. However, a module or interface may special-case certain page names to provide a specified name to point to a page of particular interest.
-
EXTERNAL HOOK IMPLEMENTED
No documentation provided. -
EXTERNAL HOOK UNIMPLEMENTED
No documentation provided. -
EXTERNAL FUNCTION ADD-FIELD
- NAME
- &KEY
- TYPE
- DEFAULT
- EDITABLE
Adds a custom profile field that is visible on the user's profile. These fields can be used to store public information such as counters, stats, birthday, bio, etc. If EDITABLE is non-NIL, the user is allowed to change the field themselves. TYPE can be one of the following: text textarea password email url time date datetime-local month week color number range checkbox radio file tel The type is mostly useful for the display presentation to the user. The actual lisp data type used to store the field is a string. Note that this only stores the intended interpretation of a field, not the field itself. See PROFILE:FIELDS See PROFILE:REMOVE-FIELD
-
EXTERNAL FUNCTION AVATAR
- USER
- SIZE
Returns a full URL to an avatar image for the user. The size of the image should approximate the one passed as an argument, in pixels. It must however not be exact. You have to take care to scale the image to the appropriate size on the client regardless. The size specified here is only useful to optimise the image size for transfer speed.
-
EXTERNAL FUNCTION FIELDS
Returns a list of defined fields. Each field is an alist with the following keys defined: :NAME :TYPE :DEFAULT :EDITABLE The actual value of the fields can be accessed through the USER:FIELD accessor. See PROFILE:ADD-FIELD See PROFILE:REMOVE-FIELD See USER:FIELD
-
EXTERNAL FUNCTION IMPLEMENTATION
No documentation provided. -
EXTERNAL FUNCTION (SETF IMPLEMENTATION)
- VALUE3
No documentation provided. -
EXTERNAL FUNCTION LIST-PANELS
Returns a list of profile panel names. See PROFILE:REMOVE-PANEL See PROFILE:DEFINE-PANEL
-
EXTERNAL FUNCTION NAME
- USER
Returns the "display name" of the user. The display name is a name that, unlike the username, can be changed and the user deems preferable over the username.
-
EXTERNAL FUNCTION REMOVE-FIELD
- NAME
Removes the given field information, if it exists. See PROFILE:ADD-FIELD See PROFILE:FIELDS
-
EXTERNAL FUNCTION REMOVE-PANEL
- NAME
Removes the panel of the given name. See PROFILE:LIST-PANELS See PROFILE:DEFINE-PANEL
-
EXTERNAL MACRO DEFINE-PANEL
- NAME
- OPTIONS
- &BODY
- BODY
Defines a new panel to be shown on the user profile. This is similar to DEFINE-PAGE, except it defines a panel within the user profile interface. The body code should return HTML data to be emitted into the interface. Do not emit root elements such as <HTML> or <BODY>. The panel definition can be extended through the PROFILE:PANEL option. By default, the following options are guaranteed to exist: :ACCESS Will restrict access to it to users that pass the permission check. See USER:CHECK. In order to obtain the internal URI to a profile panel, use the PAGE resource with the user and panel name as arguments. See PROFILE:LIST-PANELS See PROFILE:REMOVE-PANEL
-
RATE
- MODULARIZE.INT.RATE
- MODULARIZE.MOD.RATE
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *IMPLEMENTATION*
No documentation provided. -
EXTERNAL HOOK IMPLEMENTED
No documentation provided. -
EXTERNAL HOOK UNIMPLEMENTED
No documentation provided. -
EXTERNAL FUNCTION IMPLEMENTATION
No documentation provided. -
EXTERNAL FUNCTION (SETF IMPLEMENTATION)
- VALUE3
No documentation provided. -
EXTERNAL FUNCTION LEFT
- RATE
- &KEY
- IP
Returns two values, the number of attempts left, and the number of seconds left until the timeout is over. The user is rate limited if the number of attempts left is zero.
-
EXTERNAL MACRO DEFINE-LIMIT
- NAME
- TIME-LEFT
- &KEY
- TIMEOUT
- LIMIT
- &BODY
- ON-LIMIT-EXCEEDED
Define the behaviour for a rate limitation. TIME-LEFT will be bound to the number of seconds left until the timeout is lifted. The body is the code that will be evaluated when the rate limit was hit. It should probably display an error page and perhaps record the infraction. TIMEOUT should be the interval of rate limiting. LIMIT is the number of attempts that can be made within the TIMEOUT. More straight-forwardly put: A timeout of 30 and limit of 3 means a user can make 3 attempts within 30 seconds. If he tries to make more, he is blocked until the time since the last attempt has reached TIMEOUT seconds. See RATE:LEFT See RATE:WITH-LIMITATION
-
EXTERNAL MACRO WITH-LIMITATION
- LIMIT
- &BODY
- BODY
Evaluates the body within a rate limited environment. The limit must be defined beforehand. The rules defined by the named limit are applied. If the user exceeds the allowed number of attempts and is within rate limitation, the body is not evaluated. See RATE:LEFT See RATE:DEFINE-LIMIT
-
SERVER
- MODULARIZE.INT.SERVER
- MODULARIZE.MOD.SERVER
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *IMPLEMENTATION*
No documentation provided. -
EXTERNAL HOOK IMPLEMENTED
No documentation provided. -
EXTERNAL HOOK STARTED
- NAME
- &KEY
This hook is triggered right after the server has been started. Note that this is a sticky hook and will remain active until SERVER:STOPPED is triggered.
-
EXTERNAL HOOK STOPPED
- NAME
- &KEY
This hook is triggered right after the server has been stopped. Note that this causes the SERVER:STARTED hook to become unstickied.
-
EXTERNAL HOOK UNIMPLEMENTED
No documentation provided. -
EXTERNAL FUNCTION IMPLEMENTATION
No documentation provided. -
EXTERNAL FUNCTION (SETF IMPLEMENTATION)
- VALUE3
No documentation provided. -
EXTERNAL FUNCTION LISTENERS
Returns a list of active listener instances. See SERVER:START See SERVER:STOP
-
EXTERNAL FUNCTION START
- NAME
- &KEY
Starts a listener server. The name must be a keyword. Note that the implementation must include additional keyword arguments that specify the actual instance behaviour such as the port, address, and so forth. However, in order to also allow exotic servers such as pipe-based ones, no such arguments are specified. See the documentation of your implementation of choice. If a server that is similar to the requested one (by name or the provided options), is already started, an error is signalled. On successful start, the SERVER:STARTED hook is triggered. On unsuccessful start, an error is signalled. The server implementation must take care to invoke REQUEST with the proper arguments on an incoming HTTP request, and to send the data contained in the returned response object back. See SERVER:STOP See SERVER:LISTENERS See REQUEST See RESPONSE
-
EXTERNAL FUNCTION STOP
- NAME
Stops the listener server on the given PORT. The name must be a keyword. If no listener with the requested name is found, an error may be signalled. On successful stop, the SERVER:STOPPED hook is triggered. On unsuccessful stop, an error is signalled. See SERVER:START See SERVER:LISTENERS
-
SESSION
- MODULARIZE.INT.SESSION
- MODULARIZE.MOD.SESSION
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *DEFAULT-TIMEOUT*
The default number of seconds a session can stay live for without being used. See SESSION:TIMEOUT
-
EXTERNAL SPECIAL-VARIABLE *IMPLEMENTATION*
No documentation provided. -
EXTERNAL CLASS SESSION
The session object that encapsulates the connection a particular client has to the system. A session uniquely identifies a "client" that connects to the server. The means by which clients are distinguished from each- other and the means by which associated sessions are tracked are implementation-dependant. A session is "active" for a certain period of time. This timeout is reset every time a request is made to the server by the client that is tied to the session. Once the timeout is reached, the session object is no longer considered active and may be removed entirely at any time. Sessions must be able to store arbitrary fields that can be used to store data associated with the session. Each session also has a globally unique ID string that can be used to coerce session objects to storage. See SESSION:= See SESSION:GET See SESSION:LIST See SESSION:ID See SESSION:FIELD See SESSION:TIMEOUT See SESSION:END See SESSION:ACTIVE-P
-
EXTERNAL HOOK CREATE
- SESSION
This hook is triggered when a new session object is started. The session object is passed as an argument.
-
EXTERNAL HOOK IMPLEMENTED
No documentation provided. -
EXTERNAL HOOK UNIMPLEMENTED
No documentation provided. -
EXTERNAL FUNCTION =
- SESSION-A
- SESSION-B
Compares the two session objects and returns true if they represent the same session identity. See SESSION:SESSION
-
EXTERNAL FUNCTION ACTIVE-P
- &OPTIONAL
- SESSION
Returns whether the session is currently active or not. An inactive session will no longer be tied to any future client requests and may be removed at any time. See SESSION:SESSION
-
EXTERNAL FUNCTION END
- &OPTIONAL
- SESSION
Ends the session immediately, making it inactive. See SESSION:SESSION See SESSION:START See SESSION:ACTIVE-P
-
EXTERNAL FUNCTION FIELD
- SESSION/FIELD
- &OPTIONAL
- FIELD
Accessor to an arbitrary data storage field for a session object. If no SESSION-ID is given, the session associated with the current client is used. The keys must be objects comparable under EQL. When a session field is set, the session is automatically started and thus persistently associated with the client as much as possible. See SESSION:SESSION
-
EXTERNAL FUNCTION (SETF FIELD)
- VALUE
- SESSION/FIELD
- &OPTIONAL
- FIELD
No documentation provided. -
EXTERNAL FUNCTION GET
- &OPTIONAL
- SESSION-ID
Retrieves the current session, or a particular one. If no SESSION-ID is given, the session associated with the current client is returned, if any. The SESSION-ID must be a string that is STRING= to one previously obtained by a call to SESSION:ID. See SESSION:SESSION See SESSION:ID
-
EXTERNAL FUNCTION ID
- &OPTIONAL
- SESSION
Returns the globally unique ID of the session as a string. If no SESSION-ID is given, the session associated with the current client is used. The ID must be unique in such a way that no two sessions that are known to the implementation at any time may have the same ID. See SESSION:SESSION
-
EXTERNAL FUNCTION IMPLEMENTATION
No documentation provided. -
EXTERNAL FUNCTION (SETF IMPLEMENTATION)
- VALUE3
No documentation provided. -
EXTERNAL FUNCTION LIST
Returns a fresh list of all known session objects. The sessions may not all be active. Invoking this function may be expensive. See SESSION:SESSION See SESSION:ACTIVE-P
-
EXTERNAL FUNCTION START
Starts a new session in the current request context and returns it. If the request already has a session associated with it, it is not replaced. Once a session has been started, the client must receive the same session on future requests to the server. How this client tracking is achieved is implementation-dependant. See SESSION:SESSION See SESSION:GET See SESSION:END
-
EXTERNAL FUNCTION TIMEOUT
- &OPTIONAL
- SESSION
Accessor to the timeout, in seconds, of the session object. If no SESSION-ID is given, the session associated with the current client is used. See SESSION:SESSION See SESSION:ACTIVE-P
-
EXTERNAL FUNCTION (SETF TIMEOUT)
- SECONDS
- &OPTIONAL
- SESSION
No documentation provided.
-
USER
- MODULARIZE.INT.USER
- MODULARIZE.MOD.USER
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *IMPLEMENTATION*
No documentation provided. -
EXTERNAL CLASS USER
Container for a user. A user is an object that represents a certain person with access to the system. Each user has a uniquely identifying username string of 1-32 case-insensitive characters of the following range: "abcdefghijklmnopqrstuvwxyz0123456789_-." Each user object can store arbitrary information in fields. A user has a set of permissions that describe which protected resources the user should be granted access to. These permissions are laid out in the form of trees, where each permission describes a certain path down a tree. For example, the following permission foo.bar would grant access to the permissions foo.bar, foo.bar.baz and so forth, but not to foo or foo.bam . Permissions can be denoted by either dot-delimited strings, or lists. Note that the user system may need to be readied up first before it can be reliably used. Attempting to perform any user operations before the USER:READY hook has been triggered or after the USER:UNREADY hook has been triggered will result in undefined behaviour. A user object is not required to sync with the backend, and in fact does not need to be identical according to EQ to another user object for the same user. It is thus not a good idea to retain and cache user objects, as the user's attributes might change asynchronously, causing a previous instance to become outdated. See PERM See USER:= See USER:LIST See USER:GET See USER:ID See USER:USERNAME See USER:FIELDS See USER:FIELD See USER:REMOVE See USER:CHECK See USER:GRANT See USER:REVOKE
-
EXTERNAL CONDITION CONDITION
Base condition type for conditions related to the user interface.
-
EXTERNAL CONDITION NOT-FOUND
Condition signalled when an unknown user was requested. See USER:CONDITION See USER:GET
-
EXTERNAL HOOK CREATE
- USER
This hook is triggered when a new user is created. The user object is passed as an argument.
-
EXTERNAL HOOK IMPLEMENTED
No documentation provided. -
EXTERNAL HOOK READY
This hook is called when the user system has become ready and users can be accessed. You should refrain from performing user operations while this hook is untriggered. Note that this is a sticky hook and will remain active until USER:UNREADY is triggered.
-
EXTERNAL HOOK REMOVE
- USER
This hook is triggered when an existing user is removed. The user object is passed as an argument.
-
EXTERNAL HOOK UNIMPLEMENTED
No documentation provided. -
EXTERNAL HOOK UNREADY
This hook is called when the user system is no longer ready and users can no longer be accessed. Note that this causes the USER:READY hook to become unstickied.
-
EXTERNAL FUNCTION =
- USER-A
- USER-B
Compares two user object to see if they denote the same user. See USER:USER
-
EXTERNAL FUNCTION ADD-DEFAULT-PERMISSIONS
- &REST
- BRANCH
Adds the given branches as default permissions to be granted to newly created users. Note that this will not retroactively grant permissions and only comes into effect for users created after a call to this has been run. See USER:USER See USER:GRANT
-
EXTERNAL FUNCTION CHECK
- USER
- BRANCH
Checks whether the user is permitted access to the given permission branch. See USER:USER for a description of permission branches. Note that a permission is granted as long as there is a granted permission on the user that is /higher/ than that which is checked against. Eg, if the user has the permission of foo granted, then checking whether any of foo.bar, foo.bar.baz, etc. are granted will yield true. See USER:USER See USER:GRANT See USER:REVOKE
-
EXTERNAL FUNCTION FIELD
- FIELD
- USER
Accessor to a field on the user. Keys must be strings of a maximum length of 64. Values must be strings, but can be of arbitrary length. See USER:USER See USER:REMOVE-FIELD See USER:FIELDS
-
EXTERNAL FUNCTION (SETF FIELD)
- VALUE
- FIELD
- USER
No documentation provided. -
EXTERNAL FUNCTION FIELDS
- USER
Returns an alist of field names to values of the user. See USER:USER See USER:FIELD See USER:REMOVE-FIELD
-
EXTERNAL FUNCTION GET
- USERNAME/ID
- &KEY
- IF-DOES-NOT-EXIST
Returns the requested user object. The user can be referenced by either a username as a string, or a user ID as an integer. IF-DOES-NOT-EXIST may be one of the following values, which decides on the behaviour in the case where the requested user is not known. :CREATE The user is created. :ERROR An error of type USER:NOT-FOUND is signalled. :ANONYMOUS The anonymous standard user is returned. NIL NIL is returned. The :CREATE option is only valid if the given identifier is a string denoting a username. If :CREATE is used with a user ID, an error is signalled. When a new user is created, the USER:CREATE hook is triggered. The user named "anonymous" must always exist and is automatically created by the implementation. It is intended to be used for unauthenticated users. Note that fetching users while the user system is not yet ready will result in undefined behaviour. See USER:READY See USER:UNREADY See USER:USER
-
EXTERNAL FUNCTION GRANT
- USER
- &REST
- BRANCHES
Grants the user access to the given permission branches. See USER:USER See USER:CHECK See USER:REVOKE
-
EXTERNAL FUNCTION ID
- USER
Returns the integer ID of the user object. This is useful for references to user accounts from database records, as storing the full username is both wasteful and inefficient for searching. See USER:USER
-
EXTERNAL FUNCTION IMPLEMENTATION
No documentation provided. -
EXTERNAL FUNCTION (SETF IMPLEMENTATION)
- VALUE3
No documentation provided. -
EXTERNAL FUNCTION LIST
Returns a fresh list of all known user objects. This may be a very costly operation. See USER:USER
-
EXTERNAL FUNCTION REMOVE
- USER
Removes the given user. This deletes all associated data of the user. On successful deletion, the USER:REMOVE hook is triggered. See USER:USER
-
EXTERNAL FUNCTION REMOVE-FIELD
- FIELD
- USER
Removes the requested field from the user. See USER:USER See USER:FIELD See USER:FIELDS
-
EXTERNAL FUNCTION REVOKE
- USER
- &REST
- BRANCHES
Revokes access from the given permission branches. See USER:USER See USER:CHECK See USER:GRANT
-
EXTERNAL FUNCTION USERNAME
- USER
Returns the username of the requested user. See USER:USER