package eliom

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Eliom_state.ExtSource

Sourceexception Wrong_scope

Exception raised when you try to access a reference belonging to a scope different to the state's scope

Sourcetype timeout =
  1. | TGlobal
    (*

    see global setting

    *)
  2. | TNone
    (*

    explicitly set no timeout

    *)
  3. | TSome of float
    (*

    timeout duration in seconds

    *)

Type used to describe session timeouts

These types are used to get or set information about browser or process cookies (like timeouts).

Sourcetype (+'a, +'b) state

The type of states. The first parameter corresponds to the scope level and the second one to the kind of state (volatile or persistent data, or service state)

Sourceval volatile_data_group_state : ?scope:Eliom_common.session_group_scope -> string -> ([> `Session_group ], [> `Data ]) state

volatile_data_group_state ~scope n returns the state corresponding to the group named n in scope scope.

Sourceval persistent_data_group_state : ?scope:Eliom_common.session_group_scope -> string -> ([> `Session_group ], [> `Pers ]) state

Same for persistent data

Sourceval service_group_state : ?scope:Eliom_common.session_group_scope -> string -> ([> `Session_group ], [> `Service ]) state

Same for services

Sourceval current_volatile_data_state : ?secure:bool -> ?scope:Eliom_common.user_scope -> unit -> ([< Eliom_common.user_level ], [< `Data ]) state

current_volatile_data_state ~scope returns the state corresponding to scope scope. Raises Not_found if not connected or if no session group is set, or Eliom_common.Eliom_Session_expired if a cookie was present but expired.

Sourceval current_persistent_data_state : ?secure:bool -> ?scope:Eliom_common.user_scope -> unit -> ([< Eliom_common.user_level ], [< `Pers ]) state Lwt.t

Same for persistent data

Sourceval current_service_state : ?secure:bool -> ?scope:Eliom_common.user_scope -> unit -> ([< Eliom_common.user_level ], [< `Service ]) state

Same for services

Sourceval discard_state : ?sitedata:Eliom_common.sitedata -> state:('a, 'b) state -> unit -> unit Lwt.t

Discard external states. See fold_volatile_sub_states for explanation about the ?sitedata parameter.

Sourceval fold_volatile_sub_states : ?sitedata:Eliom_common.sitedata -> state:([< `Session_group | `Session ], [< `Data | `Service ] as 'k) state -> ('a -> ([< `Session | `Client_process ], 'k) state -> 'a) -> 'a -> 'a

Fold all sessions in a groups, or all client processes in a session. If you do not call the function during a request or during the initialisation phase of the Eliom module, you must provide the extra parameter ?sitedata, that you can get by calling Eliom_request_info.get_sitedata during the initialisation phase of the Eliom module.

Sourceval iter_volatile_sub_states : ?sitedata:Eliom_common.sitedata -> state:([< `Session_group | `Session ], [< `Data | `Service ] as 'k) state -> (([< `Session | `Client_process ], 'k) state -> unit) -> unit

Iter on all sessions in a groups, or all client processes in a session. See fold_volatile_sub_states for explanation about the ?sitedata parameter.

Sourceval fold_sub_states : ?sitedata:Eliom_common.sitedata -> state: ([< `Session_group | `Session ], [< `Data | `Pers | `Service ] as 'k) state -> ('a -> ([< `Session | `Client_process ], 'k) state -> 'a Lwt.t) -> 'a -> 'a Lwt.t

Fold all sessions in a groups, or all client processes in a session (volatile and persistent). See fold_volatile_sub_states for explanation about the ?sitedata parameter.

Sourceval iter_sub_states : ?sitedata:Eliom_common.sitedata -> state:([< `Session_group | `Session ], 'k) state -> (([< `Session | `Client_process ], 'k) state -> unit Lwt.t) -> unit Lwt.t

Iter on all sessions in a groups, or all client processes in a session (volatile and persistent). See fold_volatile_sub_states for explanation about the ?sitedata parameter.

Sourcemodule Low_level : sig ... end

Functions to access table data. Prefer using Eliom references.

Get the infomration about cookies (timeouts, etc.). See fold_volatile_sub_states for explanation about the ?sitedata parameter.

See fold_volatile_sub_states for explanation about the ?sitedata parameter.

Sourceval get_session_group_list : unit -> string list

Returns a list containing the names of all session group that are available for this site.

Sourceval iter_service_cookies : (service_cookie_info -> unit Lwt.t) -> unit Lwt.t

Iterator on all active service cookies. Lwt.pause is called automatically after each iteration.

Sourceval iter_volatile_data_cookies : (data_cookie_info -> unit Lwt.t) -> unit Lwt.t

Iterator on data cookies. Lwt.pause is called automatically after each iteration.

Sourceval iter_persistent_data_cookies : (persistent_cookie_info -> unit Lwt.t) -> unit Lwt.t

Iterator on persistent cookies. Lwt.pause is called automatically after each iteration.

Sourceval fold_service_cookies : (service_cookie_info -> 'b -> 'b Lwt.t) -> 'b -> 'b Lwt.t

Iterator on service cookies. Lwt.pause is called automatically after each iteration.

Sourceval fold_volatile_data_cookies : (data_cookie_info -> 'b -> 'b Lwt.t) -> 'b -> 'b Lwt.t

Iterator on data cookies. Lwt.pause is called automatically after each iteration.

Sourceval fold_persistent_data_cookies : (persistent_cookie_info -> 'b -> 'b Lwt.t) -> 'b -> 'b Lwt.t

Iterator on persistent cookies. Lwt.pause is called automatically after each iteration.

OCaml

Innovation. Community. Security.