@0x9a05e95f65f2edda; using CSharp = import "programming_language/csharp.capnp"; $CSharp.namespace("FabAccessAPI.Schema"); using import "user.capnp".User; using import "utils.capnp".Fallible; interface Users { list @0 () -> ( users :List(User) ); addUser @1 ( username :Text ) -> Fallible(AddUserOk, AddUserError); struct AddUserOk { user @0 :User; initialPassword @1 :Text; } struct AddUserError { union { ok @0 :Void; # This error is not actually set, i.e. the operation completed successfully. # This field is necessary because a NULL struct pointer may be interpreted as a struct with # default values. In that case this will appear as an `Error` with the `ok` field set. exists @1 :Void; # There is already an user with the requested username usernameInvalid @2 :Void; # The provided username is not usable, e.g. contains invalid characters, is too long, or too # short. passwordInvalid @3 :Void; # The provided password is not usable, e.g. it's zero-length. } } removeUser @2 ( user :User ) -> Fallible(RemoveUserOk, RemoveUserError); struct RemoveUserOk { } struct RemoveUserError { union { permissionDenied @0 :Void; userAlreadyDeleted @1 :Void; } } }