Skip to content

Commit

Permalink
Merge pull request #22 from k8sgpt-ai/sbadla1-main
Browse files Browse the repository at this point in the history
chore: merged from main
  • Loading branch information
AlexsJones authored Feb 8, 2024
2 parents b1f9bd3 + d2f3748 commit 382aeae
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
13 changes: 13 additions & 0 deletions protobuf/buf.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated by buf. DO NOT EDIT.
version: v1
deps:
- remote: buf.build
owner: googleapis
repository: googleapis
commit: 7e6f6e774e29406da95bd61cdcdbc8bc
digest: shake256:fe43dd2265ea0c07d76bd925eeba612667cf4c948d2ce53d6e367e1b4b3cb5fa69a51e6acb1a6a50d32f894f054a35e6c0406f6808a483f2752e10c866ffbf73
- remote: buf.build
owner: grpc-ecosystem
repository: grpc-gateway
commit: 3f42134f4c564983838425bc43c7a65f
digest: shake256:3d11d4c0fe5e05fda0131afefbce233940e27f0c31c5d4e385686aea58ccd30f72053f61af432fa83f1fc11cda57f5f18ca3da26a29064f73c5a0d076bba8d92
2 changes: 1 addition & 1 deletion protobuf/schema/v1/analyzer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package schema.v1;

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


Expand Down
20 changes: 18 additions & 2 deletions protobuf/schema/v1/server-service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ package schema.v1;

option go_package = "schema/service/v1";

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

message AnalyzeRequest {
string backend = 1;
string namespace = 2;
Expand Down Expand Up @@ -116,8 +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"
};
}
rpc AddConfig(AddConfigRequest) returns (AddConfigResponse) {}
rpc RemoveConfig(RemoveConfigRequest) returns (RemoveConfigResponse) {}
rpc ListIntegrations(ListIntegrationsRequest) returns (ListIntegrationsResponse) {}
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"
};
}
}

0 comments on commit 382aeae

Please sign in to comment.