mirror of
				https://github.com/onepanelio/onepanel.git
				synced 2025-11-01 01:02:32 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			133 lines
		
	
	
		
			2.9 KiB
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
			
		
		
	
	
			133 lines
		
	
	
		
			2.9 KiB
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
| syntax = "proto3";
 | |
| 
 | |
| package api;
 | |
| 
 | |
| import "google/protobuf/empty.proto";
 | |
| import "google/api/annotations.proto";
 | |
| 
 | |
| service SecretService {
 | |
|     rpc CreateSecret (CreateSecretRequest) returns (google.protobuf.Empty) {
 | |
|         option (google.api.http) = {
 | |
|             post: "/apis/v1beta1/{namespace}/secrets"
 | |
|             body: "secret"
 | |
|         };
 | |
|     }
 | |
| 
 | |
|     rpc SecretExists(SecretExistsRequest) returns (SecretExistsResponse) {
 | |
|         option (google.api.http) = {
 | |
|             get: "/apis/v1beta1/{namespace}/secrets/{name}/exists"
 | |
|         };
 | |
|     }
 | |
| 
 | |
|     rpc GetSecret (GetSecretRequest) returns (Secret) {
 | |
|         option (google.api.http) = {
 | |
|             get: "/apis/v1beta1/{namespace}/secrets/{name}"
 | |
|         };
 | |
|     }
 | |
| 
 | |
|     rpc ListSecrets(ListSecretsRequest) returns (ListSecretsResponse) {
 | |
|         option (google.api.http) = {
 | |
|             get: "/apis/v1beta1/{namespace}/secrets"
 | |
|         };
 | |
|     }
 | |
| 
 | |
|     rpc DeleteSecret(DeleteSecretRequest) returns (DeleteSecretResponse) {
 | |
|         option (google.api.http) = {
 | |
|             delete: "/apis/v1beta1/{namespace}/secrets/{name}"
 | |
|         };
 | |
|     }
 | |
| 
 | |
|     rpc DeleteSecretKey(DeleteSecretKeyRequest) returns (DeleteSecretKeyResponse) {
 | |
|         option (google.api.http) = {
 | |
|             delete: "/apis/v1beta1/{namespace}/secrets/{secretName}/keys/{key}"
 | |
|         };
 | |
|     }
 | |
| 
 | |
|     rpc AddSecretKeyValue (AddSecretKeyValueRequest) returns (AddSecretKeyValueResponse) {
 | |
|         option (google.api.http) = {
 | |
|             post: "/apis/v1beta1/{namespace}/secrets/{secret.name}"
 | |
|             body: "secret"
 | |
|         };
 | |
|     }
 | |
| 
 | |
|     rpc UpdateSecretKeyValue(UpdateSecretKeyValueRequest) returns (UpdateSecretKeyValueResponse) {
 | |
|         option (google.api.http) = {
 | |
|             patch: "/apis/v1beta1/{namespace}/secrets/{secret.name}"
 | |
|             body: "secret"
 | |
|         };
 | |
|     }
 | |
| 
 | |
| }
 | |
| 
 | |
| message AddSecretKeyValueRequest {
 | |
|     string namespace = 1;
 | |
|     Secret secret = 2;
 | |
| }
 | |
| 
 | |
| message AddSecretKeyValueResponse {
 | |
|     bool inserted = 1;
 | |
| }
 | |
| 
 | |
| message SecretExistsRequest {
 | |
|     string namespace = 1;
 | |
|     string name = 2;
 | |
| }
 | |
| 
 | |
| message SecretExistsResponse {
 | |
|     bool exists = 1;
 | |
| }
 | |
| 
 | |
| message UpdateSecretKeyValueRequest {
 | |
|     string namespace = 1;
 | |
|     Secret secret = 2;
 | |
| 
 | |
| }
 | |
| 
 | |
| message UpdateSecretKeyValueResponse {
 | |
|     bool updated = 1;
 | |
| }
 | |
| 
 | |
| message DeleteSecretRequest {
 | |
|     string namespace = 1;
 | |
|     string name = 2;
 | |
| }
 | |
| 
 | |
| message DeleteSecretKeyRequest {
 | |
|     string namespace = 1;
 | |
|     string secretName = 2;
 | |
|     string key = 3;
 | |
| }
 | |
| 
 | |
| message DeleteSecretKeyResponse {
 | |
|     bool deleted = 1;
 | |
| }
 | |
| 
 | |
| message DeleteSecretResponse {
 | |
|     bool deleted = 1;
 | |
| }
 | |
| 
 | |
| message ListSecretsRequest {
 | |
|     string namespace = 1;
 | |
| }
 | |
| 
 | |
| message ListSecretsResponse {
 | |
|     int32 count = 1;
 | |
|     repeated Secret secrets = 2;
 | |
| }
 | |
| 
 | |
| message CreateSecretRequest {
 | |
|     string namespace = 1;
 | |
|     Secret secret = 2;
 | |
| }
 | |
| 
 | |
| message GetSecretRequest {
 | |
|     string namespace = 1;
 | |
|     string name = 2;
 | |
| }
 | |
| 
 | |
| message Secret {
 | |
|     string name = 1;
 | |
|     map<string, string> data = 2;
 | |
| }
 | |
| 
 | 
