mirror of
https://gitlab.com/fabinfra/fabaccess/fabaccess-api.git
synced 2025-03-12 14:51:42 +01:00
Try to add UserSystem
This commit is contained in:
parent
f2783c7f6e
commit
25ea9ed97a
21
card.capnp
Normal file
21
card.capnp
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
@0x849f99d8777df6e8;
|
||||||
|
|
||||||
|
using Rust = import "programming_language/rust.capnp";
|
||||||
|
$Rust.parentModule("schema");
|
||||||
|
|
||||||
|
using CSharp = import "programming_language/csharp.capnp";
|
||||||
|
$CSharp.namespace("FabAccessAPI.Schema");
|
||||||
|
|
||||||
|
struct Card {
|
||||||
|
enum CardType {
|
||||||
|
NXPMifareDESFire_ev2 @0;
|
||||||
|
}
|
||||||
|
|
||||||
|
id @0 :General.UUID;
|
||||||
|
type @1 :CardType;
|
||||||
|
|
||||||
|
manage @2 :Manage;
|
||||||
|
interface Manage $CSharp.name("ManageInterface") {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
11
cardsystem.capnp
Normal file
11
cardsystem.capnp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
@0x8c0fcfd5c37fedc5;
|
||||||
|
|
||||||
|
using Rust = import "programming_language/rust.capnp";
|
||||||
|
$Rust.parentModule("schema");
|
||||||
|
|
||||||
|
using CSharp = import "programming_language/csharp.capnp";
|
||||||
|
$CSharp.namespace("FabAccessAPI.Schema");
|
||||||
|
|
||||||
|
interface CardSystem {
|
||||||
|
|
||||||
|
}
|
@ -51,9 +51,9 @@ struct Machine {
|
|||||||
|
|
||||||
use @1 :Use;
|
use @1 :Use;
|
||||||
interface Use $CSharp.name("UseInterface") {
|
interface Use $CSharp.name("UseInterface") {
|
||||||
use @0 () -> ();
|
use @0 ();
|
||||||
|
|
||||||
reserve @1 () -> ();
|
reserve @1 ();
|
||||||
reserveto @2 (start :UInt64, end :UInt64);
|
reserveto @2 (start :UInt64, end :UInt64);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +81,15 @@ struct Machine {
|
|||||||
manage @5 :Manage;
|
manage @5 :Manage;
|
||||||
interface Manage $CSharp.name("ManageInterface") {
|
interface Manage $CSharp.name("ManageInterface") {
|
||||||
setProperty @0 (property :General.KeyValuePair);
|
setProperty @0 (property :General.KeyValuePair);
|
||||||
removeProperty @1(property :General.KeyValuePair);
|
removeProperty @1 (property :General.KeyValuePair);
|
||||||
|
|
||||||
|
forceUse @2 ();
|
||||||
|
forceFree @3 ();
|
||||||
|
|
||||||
|
forceTransfer @4 (user :User);
|
||||||
|
|
||||||
|
block @5 ();
|
||||||
|
disabled @6 ();
|
||||||
}
|
}
|
||||||
|
|
||||||
admin @6 :Admin;
|
admin @6 :Admin;
|
||||||
@ -91,6 +99,6 @@ struct Machine {
|
|||||||
|
|
||||||
getAdminPropertyList @2 () -> (propertyList :List(General.KeyValuePair));
|
getAdminPropertyList @2 () -> (propertyList :List(General.KeyValuePair));
|
||||||
setAdminProperty @3 (property :General.KeyValuePair);
|
setAdminProperty @3 (property :General.KeyValuePair);
|
||||||
removeAdminProperty @4(property :General.KeyValuePair);
|
removeAdminProperty @4 (property :General.KeyValuePair);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -12,7 +12,17 @@ using Space = import "space.capnp".Space;
|
|||||||
|
|
||||||
interface MachineSystem
|
interface MachineSystem
|
||||||
{
|
{
|
||||||
listMachines @0 () -> ( machines :List(Machine) );
|
info @0 :Info;
|
||||||
|
interface Info $CSharp.name("InfoInterface") {
|
||||||
|
getMachineList @0 () -> ( machines :List(Machine) );
|
||||||
|
|
||||||
getMachine @1 ( uuid :General.UUID ) -> ( machine :Machine);
|
getMachine @1 ( uuid :General.UUID ) -> ( machine :Machine);
|
||||||
|
}
|
||||||
|
|
||||||
|
manage @1 :Manage;
|
||||||
|
interface Manage $CSharp.name("ManageInterface") {
|
||||||
|
addMachine @0 (machine :Machine);
|
||||||
|
updateMachine @1 (machine :Machine);
|
||||||
|
removeMachine @2 (machine :Machine);
|
||||||
|
}
|
||||||
}
|
}
|
@ -6,7 +6,24 @@ $Rust.parentModule("schema");
|
|||||||
using CSharp = import "programming_language/csharp.capnp";
|
using CSharp = import "programming_language/csharp.capnp";
|
||||||
$CSharp.namespace("FabAccessAPI.Schema");
|
$CSharp.namespace("FabAccessAPI.Schema");
|
||||||
|
|
||||||
|
using General = import "general.capnp";
|
||||||
|
using User = import "user.capnp".User;
|
||||||
|
|
||||||
interface UserSystem
|
interface UserSystem
|
||||||
{
|
{
|
||||||
|
info @0 :Info;
|
||||||
|
interface Info $CSharp.name("InfoInterface") {
|
||||||
|
getUserSelf @1 ( ) -> ( user :User);
|
||||||
|
}
|
||||||
|
|
||||||
|
manage @1 :Manage;
|
||||||
|
interface Manage $CSharp.name("ManageInterface") {
|
||||||
|
getUserList @0 () -> ( user :List(User) );
|
||||||
|
|
||||||
|
getMachine @1 ( uuid :General.UUID ) -> ( user :User);
|
||||||
|
|
||||||
|
addUser @2 (user :User);
|
||||||
|
updateUser @3 (user :User);
|
||||||
|
removeUser @4 (user :User);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user