Annotate

teal-src/util/roles.d.tl @ 12815:2d134201dc55

net.resolvers.basic: Record hostname coming from secure SRV records Will be useful even later...
author Kim Alvefur <zash@zash.se>
date Thu, 22 Dec 2022 00:11:23 +0100
parent 12661:1c391c17a907
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12661
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
1 local record util_roles
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
2
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
3 type context = any
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
4
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
5 record Role
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
6 id : string
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
7 name : string
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
8 description : string
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
9 default : boolean
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
10 priority : number -- or integer?
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
11 permissions : { string : boolean }
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
12
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
13 may : function (Role, string, context)
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
14 clone : function (Role, role_config)
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
15 set_permission : function (Role, string, boolean, boolean)
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
16 end
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
17
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
18 is_role : function (any) : boolean
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
19
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
20 record role_config
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
21 name : string
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
22 description : string
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
23 default : boolean
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
24 priority : number -- or integer?
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
25 inherits : { Role }
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
26 permissions : { string : boolean }
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
27 end
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
28
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
29 new : function (role_config, Role) : Role
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
30 end
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
31
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
32 return util_roles