Skip to content

Commit

Permalink
Merge pull request #319 from whdalsrnt/master
Browse files Browse the repository at this point in the history
Add MetricExample APIs
  • Loading branch information
whdalsrnt authored Apr 24, 2024
2 parents 42052b9 + 59b5b41 commit 1cb4801
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 4 deletions.
126 changes: 126 additions & 0 deletions proto/spaceone/api/inventory/v1/metric_example.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
syntax = "proto3";

package spaceone.api.inventory.v1;

import "google/protobuf/empty.proto";
import "google/protobuf/struct.proto";
import "google/api/annotations.proto";
import "spaceone/api/core/v2/query.proto";

option go_package = "github.com/cloudforet-io/api/dist/go/spaceone/api/inventory/v1";

service MetricExample {
rpc create (CreateMetricExampleRequest) returns (MetricExampleInfo) {
option (google.api.http) = {
post: "/inventory/v1/metric-example/create"
body: "*"
};
}

rpc update (UpdateMetricExampleRequest) returns (MetricExampleInfo) {
option (google.api.http) = {
post: "/inventory/v1/metric-example/update"
body: "*"
};
}

rpc delete (MetricExampleRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/inventory/v1/metric-example/delete"
body: "*"
};
}

rpc get (MetricExampleRequest) returns (MetricExampleInfo) {
option (google.api.http) = {
post: "/inventory/v1/metric-example/get"
body: "*"
};
}

rpc list (MetricExampleQuery) returns (MetricExamplesInfo) {
option (google.api.http) = {
post: "/inventory/v1/metric-example/list"
body: "*"
};
}

rpc stat (MetricExampleStatQuery) returns (google.protobuf.Struct) {
option (google.api.http) = {
post: "/inventory/v1/metric-example/stat"
body: "*"
};
}
}

//{
//
//}
message CreateMetricExampleRequest {
string metric_id = 1;
// +optional
string name = 2;
google.protobuf.Struct options = 3;
// +optional
google.protobuf.Struct tags = 4;
}

//{
//
//}
message UpdateMetricExampleRequest {
string example_id = 1;
// +optional
string name = 2;
// +optional
google.protobuf.Struct options = 3;
// +optional
google.protobuf.Struct tags = 4;
}

//{
//
//}
message MetricExampleRequest {
string example_id = 1;
}

//{
//
//}
message MetricExampleQuery {
// +optional
spaceone.api.core.v2.Query query = 1;
// +optional
string example_id = 2;
// +optional
string name = 3;
// +optional
string metric_id = 4;
}

//{
//
//}
message MetricExampleInfo {
string example_id = 1;
string name = 2;
google.protobuf.Struct options = 3;
google.protobuf.Struct tags = 4;

string domain_id = 21;
string user_id = 22;
string metric_id = 23;

string created_at = 31;
string updated_at = 32;
}

message MetricExamplesInfo {
repeated MetricExampleInfo results = 1;
int32 total_count = 2;
}

message MetricExampleStatQuery {
spaceone.api.core.v2.StatisticsQuery query = 1;
}
13 changes: 9 additions & 4 deletions proto/spaceone/api/inventory/v1/namespace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ message CreateNamespaceRequest {
// +optional
string provider = 4;
// +optional
google.protobuf.Struct tags = 5;
string icon = 5;
// +optional
google.protobuf.Struct tags = 6;
}

//{
Expand All @@ -75,7 +77,9 @@ message UpdateNamespaceRequest {
// +optional
string name = 2;
// +optional
google.protobuf.Struct tags = 3;
string icon = 3;
// +optional
google.protobuf.Struct tags = 4;
}

//{
Expand Down Expand Up @@ -111,8 +115,9 @@ message NamespaceInfo {
string name = 2;
string category = 3;
string provider = 4;
google.protobuf.Struct tags = 5;
bool is_managed = 6;
string icon = 5;
google.protobuf.Struct tags = 6;
bool is_managed = 7;

string domain_id = 21;

Expand Down

0 comments on commit 1cb4801

Please sign in to comment.