credentials.proto•3.85 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.credentials.v1beta2;
// The Credentials service definition
service CredentialsService {
// Creates a new set of Credentials
rpc CreateCredentials (CreateCredentialsRequest) returns (CreateCredentialsResponse) {}
// Updates an existing set of Credentials
rpc UpdateCredentials (UpdateCredentialsRequest) returns (UpdateCredentialsResponse) {}
// Gets the details of a given set of Credentials
rpc GetCredentials (GetCredentialsRequest) returns (Credentials) {}
// Deletes an existing set of Credentials
rpc DeleteCredentials (DeleteCredentialsRequest) returns (DeleteCredentialsResponse) {}
// Lists all Credentials
rpc ListCredentials (ListCredentialsRequest) returns (ListCredentialsResponse) {}
}
// The message for the Credentials resource
message Credentials {
// The reference of the Credentials
string ref = 1;
// The name of the Credentials
string name = 2;
// The username of the Credentials
string username = 3;
// The time the Credentials was created
int32 created_at = 4;
// The time the Credentials was updated
int32 updated_at = 5;
}
// The request message for the Credentials.CreateCredentials method
message CreateCredentialsRequest {
// The name of the Credentials
string name = 1;
// The username of the Credentials
string username = 2;
// The password of the Credentials
string password = 3;
}
// The response message for the Credentials.CreateCredentials method
message CreateCredentialsResponse {
// The reference of the created Credentials
string ref = 1;
}
// The request message for the Credentials.UpdateCredentials method
message UpdateCredentialsRequest {
// The reference of the Credentials to update
string ref = 1;
// The new name of the Credentials
string name = 2;
// The new username of the Credentials
string username = 3;
// The new password of the Credentials
string password = 4;
}
// The response message for the Credentials.UpdateCredentials method
message UpdateCredentialsResponse {
// The reference of the updated Credentials
string ref = 1;
}
// The request message for the Credentials.GetCredentials method
message GetCredentialsRequest {
// The reference of the Credentials to retrieve
string ref = 1;
}
// The request message for the Credentials.DeleteCredentials method
message DeleteCredentialsRequest {
// The reference of the Credentials to delete
string ref = 1;
}
// The response message for the Credentials.DeleteCredentials method
message DeleteCredentialsResponse {
// The reference of the deleted Credentials
string ref = 1;
}
// The request message for the Credentials.ListCredentials method
message ListCredentialsRequest {
// 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 Credentials.ListCredentials method
message ListCredentialsResponse {
// List of Credentials
repeated Credentials 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;
}