mirror of
https://gitlab.com/fabinfra/fabaccess/fabaccess-api.git
synced 2025-03-12 14:51:42 +01:00
33 lines
930 B
Cap'n Proto
33 lines
930 B
Cap'n Proto
@0xa23cfc5ead0ac055;
|
|
|
|
using CSharp = import "programming_language/csharp.capnp";
|
|
$CSharp.namespace("FabAccessAPI.Schema");
|
|
|
|
using import "owned.capnp".Owned;
|
|
using import "resource.capnp".Resource;
|
|
using import "resource.capnp".Description;
|
|
using import "claim.capnp".Claim;
|
|
using import "utils.capnp".When;
|
|
using import "utils.capnp".Fallible;
|
|
|
|
interface Interestable {
|
|
queue @0 () -> Fallible(Interest, ReserveError);
|
|
reserve @1 ( when :When ) -> Fallible(Interest, ReserveError);
|
|
struct ReserveError {
|
|
union {
|
|
permissionDenied @0 :Void;
|
|
reserveOverlapping @1 :Void;
|
|
queueFull @2 :Void;
|
|
}
|
|
}
|
|
getInterests @2 () -> ( interests :List(Interest) );
|
|
# WARNING: Impersonates users
|
|
}
|
|
|
|
interface Interest extends (Owned) {
|
|
resource @0 () -> ( resource :Resource );
|
|
describe @1 () -> Description;
|
|
drop @2 ();
|
|
upgrade @3 () -> ( claim :Claim );
|
|
}
|