Skip to content

Commit

Permalink
feat(shield): add get resource of a principal
Browse files Browse the repository at this point in the history
  • Loading branch information
FemiNoviaLina committed Sep 5, 2024
1 parent 293abec commit fdab1e9
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions gotocompany/shield/v1beta1/public.proto
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;
}

0 comments on commit fdab1e9

Please sign in to comment.