github.com/cs3org/reva/v2@v2.27.7/internal/http/services/archiver/manager/errors.go (about)

     1  // Copyright 2018-2021 CERN
     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  //
    15  // In applying this license, CERN does not waive the privileges and immunities
    16  // granted to it by virtue of its status as an Intergovernmental Organization
    17  // or submit itself to any jurisdiction.
    18  
    19  package manager
    20  
    21  // ErrMaxFileCount is the error returned when the max files count specified in the config has reached
    22  type ErrMaxFileCount struct{}
    23  
    24  // ErrMaxSize is the error returned when the max total files size specified in the config has reached
    25  type ErrMaxSize struct{}
    26  
    27  // ErrEmptyList is the error returned when an empty list is passed when an archiver is created
    28  type ErrEmptyList struct{}
    29  
    30  // Error returns the string error msg for ErrMaxFileCount
    31  func (ErrMaxFileCount) Error() string {
    32  	return "reached max files count"
    33  }
    34  
    35  // Error returns the string error msg for ErrMaxSize
    36  func (ErrMaxSize) Error() string {
    37  	return "reached max total files size"
    38  }
    39  
    40  // Error returns the string error msg for ErrEmptyList
    41  func (ErrEmptyList) Error() string {
    42  	return "list of files to archive empty"
    43  }