valum-0.3
Description:
Web micro-framework written in Vala
Content:
Namespaces:
- Valum - Valum is a Web micro-framework written in Vala.
- 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.
- CacheControlDirective
- DecodeFlags
- Method - Represent a set of HTTP methods.
- ClientError - Client errors corresponding to the 4xx HTTP status codes.
- Informational - Informational status corresponding to the 1xx HTTP status codes.
- Redirection - Redirection corresponding to the 3xx HTTP status codes.
- ServerError - Server errors corresponding to the 5xx HTTP status codes.
- Success - Success corresponding to the 2xx HTTP status codes.
- public delegate bool AuthCallback (Authorization auth)
Perform the authentication against the credentials source.
- public delegate void ContextForeachFunc (string key, Value value, uint depth)
Type of function passed to Valum.Context.foreach to iterate in all context entries depth-wise.
- public delegate bool ForwardCallback<T> (Request req, Response res, NextCallback next, Context context, T value) throws Error
Define a type of Valum.HandlerCallback that forward a generic value.
- public delegate bool HandlerCallback (Request req, Response res, NextCallback next, Context context) throws Error
Handle a pair of request and response.
- public delegate void LoaderCallback (Router router)
Loads Route instances on a provided router.
- public delegate bool MatcherCallback (Request req, Context context)
Match the request and populate the Valum.Context.
- public delegate bool NextCallback () throws Informational, Success, Redirection, ClientError, ServerError, Error
Continuation passed in a Valum.HandlerCallback to *keep routing* both VSGI.Request and VSGI.Response.
- public delegate bool SafeHandlerCallback (Request req, Response res, SafeNextCallback next, Context ctx) throws Informational, Success, Redirection, ClientError, ServerError
Define a kind of Valum.HandlerCallback which may only raise status codes so that other errors have to be explicitly handled.
- public delegate bool SafeNextCallback () throws Informational, Success, Redirection, ClientError, ServerError
- 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.
- ContentNegotiation - Content negociation for various headers.
- public HandlerCallback accept (string content_types, owned ForwardCallback<string> forward = forward)
Negotiate a 'Accept' header.
- public HandlerCallback accept_charset (string charsets, owned ForwardCallback<string> forward = forward)
Negotiate a 'Accept-Charset' header.
- public HandlerCallback accept_encoding (string encodings, owned ForwardCallback<string> forward = forward)
Negotiate a 'Accept-Encoding' header.
- public HandlerCallback accept_language (string languages, owned ForwardCallback<string> forward = forward)
Negotiate a 'Accept-Language' header.
- public HandlerCallback accept_ranges (string ranges, owned ForwardCallback<string> forward = forward)
Negotiate a 'Accept-Range' header.
- public HandlerCallback accept_transfer_encoding (string encodings, owned ForwardCallback<string> forward = forward)
Negotiate a 'TE' header.
- public HandlerCallback negotiate (string header_name, string expectations, owned ForwardCallback<string> forward = forward, EqualFunc<string> match = ( EqualFunc < string >) str_case_equal)
Negotiate a HTTP header against a set of expectations.
- ServerSentEvents - Middleware and utilities to produce server-sent events.
- public delegate void EventStreamCallback (Request request, owned SendEventCallback send_event, Context context) throws Error
Create a context for sending SSE messages.
- public delegate void SendEventCallback (string? event, string data, string? id = null, TimeSpan? retry = null) throws Error
Send an message over the body stream.
- public HandlerCallback stream_events (owned EventStreamCallback context)
Middleware that create a context for sending Server-Sent Events.
- Static - Utilities to serve static resources.
- ServeFlags - Flags used to enble or disable options for serving static resources.
- public HandlerCallback serve_from_file (File root, ServeFlags serve_flags = NONE, ForwardCallback<File> forward = forward)
Serve static files relative to a given root.
- public HandlerCallback serve_from_path (string path, ServeFlags serve_flags = NONE, owned ForwardCallback<File> forward = forward)
- public HandlerCallback serve_from_resource (Resource resource, string prefix = "/", ServeFlags serve_flags = NONE, owned HandlerCallback forward = forward)
Serve files from the provided GLib.Resource bundle.
- public HandlerCallback serve_from_uri (string uri, ServeFlags serve_flags = NONE, owned ForwardCallback<File> forward = forward)