diff --git a/auth.capnp b/auth.capnp index 1f7145a..c83793a 100644 --- a/auth.capnp +++ b/auth.capnp @@ -100,7 +100,7 @@ struct Response { } interface Authentication { - step @0 (data :Data) -> Response; + step @0 ( data :Data ) -> Response; # Respond to a challenge with more data. A client MUST NOT call this after having received an # "successful" response. diff --git a/main.capnp b/main.capnp index 8cecc29..0a68294 100644 --- a/main.capnp +++ b/main.capnp @@ -12,7 +12,7 @@ using Users = import "users.capnp".Users; interface Bootstrap { - mechanisms @0 () -> ( mechs: List(Text) ); + mechanisms @0 () -> ( mechs :List(Text) ); # Get a list of Mechanisms this server allows in this context. createSession @1 ( mechanism :Text, initialData :Data ) -> ( authentication :Authentication ); @@ -26,10 +26,10 @@ struct Session { # An API session with the server. The below capabilities are set to NULL if the authenticated # user doesn't have permission to access the system in question. - resources @0 : Resources; + resources @0 :Resources; # Access to the resources configured. - users @1 : Users; + users @1 :Users; # User administration. This includes both modifying other users and self-modification, so this # is allowed for most sessions } diff --git a/resource.capnp b/resource.capnp index dabfaa4..1a9b0e8 100644 --- a/resource.capnp +++ b/resource.capnp @@ -74,7 +74,7 @@ struct Resource { struct Map(Key, Value) { # A serialized key-value map represented as a list of (k,v) tuples. - entries @0 : List(Entry); + entries @0 :List(Entry); struct Entry { key @0 :Key; @@ -124,7 +124,7 @@ interface Notify extends(Access) { # Notify are ephermal. If the connection to the server is lost all `Notify` from that client are # unregistered. - register @0 ( cb: Callback ); + register @0 ( cb :Callback ); # Register a given callback to be called on every state update. If this client already has a # callback registered for this resource the old callback is replaced. @@ -156,7 +156,7 @@ interface Notify extends(Access) { interface Interestable { # "Interest" right now it tells BFFH that the client wants at least one `Claim` to remain. - register @0 ( cb: Callback ) -> ( handle :Handle ); + register @0 ( cb :Callback ) -> ( handle :Handle ); # Register a callback that BFFH will use to send notifications back to the client asyncronously. # This creates an "Interest" on this resource. Setting the callback to a `nullptr` will still # register an interest but the server will not be able to inform a client about an impeding diff --git a/user.capnp b/user.capnp index 719af16..7a2c78b 100644 --- a/user.capnp +++ b/user.capnp @@ -27,13 +27,13 @@ struct User { passwd @3 :Passwd; interface Passwd { - changepw @0 ( old: Text, new: Text ); + changepw @0 ( old :Text, new :Text ); } manage @4 :Manage; interface Manage $CSharp.name("ManageInterface") { - addRole @0 ( role :Role ); - removeRole @1 ( role :Role ); + addRole @0 Role; + removeRole @1 Role; } admin @5 :Admin; diff --git a/users.capnp b/users.capnp index c5bc2ff..294bd59 100644 --- a/users.capnp +++ b/users.capnp @@ -16,7 +16,7 @@ interface Users interface Manage $CSharp.name("ManageInterface") { list @0 () -> ( users :List(User) ); - addUser @1 ( username: Text, password: Text ) -> User; + addUser @1 ( username :Text, password :Text ) -> User; removeUser @2 User; } diff --git a/utils.capnp b/utils.capnp index eb45c8f..a5ec60b 100644 --- a/utils.capnp +++ b/utils.capnp @@ -30,17 +30,18 @@ interface L10NString { struct UUID { # 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: # (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: - # uint64_t uuid0 = (uint64_t) num; - # uint64_t uuid1 = (uint64_t) (num >> 64); + # uint64_t lower = (uint64_t) num; + # uint64_t upper = (uint64_t) (num >> 64); lower @0 :UInt64; + # lower 8 bytes of the uuid, containing the LSB. + upper @1 :UInt64; + # upper 8 bytes of the uuid, containing the MSB. }