Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions odpf/common/v1/service.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
syntax = "proto3";

package odpf.common.v1;

import "protoc-gen-openapiv2/options/annotations.proto";
import "google/api/annotations.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/odpf/proton/common/v1";
option java_multiple_files = true;
option java_package = "io.odpf.proton.common";
option java_outer_classname = "CommonServiceProto";


option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
info: {
version: "0.1.0";
};
external_docs: {
description: "Common endpoints for all services";
}
schemes: HTTP;
};

service CommonService {
rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {
option (google.api.http) = {
post: "/v1/version"
body: "*"
};
}
}

message GetVersionRequest {
Version client = 1;
}

message GetVersionResponse {
Version server = 1;
}

message Version {
string version = 1;
string commit = 2;
google.protobuf.Timestamp build_time = 3;
string lang_version = 4;
string os = 5;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do we think about making some of these enums? Like OS and ARCH ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That will be better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was checking for different languages have different ways to denote os and arch, everyone will need to maintain mappings for the same. Hence letting these be of string type.

string architecture = 6;
}