mirror of
https://gitlab.com/fabinfra/fabaccess/fabaccess-api.git
synced 2025-03-12 14:51:42 +01:00
Make claims/interest owned
This commit is contained in:
parent
1378c8722d
commit
d28a3ea5aa
@ -3,6 +3,7 @@
|
|||||||
using CSharp = import "programming_language/csharp.capnp";
|
using CSharp = import "programming_language/csharp.capnp";
|
||||||
$CSharp.namespace("FabAccessAPI.Schema");
|
$CSharp.namespace("FabAccessAPI.Schema");
|
||||||
|
|
||||||
|
using import "owned.capnp".Owned;
|
||||||
using import "resource.capnp".Resource;
|
using import "resource.capnp".Resource;
|
||||||
using import "notify.capnp".Notifiable;
|
using import "notify.capnp".Notifiable;
|
||||||
using import "interest.capnp".Interest;
|
using import "interest.capnp".Interest;
|
||||||
@ -36,7 +37,7 @@ interface Lockable {
|
|||||||
# already locked will succeed, invalidating the former lock.
|
# already locked will succeed, invalidating the former lock.
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Claim extends (Notifiable) {
|
interface Claim extends (Notifiable, Owned) {
|
||||||
resource @0 () -> ( resource :Resource, dummy :UInt8 = 0 );
|
resource @0 () -> ( resource :Resource, dummy :UInt8 = 0 );
|
||||||
# Pointer back to the resource this claim comes from. Primarily useful when restoring persisted
|
# Pointer back to the resource this claim comes from. Primarily useful when restoring persisted
|
||||||
# claims or restoring after a connection failure.
|
# claims or restoring after a connection failure.
|
||||||
@ -77,7 +78,7 @@ interface Claim extends (Notifiable) {
|
|||||||
getDependencies @5 () -> ( dependencies: List(Claim) );
|
getDependencies @5 () -> ( dependencies: List(Claim) );
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Lock extends (Claim) {
|
interface Lock extends (Claim, Owned) {
|
||||||
# An exclusive claim on a resource. Only a single Lock may exist for any given resource.
|
# An exclusive claim on a resource. Only a single Lock may exist for any given resource.
|
||||||
|
|
||||||
downgrade @0 () -> ( claim :Claim );
|
downgrade @0 () -> ( claim :Claim );
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
using CSharp = import "programming_language/csharp.capnp";
|
using CSharp = import "programming_language/csharp.capnp";
|
||||||
$CSharp.namespace("FabAccessAPI.Schema");
|
$CSharp.namespace("FabAccessAPI.Schema");
|
||||||
|
|
||||||
|
using import "owned.capnp".Owned;
|
||||||
using import "resource.capnp".Resource;
|
using import "resource.capnp".Resource;
|
||||||
using import "resource.capnp".Description;
|
using import "resource.capnp".Description;
|
||||||
using import "claim.capnp".Claim;
|
using import "claim.capnp".Claim;
|
||||||
@ -23,7 +24,7 @@ interface Interestable {
|
|||||||
# WARNING: Impersonates users
|
# WARNING: Impersonates users
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Interest {
|
interface Interest extends (Owned) {
|
||||||
resource @0 () -> ( resource :Resource );
|
resource @0 () -> ( resource :Resource );
|
||||||
describe @1 () -> Description;
|
describe @1 () -> Description;
|
||||||
drop @2 ();
|
drop @2 ();
|
||||||
|
7
owned.capnp
Normal file
7
owned.capnp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
@0x8c931d6e0367db87;
|
||||||
|
|
||||||
|
using import "user.capnp".User;
|
||||||
|
|
||||||
|
interface Owned {
|
||||||
|
getUser @0 () -> ( owner :User );
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user