-
Notifications
You must be signed in to change notification settings - Fork 2
/
certificate.proto
104 lines (84 loc) · 3.36 KB
/
certificate.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
101
102
103
104
syntax = "proto3";
package hiber.certificate;
import "base.proto";
option java_multiple_files = false;
option java_package = "global.hiber.api.grpc.certificate";
option java_outer_classname = "CertificateApi";
option go_package = ".;hiber";
service CertificateService {
rpc List (ListCertificatesRequest) returns (ListCertificatesRequest.Response);
rpc Rename (RenameCertificateRequest) returns (RenameCertificateRequest.Response);
rpc Upload (UploadCertificateRequest) returns (UploadCertificateRequest.Response);
rpc Delete (DeleteCertificateRequest) returns (DeleteCertificateRequest.Response);
}
message Certificate {
int64 id = 1;
string name = 2;
BytesOrHex certificate = 3;
bool has_private_key = 4;
optional string ca_certificate_name = 5;
optional int64 ca_certificate_id = 6;
}
message CertificateSelection {
repeated int64 certificate_ids = 1;
optional string search = 2;
repeated int64 ca_certificate_ids = 3;
}
message ListCertificatesRequest {
message Response {
repeated Certificate certificates = 1;
ListCertificatesRequest request = 2;
Pagination.Result pagination = 3;
}
/* Pick the organization to use (/impersonate). If unset, your default organization is used. */
optional string organization = 1;
/* Select the certificates to list. Optional, when omitted or empty everything is included. */
optional CertificateSelection selection = 2;
optional Pagination pagination = 3;
/* Include the actual certificate content in the response. */
optional bool include_certificate_content_in_response = 4;
}
message UploadCertificateRequest {
message Response {
Certificate certificate = 1;
UploadCertificateRequest request = 2;
}
message UploadCertificate {
string name = 1;
BytesOrHex certificate = 2;
/* Private key is optional, and will not be retrievable from the API */
BytesOrHex private_key = 3;
}
/* Pick the organization to use (/impersonate). If unset, your default organization is used. */
optional string organization = 1;
UploadCertificate upload_certificate = 2;
/* Optionally, either upload a CA certificate or provide the id of a previously uploaded CA certificate. */
oneof ca_certificate {
UploadCertificate upload_ca_certificate = 3;
int64 ca_certificate_id = 4;
}
/* Include the actual certificate content in the response. */
optional bool include_certificate_content_in_response = 5;
}
message RenameCertificateRequest {
message Response {
repeated Certificate certificates = 1;
RenameCertificateRequest request = 2;
Pagination.Result pagination = 3;
}
/* Pick the organization to use (/impersonate). If unset, your default organization is used. */
optional string organization = 1;
CertificateSelection selection = 2;
string new_name = 3;
/* Include the actual certificate content in the response. */
optional bool include_certificate_content_in_response = 4;
}
message DeleteCertificateRequest {
message Response {
repeated int64 deleted_certificate_ids = 1;
DeleteCertificateRequest request = 2;
}
/* Pick the organization to use (/impersonate). If unset, your default organization is used. */
optional string organization = 1;
CertificateSelection selection = 2;
}