Skip to main content

rustfs_config/constants/
quota.rs

1// Copyright 2024 RustFS Team
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15pub const QUOTA_CONFIG_FILE: &str = "quota.json";
16pub const QUOTA_TYPE_HARD: &str = "HARD";
17
18pub const QUOTA_EXCEEDED_ERROR_CODE: &str = "XRustfsQuotaExceeded";
19pub const QUOTA_INVALID_CONFIG_ERROR_CODE: &str = "InvalidArgument";
20pub const QUOTA_NOT_FOUND_ERROR_CODE: &str = "NoSuchBucket";
21pub const QUOTA_INTERNAL_ERROR_CODE: &str = "InternalError";
22
23pub const QUOTA_API_PATH: &str = "/rustfs/admin/v3/quota/{bucket}";
24
25pub const QUOTA_INVALID_TYPE_ERROR_MSG: &str = "Only HARD quota type is supported";
26pub const QUOTA_METADATA_SYSTEM_ERROR_MSG: &str = "Bucket metadata system not initialized";