mirror of
https://gitlab.com/fabinfra/fabaccess/fabaccess-api.git
synced 2025-03-12 14:51:42 +01:00
Hints and Interest fallible methods
This commit is contained in:
parent
cae56b0084
commit
a2552c6759
@ -12,6 +12,7 @@ using import "utils.capnp".OID;
|
||||
using import "utils.capnp".Map;
|
||||
using import "utils.capnp".SturdyRef;
|
||||
using import "projects.capnp".Project;
|
||||
using import "traits.capnp".Hint;
|
||||
|
||||
interface Claimable {
|
||||
claim @0 ( project :Project ) -> Fallible(Claim, ClaimError);
|
||||
|
@ -25,8 +25,20 @@ interface Interestable {
|
||||
interface Interest extends (Owned) {
|
||||
resource @0 () -> ( resource :Resource, dummy :UInt8 );
|
||||
describe @1 () -> Description;
|
||||
drop @2 ();
|
||||
upgrade @3 () -> ( claim :Claim );
|
||||
|
||||
drop @2 () -> Fallible(DropOk, DropError);
|
||||
struct DropOk {
|
||||
|
||||
}
|
||||
struct DropError {
|
||||
|
||||
}
|
||||
|
||||
upgrade @3 () -> ( claim :Fallible(Claim, UpgradeError) );
|
||||
|
||||
struct UpgradeError {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
struct InterestKind {
|
||||
|
@ -16,6 +16,8 @@ using import "utils.capnp".OID;
|
||||
using import "utils.capnp".L10NString;
|
||||
using import "utils.capnp".Map;
|
||||
|
||||
using import "traits.capnp".Hint;
|
||||
|
||||
using import "cache.capnp".Cache;
|
||||
|
||||
struct RestoredResource {
|
||||
@ -54,6 +56,8 @@ struct Resource {
|
||||
# does not support claiming or locking.
|
||||
|
||||
audit @6 :Auditable;
|
||||
|
||||
hint @7 :Hint;
|
||||
}
|
||||
|
||||
struct Description {
|
||||
|
10
traits.capnp
10
traits.capnp
@ -1,7 +1,9 @@
|
||||
@0xc0542f62613a5c5e;
|
||||
|
||||
using CSharp = import "programming_language/csharp.capnp";
|
||||
$CSharp.namespace("FabAccessAPI.Schema");
|
||||
$CSharp.namespace("FabAccessAPI.Schema");
|
||||
|
||||
using OID = import "utils.capnp".OID;
|
||||
|
||||
interface TraitSuper {
|
||||
getName @0 () -> ( name :Text );
|
||||
@ -13,3 +15,9 @@ struct TraitError(ConstraintError) {
|
||||
constraintViolation @1 :ConstraintError;
|
||||
}
|
||||
}
|
||||
|
||||
interface Hint {
|
||||
getOid @0 () -> ( oid :OID );
|
||||
getAbstract @1 () -> ( abstract :List(Hint) );
|
||||
# Sorted least to most abstract. abstract[0] is the next less specific Hint.
|
||||
}
|
||||
|
@ -99,3 +99,8 @@ struct When {
|
||||
start @0 :Timestamp;
|
||||
end @1 :Timestamp;
|
||||
}
|
||||
|
||||
struct TreeNode(Value) {
|
||||
value @0 :Value;
|
||||
children @1 :List(TreeNode(Value));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user