diff options
author | Kim Alvefur <zash@zash.se> | 2023-03-23 13:36:52 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-03-23 13:36:52 +0100 |
commit | f68336b96e0d843511bb1bd3fdac8bba2fe4573a (patch) | |
tree | a54111914e081293e50b846e7f0d9654e885c2ed /teal-src/core | |
parent | 738df041ac3965496e9247acc95d80f84d30b2b5 (diff) | |
download | prosody-f68336b96e0d843511bb1bd3fdac8bba2fe4573a.tar.gz prosody-f68336b96e0d843511bb1bd3fdac8bba2fe4573a.zip |
teal: Move into prosody namespace
Diffstat (limited to 'teal-src/core')
-rw-r--r-- | teal-src/core/storagemanager.d.tl | 74 | ||||
-rw-r--r-- | teal-src/core/usermanager.d.tl | 46 |
2 files changed, 0 insertions, 120 deletions
diff --git a/teal-src/core/storagemanager.d.tl b/teal-src/core/storagemanager.d.tl deleted file mode 100644 index 3c8253b1..00000000 --- a/teal-src/core/storagemanager.d.tl +++ /dev/null @@ -1,74 +0,0 @@ --- Storage local record API Description --- --- This is written as a TypedLua description - --- Key-Value stores (the default) - -local stanza = require"util.stanza".stanza_t - -local record keyval_store - get : function ( keyval_store, string ) : any , string - set : function ( keyval_store, string, any ) : boolean, string -end - --- Map stores (key-key-value stores) - -local record map_store - get : function ( map_store, string, any ) : any, string - set : function ( map_store, string, any, any ) : boolean, string - set_keys : function ( map_store, string, { any : any }) : boolean, string - remove : table -end - --- Archive stores - -local record archive_query - start : number -- timestamp - ["end"]: number -- timestamp - with : string - after : string -- archive id - before : string -- archive id - total : boolean -end - -local record archive_store - -- Optional set of capabilities - caps : { - -- Optional total count of matching items returned as second return value from :find() - string : any - } - - -- Add to the archive - append : function ( archive_store, string, string, any, number, string ) : string, string - - -- Iterate over archive - type iterator = function () : string, any, number, string - find : function ( archive_store, string, archive_query ) : iterator, integer - - -- Removal of items. API like find. Optional - delete : function ( archive_store, string, archive_query ) : boolean | number, string - - -- Array of dates which do have messages (Optional) - dates : function ( archive_store, string ) : { string }, string - - -- Map of counts per "with" field - summary : function ( archive_store, string, archive_query ) : { string : integer }, string - - -- Map-store API - get : function ( archive_store, string, string ) : stanza, number, string - get : function ( archive_store, string, string ) : nil, string - set : function ( archive_store, string, string, stanza, number, string ) : boolean, string -end - --- This represents moduleapi -local record coremodule - -- If the first string is omitted then the name of the module is used - -- The second string is one of "keyval" (default), "map" or "archive" - open_store : function (archive_store, string, string) : keyval_store, string - open_store : function (archive_store, string, string) : map_store, string - open_store : function (archive_store, string, string) : archive_store, string - - -- Other module methods omitted -end - -return coremodule diff --git a/teal-src/core/usermanager.d.tl b/teal-src/core/usermanager.d.tl deleted file mode 100644 index a546a53c..00000000 --- a/teal-src/core/usermanager.d.tl +++ /dev/null @@ -1,46 +0,0 @@ -local Role = require "util.roles".Role; - -local record usermanager - record AuthProvider - -- TODO - end - record AccountInfo - created : number - password_updated : any - enabled : boolean - end - - -- Users - test_password : function (username : string, host : string, password : string) : boolean - get_password : function (username : string, host : string) : string, string - set_password : function (username : string, host : string, password : string) : boolean, string - get_account_info : function (username : string, host : string) : AccountInfo - user_exists : function (username : string, host : string) : boolean - create_user : function (username : string, password : string, host : string) : boolean, string - delete_user : function (username : string, host : string) : boolean, string - user_is_enabled : function (username : string, host : string) : boolean, string - enable_user : function (username : string, host : string) : boolean, string - disable_user : function (username : string, host : string) : boolean, string - users : function (host : string) : function () : string - - -- Roles - get_user_role : function (username : string, host : string) : Role - set_user_role : function (username : string, host : string, role_name : string) : boolean, string - user_can_assume_role : function (username : string, host : string, role_name : string) : boolean - add_user_secondary_role : function (username : string, host: string, role_name : string) : boolean, string - remove_user_secondary_role : function (username : string, host: string, role_name : string) : boolean, string - get_user_secondary_roles : function (username : string, host : string) : { string : Role } - get_users_with_role : function (role : string, host : string) : { string } - get_jid_role : function (jid : string, host : string) : Role - set_jid_role : function (jid : string, host : string, role_name : string) : boolean - get_jids_with_role : function (role : string, host : string) : { string } - get_role_by_name : function (role_name : string) : Role - - -- Etc - get_provider : function (host : string) : AuthProvider - get_sasl_handler : function (host : string, session : table) : table - initialize_host : function (host : string) - new_null_provider : function () : AuthProvider -end - -return usermanager |