wildland_cargo_lib/errors/storage.rs
1//
2// Wildland Project
3//
4// Copyright © 2022 Golem Foundation
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License version 3 as published by
8// the Free Software Foundation.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program. If not, see <https://www.gnu.org/licenses/>.
17
18use thiserror::Error;
19use wildland_corex::catlib_service::error::CatlibError;
20
21#[derive(Error, Debug, Clone, PartialEq, Eq)]
22#[repr(C)]
23pub enum GetStoragesError {
24 #[error("Get Storage error")]
25 Error,
26}
27
28#[derive(Error, Debug, Clone, PartialEq, Eq)]
29#[repr(C)]
30pub enum AddStorageError {
31 #[error("Add Storage error")]
32 Error,
33}
34
35#[derive(Error, Debug, Clone, PartialEq, Eq)]
36#[repr(C)]
37pub enum GetStorageTemplateError {
38 #[error(transparent)]
39 CatlibError(#[from] CatlibError),
40 #[error("Error while deserializing data retrieved from LSS: {0}")]
41 DeserializationError(String),
42}