Software /
code /
prosody
Annotate
teal-src/util/set.d.tl @ 12953:ebe3b2f96cad
mod_tokenauth: Switch to new token format (invalidates existing tokens!)
The new format has the following properties:
- 5 bytes longer than the previous format
- The token now has separate 'id' and 'secret' parts - the token itself is no
longer stored in the DB, and the secret part is hashed
- The only variable length field (JID) has been moved to the end
- The 'secret-token:' prefix (RFC 8959) is now included
Compatibility with the old token format was not maintained, and all previously
issued tokens are invalid after this commit (they will be removed from the DB
if used).
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 21 Mar 2023 14:33:29 +0000 |
parent | 12617:36d77cc56ecb |
rev | line source |
---|---|
12617
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 local record lib |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 record Set<T> |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 add : function<T> (Set<T>, T) |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 contains : function<T> (Set<T>, T) : boolean |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
5 contains_set : function<T> (Set<T>, Set<T>) : boolean |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
6 items : function<T> (Set<T>) : function<T> (Set<T>, T) : T |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
7 add_list : function<T> (Set<T>, { T }) |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
8 include : function<T> (Set<T>, Set<T>) |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
9 exclude : function<T> (Set<T>, Set<T>) |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
10 empty : function<T> (Set<T>) : boolean |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
11 end |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
12 |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
13 new : function<T> ({ T }) : Set<T> |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
14 is_set : function (any) : boolean |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
15 union : function<T> (Set<T>, Set<T>) : Set <T> |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
16 difference : function<T> (Set<T>, Set<T>) : Set <T> |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
17 intersection : function<T> (Set<T>, Set<T>) : Set <T> |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
18 xor : function<T> (Set<T>, Set<T>) : Set <T> |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
19 end |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
20 |
36d77cc56ecb
util.set: Add teal type declaration file
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
21 return lib |