forked from raystack/proton
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(shield): add get resource of a principal
- Loading branch information
1 parent
293abec
commit fdab1e9
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
syntax = "proto3"; | ||
|
||
package gotocompany.shield.v1beta1; | ||
|
||
import "google/api/annotations.proto"; | ||
import "protoc-gen-openapiv2/options/annotations.proto"; | ||
import "google/protobuf/struct.proto"; | ||
|
||
option go_package = "github.com/goto/proton/shield/v1;shieldv1beta1"; | ||
option java_outer_classname = "Public"; | ||
option java_package = "com.gotocompany.proton.shield.v1beta1"; | ||
// These annotations are used when generating the OpenAPI file. | ||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { | ||
info: { | ||
title: "Public", | ||
version: "0.1.0"; | ||
}; | ||
schemes: HTTP; | ||
}; | ||
|
||
service PublicService { | ||
rpc GetResourceOfPrincipal(GetResourceOfPrincipalRequest) returns (GetResourceOfPrincipalResponse) { | ||
option (google.api.http) = { | ||
get: "/v1beta1/users/{user_id}/resources", | ||
}; | ||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { | ||
tags: "Public"; | ||
summary: "Get Resources with Authorized Principal Access"; | ||
}; | ||
} | ||
} | ||
|
||
message GetResourceOfPrincipalRequest { | ||
string user_id = 1; | ||
repeated string types = 2; | ||
} | ||
|
||
message GetResourceOfPrincipalResponse { | ||
repeated google.protobuf.Struct resources = 1; | ||
} |