-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #319 from whdalsrnt/master
Add MetricExample APIs
- Loading branch information
Showing
2 changed files
with
135 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters