secrets.proto•3.35 kB
/*
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
* http://github.com/fonoster/fonoster
*
* This file is part of Fonoster
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = "proto3";
package fonoster.secrets.v1beta2;
// The Secrets service definition
service Secrets {
// Creates a new Secret
rpc CreateSecret (CreateSecretRequest) returns (CreateSecretResponse) {}
// Updates an existing set of Secret
rpc UpdateSecret (UpdateSecretRequest) returns (UpdateSecretResponse) {}
// Gets the details of a given set of Secret
rpc GetSecret (GetSecretRequest) returns (Secret) {}
// Deletes an existing Secret
rpc DeleteSecret (DeleteSecretRequest) returns (DeleteSecretResponse) {}
// Lists all Secrets
rpc ListSecrets (ListSecretsRequest) returns (ListSecretsResponse) {}
}
// The message for the Secret resource
message Secret {
// The reference of the Secret
string ref = 1;
// Friendly name of the Secret
string name = 2;
// The actual secret
string secret = 3;
// The time the Secret was created
int32 created_at = 4;
// The time the Secret was updated
int32 updated_at = 5;
}
// The request message for the Secrets.CreateSecret method
message CreateSecretRequest {
// Friendly name of the Secret
string name = 1;
// The actual secret
string secret = 2;
}
// The response message for the Secrets.CreateSecret method
message CreateSecretResponse {
// The reference of the created Secret
string ref = 1;
}
// The request message for the Secrets.UpdateSecret method
message UpdateSecretRequest {
// The reference of the Secret to update
string ref = 1;
// The new name of the Secret
string name = 2;
// Updated secret
string secret = 3;
}
// The response message for the Secrets.UpdateSecret method
message UpdateSecretResponse {
// The reference of the updated Secret
string ref = 1;
}
// The request message for the Secrets.GetSecret method
message GetSecretRequest {
// The reference of the Secret to retrieve
string ref = 1;
}
// The request message for the Secrets.DeleteSecret method
message DeleteSecretRequest {
// The reference of the Secret to delete
string ref = 1;
}
// The response message for the Secrets.DeleteSecret method
message DeleteSecretResponse {
// The reference of the deleted Secret
string ref = 1;
}
// The request message for the Secrets.ListSecret method
message ListSecretsRequest {
// The maximum number of items in the list
int32 page_size = 1;
// The next_page_token value returned from the previous request, if any
string page_token = 2;
}
// The response message for the Secrets.ListSecret method
message ListSecretsResponse {
// List of Secret
repeated Secret items = 1;
// Token to retrieve the next page of results, or empty if there are no more results in the list
string next_page_token = 2;
}