Valum
Description:
public namespace Valum
Valum is a Web micro-framework written in Vala.
Content:
Classes:
- AsteriskRoute - Route supporting the asterisk '*'
path.
- Context - Routing context that stores various states for
middleware interaction.
- MatcherRoute - Route based on a
Valum.MatcherCallback.
- PathRoute - Route based on exact path matching.
- RegexRoute - Route based on
GLib.Regex.
- Route - Describe a matching and handling process
for a pair of VSGI.Request and VSGI.Response objects.
- Router - Dispatches incoming requests to the appropriate
registered handler.
- RuleRoute - Route based on the rule system.
Enums:
Delegates:
Methods:
- public HandlerCallback authenticate (Authentication auth, owned AuthCallback callback, owned ForwardCallback<string> forward = forward)
Challenge incoming requests against the provided authentication
definition.
- public HandlerCallback basepath (string path, owned HandlerCallback forward)
Rebase and forward requests which path match the provided basepath.
- public HandlerCallback basic ()
Provide a set of basic behaviours such as status and error handling.
- public HandlerCallback cache_control (CacheControlDirective directive, TimeSpan max_age = 0)
Produce a 'Cache-Control' response header.
- public HandlerCallback decode (DecodeFlags flags = NONE)
Decode any applied 'Content-Encoding'.
- public string[] extract_subdomains (string domain, uint skip = 2)
Extract subdomains from a domain name excluding the top and second
level domain.
- public bool forward (Request req, Response res, NextCallback next) throws Error
Used as a default value when all that is necessary is to call the
'next' continuation.
- public ForwardCallback<T> forward_with<T> (owned HandlerCallback handle)
Forward using a provided handler callback.
- public HandlerCallback safely (owned SafeHandlerCallback forward)
Perform some operations safely.
- public HandlerCallback sequence (owned HandlerCallback a, owned HandlerCallback b)
Produce a handler sequence of 'a' and 'b'.
- public HandlerCallback status (uint status, owned ForwardCallback<Error> forward)
Handle any corresponding error thrown by the following handler.
- public HandlerCallback subdomain (string expected_subdomain, owned ForwardCallback<string> forward, bool strict = false, uint skip = 2)
Produce a matching middleware that accepts request which subdomain is
consistent with the expectation.