Skip to content

Commit

Permalink
chore: refactored
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Jones <axjns@Alexs-MBP.lan>
  • Loading branch information
Alex Jones authored and Alex Jones committed Feb 13, 2024
1 parent 6a172b8 commit d738a20
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
8 changes: 3 additions & 5 deletions protobuf/schema/v1/analyzer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@ syntax = "proto3";
package schema.v1;

import "schema/v1/server-service.proto";
option go_package = "schema/service/v1";


message AnalyzerRunRequest {
option go_package = "schema/service/v1";

}
message AnalyzerRunRequest {}

message AnalyzerRunResponse {
Result result = 1;
}

service AnalyzerService {
rpc Run(AnalyzerRunRequest) returns (AnalyzerRunResponse) {}
rpc Run(AnalyzerRunRequest) returns (AnalyzerRunResponse) {}
}
14 changes: 7 additions & 7 deletions protobuf/schema/v1/server-service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ syntax = "proto3";

package schema.v1;

option go_package = "schema/service/v1";

// well know type by google, gRPC gateway uses HTTP annotation.
import "google/api/annotations.proto";

option go_package = "schema/service/v1";

message AnalyzeRequest {
string backend = 1;
string namespace = 2;
Expand Down Expand Up @@ -119,21 +119,21 @@ message ListIntegrationsResponse {
}

service ServerService {
rpc Analyze(AnalyzeRequest) returns (AnalyzeResponse) {
rpc Analyze(AnalyzeRequest) returns (AnalyzeResponse) {
// option type is http
option (google.api.http) = {
// this is url, for RESTfull/JSON api and method
// this line means when a HTTP post request comes with "/v1/analyze" call this rpc method over this service
post: "/v1/analyze"
};
post: "/v1/analyze"
};
}
rpc AddConfig(AddConfigRequest) returns (AddConfigResponse) {}
rpc RemoveConfig(RemoveConfigRequest) returns (RemoveConfigResponse) {}
rpc ListIntegrations(ListIntegrationsRequest) returns (ListIntegrationsResponse) {
// option type is http
option (google.api.http) = {
// this line means when a HTTP GET request comes with "/v1/list" call this rpc method over this service
get: "/v1/list"
};
get: "/v1/list"
};
}
}

0 comments on commit d738a20

Please sign in to comment.