acls.proto•3.12 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.acls.v1beta2;
// AccessControlList(Acl) service definition
service Acls {
// Create a new Acl
rpc CreateAcl (CreateAclRequest) returns (CreateAclResponse) {}
// Update an existing Acl
rpc UpdateAcl (UpdateAclRequest) returns (UpdateAclResponse) {}
// Get an existing Acl
rpc GetAcl (GetAclRequest) returns (Acl) {}
// Delete an existing Acl
rpc DeleteAcl (DeleteAclRequest) returns (DeleteAclResponse) {}
// Get a list of Acls
rpc ListAcls (ListAclsRequest) returns (ListAclsResponse) {}
}
// The message for Acl resource
message Acl {
// The Acl reference
string ref = 1;
// A friendly name for the Acl
string name = 2;
// The list of allowed IP addresses
repeated string allow = 3;
// The date the Acl was created
int32 created_at = 4;
// The date the Acl was last updated
int32 updated_at = 5;
}
// The request message for the Acl.CreateAcl method
message CreateAclRequest {
// A friendly name for the Acl
string name = 1;
// The list of allowed IP addresses
repeated string allow = 2;
}
// The response message for the Acl.CreateAcl method
message CreateAclResponse {
// The Acl reference
string ref = 1;
}
// The request message for the Acl.UpdateAcl method
message UpdateAclRequest {
// The Acl reference
string ref = 1;
// A friendly name for the Acl
string name = 2;
// The list of allowed IP addresses
repeated string allow = 3;
}
// The response message for the Acl.UpdateAcl method
message UpdateAclResponse {
// The Acl reference
string ref = 1;
}
// The request message for the Acl.GetAcl method
message GetAclRequest {
// The Acl reference
string ref = 1;
}
// The request message for the Acl.DeleteAcl method
message DeleteAclRequest {
// The Acl reference
string ref = 1;
}
// The response message for the Acl.DeleteAcl method
message DeleteAclResponse {
// The Acl reference
string ref = 1;
}
// The request message for the Acl.ListAcl method
message ListAclsRequest {
// 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 Acl.ListAcl method
message ListAclsResponse {
// List of items
repeated Acl 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;
}