Common Lisp Package: NINGLE.APP

# Ningle.App - Ningle Application Class. ## SYNOPSIS (defclass <myapp-app> (<app>) ()) (defvar *app* (make-instance '<myapp-app>)) (setf (route *app* "/") "Welcome to ningle!") (setf (ningle:route *app* "/login" :method :POST) #'(lambda (params) (if (authorize (getf params :|username|) (getf params :|password|)) "Authorized!" "Failed...Try again."))) (call *app*) ## DESCRIPTION Ningle.App provides a base class `<app>' for Ningle Applications. ## AUTHOR * Eitarow Fukamachi (e.arrows@gmail.com) ## SEE ALSO * Clack.Component

README:

FUNCTION

Public

NOT-FOUND

An action when no routing rules are found.

Undocumented

NEXT-ROUTE

Private

MAKE-URL-RULE (URL &KEY (METHOD GET) REGEXP)

Construct `<url-rule>` and return it. You must always use this function when you need `<url-rule>`.

Undocumented

DISPATCH-WITH-RULES (RULES)

MEMBER-RULE (PATH-INFO METHOD RULES &KEY ALLOW-HEAD)

GENERIC-FUNCTION

Public

Undocumented

ROUTE (THIS URL-RULE &KEY (METHOD GET))

SETFROUTE (CONTROLLER THIS URL-RULE &KEY (METHOD GET))

Private

Undocumented

MATCH (THIS METHOD URL-STRING &KEY ALLOW-HEAD)

MATCH-URL-RULE-P (RULE URL-RULE METHOD)

SLOT-ACCESSOR

Private

Undocumented

ROUTING-RULES (OBJECT)

SETFROUTING-RULES (NEW-VALUE OBJECT)

VARIABLE

Private

*NEXT-ROUTE-FUNCTION*

A function called when `next-route' is invoked. This will be overwritten in `dispatch-with-rules'.

*REQUEST*

Special variable to store Ningle Request, a instance of `<request>' in Ningle.Request package. Don't set to this variable directly. This is designed to be bound in lexical let.

*RESPONSE*

Special variable to store Ningle Response, a instance of `<response>' in Ningle.Response package. Don't set to this variable directly. This is designed to be bound in lexical let.

CLASS

Public

<APP>

Base class for Ningle Application. All Ningle Application must inherit this class.

Private

Undocumented

<URL-RULE>