-
Notifications
You must be signed in to change notification settings - Fork 5
/
secrets.v1beta.proto
100 lines (78 loc) · 1.96 KB
/
secrets.v1beta.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
syntax = "proto3";
package semaphore.secrets.v1beta;
option go_package = "./secrets.v1beta;semaphore_secrets_v1beta";
service SecretsApi {
rpc ListSecrets(ListSecretsRequest) returns (ListSecretsResponse);
rpc GetSecret(GetSecretRequest) returns (Secret);
rpc CreateSecret(Secret) returns (Secret);
rpc UpdateSecret(UpdateSecretRequest) returns (Secret);
rpc DeleteSecret(DeleteSecretRequest) returns (Empty);
}
message Secret {
message Metadata {
string name = 1;
string id = 2;
int64 create_time = 3; // unix timestamp of secret creation
int64 update_time = 4; // unix timestamp of last update
int64 checkout_at = 5; // unix timestamp of last checkout (usage of secret)
bool content_included = 6; // if true, content is included in the response
}
message EnvVar {
string name = 1;
string value = 2;
}
message File {
string path = 1;
string content = 2;
}
message Data {
repeated EnvVar env_vars = 1;
repeated File files = 2;
}
message OrgConfig {
enum ProjectsAccess {
ALL = 0;
ALLOWED = 1;
NONE = 2;
}
enum JobAttachAccess {
JOB_ATTACH_YES = 0;
JOB_ATTACH_NO = 2;
}
enum JobDebugAccess {
JOB_DEBUG_YES = 0;
JOB_DEBUG_NO = 2;
}
ProjectsAccess projects_access = 1;
repeated string project_ids = 2;
JobDebugAccess debug_access = 3;
JobAttachAccess attach_access = 4;
}
Metadata metadata = 1;
Data data = 2;
OrgConfig org_config = 3;
}
message ListSecretsRequest {
enum Order {
BY_NAME_ASC = 0;
BY_CREATE_TIME_ASC = 1;
}
int32 page_size = 1;
string page_token = 2;
Order order = 3;
}
message ListSecretsResponse {
repeated Secret secrets = 1;
string next_page_token = 2;
}
message GetSecretRequest {
string secret_id_or_name = 1;
}
message UpdateSecretRequest {
string secret_id_or_name = 1;
Secret secret = 2;
}
message DeleteSecretRequest {
string secret_id_or_name = 1;
}
message Empty {}