mirror of
https://gitlab.com/fabinfra/fabaccess/fabaccess-api.git
synced 2025-03-12 23:01:47 +01:00
At least be consistent
This commit is contained in:
parent
170d4df51c
commit
8b94301382
@ -32,8 +32,8 @@ struct User {
|
|||||||
|
|
||||||
manage @4 :Manage;
|
manage @4 :Manage;
|
||||||
interface Manage $CSharp.name("ManageInterface") {
|
interface Manage $CSharp.name("ManageInterface") {
|
||||||
addRole @0 ( role :Role );
|
addRole @0 Role;
|
||||||
removeRole @1 ( role :Role );
|
removeRole @1 Role;
|
||||||
}
|
}
|
||||||
|
|
||||||
admin @5 :Admin;
|
admin @5 :Admin;
|
||||||
|
11
utils.capnp
11
utils.capnp
@ -30,17 +30,18 @@ interface L10NString {
|
|||||||
|
|
||||||
struct UUID {
|
struct UUID {
|
||||||
# UUID type used to identify machines.
|
# UUID type used to identify machines.
|
||||||
# Since the exact value has no meaning the encoding rules are not too relevant, but it is
|
|
||||||
# paramount that you are consistent when encoding and decoding this type.
|
|
||||||
#
|
#
|
||||||
# Consider using this algorithm for assembling the 128-bit integer:
|
# Consider using this algorithm for assembling the 128-bit integer:
|
||||||
# (assuming ISO9899:2018 shifting & casting rules)
|
# (assuming ISO9899:2018 shifting & casting rules)
|
||||||
# uint128_t num = (uuid1 << 64) + uuid0;
|
# uint128_t num = (upper << 64) + lower;
|
||||||
# And then respectively this code for deconstructing it:
|
# And then respectively this code for deconstructing it:
|
||||||
# uint64_t uuid0 = (uint64_t) num;
|
# uint64_t lower = (uint64_t) num;
|
||||||
# uint64_t uuid1 = (uint64_t) (num >> 64);
|
# uint64_t upper = (uint64_t) (num >> 64);
|
||||||
|
|
||||||
lower @0 :UInt64;
|
lower @0 :UInt64;
|
||||||
|
# lower 8 bytes of the uuid, containing the LSB.
|
||||||
|
|
||||||
upper @1 :UInt64;
|
upper @1 :UInt64;
|
||||||
|
# upper 8 bytes of the uuid, containing the MSB.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user