api.fabaccess-api/resources.capnp
2024-03-30 19:20:42 +01:00

25 lines
1017 B
Cap'n Proto

@0xe89d197dcef9c49b;
using CSharp = import "programming_language/csharp.capnp";
$CSharp.namespace("FabAccessAPI.Schema");
using import "resource.capnp".Resource;
using import "claim.capnp".Claim;
interface Resources {
claimed @0 () -> ( claimed :List(Claim) );
# Returns the list of valid claims the session owner of this `Resources` currently has.
list @1 () -> ( resources :List(Resource) );
# Returns all resources that the user can currently disclose.
getByName @2 ( name :Text ) -> ( resource :Resource );
# Returns a NULL capability if the resource doesn't exist or a user doesn't have read permission for that resource.
getByUrn @3 ( urn :Text ) -> ( resource :Resource );
# Returns a NULL capability if the resource doesn't exist or a user doesn't have read permission for that resource.
getByUrl @4 ( url :Text ) -> ( resource :Resource );
# Returns a NULL capability if the resource doesn't exist or a user doesn't have read permission for that resource.
}