Skip to content

Commit 2810250

Browse files
authored
Merge pull request #510 from ggildong/master
feat: add variable api to opsflow
2 parents 5f077c9 + 274f879 commit 2810250

File tree

1 file changed

+110
-0
lines changed

1 file changed

+110
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
syntax = "proto3";
2+
3+
package spaceone.api.opsflow.v1;
4+
5+
option go_package = "github.com/cloudforet-io/api/dist/go/spaceone/api/opsflow/v1";
6+
7+
import "google/protobuf/empty.proto";
8+
import "google/protobuf/struct.proto";
9+
import "google/api/annotations.proto";
10+
import "spaceone/api/core/v2/query.proto";
11+
12+
13+
service Variable {
14+
rpc create (VariableCreateRequest) returns (VariableInfo) {
15+
option (google.api.http) = {
16+
post: "/opsflow/v1/variable/create"
17+
body: "*"
18+
};
19+
}
20+
rpc update (VariableUpdateRequest) returns (VariableInfo) {
21+
option (google.api.http) = {
22+
post: "/opsflow/v1/variable/update"
23+
body: "*"
24+
};
25+
}
26+
rpc delete (VariableRequest) returns (google.protobuf.Empty) {
27+
option (google.api.http) = {
28+
post: "/opsflow/v1/variable/delete"
29+
body: "*"
30+
};
31+
}
32+
rpc get (VariableRequest) returns (VariableInfo) {
33+
option (google.api.http) = {
34+
post: "/opsflow/v1/variable/get"
35+
body: "*"
36+
};
37+
}
38+
rpc list (VariableSearchQuery) returns (VariablesInfo) {
39+
option (google.api.http) = {
40+
post: "/opsflow/v1/variable/list"
41+
body: "*"
42+
};
43+
}
44+
rpc stat (VariableStatQuery) returns (google.protobuf.Struct) {
45+
option (google.api.http) = {
46+
post: "/opsflow/v1/variable/stat"
47+
body: "*"
48+
};
49+
}
50+
}
51+
52+
enum ResourceGroup {
53+
RESOURCE_GROUP_NONE = 0;
54+
DOMAIN = 1;
55+
WORKSPACE = 2;
56+
}
57+
58+
message VariableCreateRequest {
59+
string name = 1;
60+
string value = 2;
61+
// +optional
62+
google.protobuf.Struct tags = 3;
63+
// +optional
64+
ResourceGroup resource_group = 4;
65+
// +optional
66+
string workspace_id = 21;
67+
}
68+
69+
message VariableUpdateRequest {
70+
string name = 1;
71+
// +optional
72+
string value = 2;
73+
// +optional
74+
google.protobuf.Struct tags = 3;
75+
}
76+
77+
message VariableRequest {
78+
string name = 1;
79+
}
80+
81+
message VariableSearchQuery {
82+
// +optional
83+
spaceone.api.core.v2.Query query = 1;
84+
// +optional
85+
string name = 2;
86+
// +optional
87+
string workspace_id = 21;
88+
}
89+
90+
message VariableInfo {
91+
string name = 1;
92+
string value = 2;
93+
google.protobuf.Struct tags = 3;
94+
ResourceGroup resource_group = 4;
95+
96+
string domain_id = 21;
97+
string workspace_id = 22;
98+
99+
string created_at = 31;
100+
string updated_at = 32;
101+
}
102+
103+
message VariablesInfo {
104+
repeated VariableInfo results = 1;
105+
int32 total_count = 2;
106+
}
107+
108+
message VariableStatQuery {
109+
spaceone.api.core.v2.StatisticsQuery query = 1;
110+
}

0 commit comments

Comments
 (0)