forked from anydistro/bxt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Separated messages into separate structs - Refactored controllers to use reflection and shared error creation functions - Adapted frontend to API changes - Unified API paths - Updated OpenAPI spec
- Loading branch information
1 parent
c952ce2
commit e7ba67a
Showing
27 changed files
with
689 additions
and
651 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* === This file is part of bxt === | ||
* | ||
* SPDX-FileCopyrightText: 2024 Artem Grinev <agrinev@manjaro.org> | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
* | ||
*/ | ||
#pragma once | ||
|
||
#include <string> | ||
|
||
namespace bxt::Presentation { | ||
struct AuthRequest { | ||
std::string name; | ||
std::string password; | ||
}; | ||
} // namespace bxt::Presentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* === This file is part of bxt === | ||
* | ||
* SPDX-FileCopyrightText: 2024 Artem Grinev <agrinev@manjaro.org> | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
* | ||
*/ | ||
#pragma once | ||
|
||
#include "core/application/dtos/PackageSectionDTO.h" | ||
#include "presentation/messages/SectionMessages.h" | ||
|
||
#include <string> | ||
#include <unordered_map> | ||
#include <vector> | ||
|
||
namespace bxt::Presentation { | ||
|
||
using CompareRequest = std::vector<SectionRequest>; | ||
|
||
using LocationMap = std::unordered_map<std::string, std::string>; | ||
using SectionMap = std::unordered_map<std::string, LocationMap>; | ||
|
||
struct CompareResponse { | ||
std::vector<Core::Application::PackageSectionDTO> sections; | ||
std::unordered_map<std::string, SectionMap> compare_table; | ||
}; | ||
} // namespace bxt::Presentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* === This file is part of bxt === | ||
* | ||
* SPDX-FileCopyrightText: 2024 Artem Grinev <agrinev@manjaro.org> | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
* | ||
*/ | ||
#pragma once | ||
|
||
#include "core/domain/enums/LogEntryType.h" | ||
#include "presentation/messages/PackageMessages.h" | ||
|
||
#include <string> | ||
|
||
namespace bxt::Presentation { | ||
|
||
struct LogEntryReponse { | ||
std::string id; | ||
uint64_t time; | ||
Core::Domain::LogEntryType type; | ||
PackageResponse package; | ||
}; | ||
|
||
using LogResponse = std::vector<LogEntryReponse>; | ||
} // namespace bxt::Presentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* === This file is part of bxt === | ||
* | ||
* SPDX-FileCopyrightText: 2024 Artem Grinev <agrinev@manjaro.org> | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
* | ||
*/ | ||
#pragma once | ||
|
||
#include "core/application/dtos/PackageSectionDTO.h" | ||
#include "presentation/messages/SectionMessages.h" | ||
|
||
#include <string> | ||
#include <unordered_map> | ||
|
||
namespace bxt::Presentation { | ||
|
||
struct SnapRequest { | ||
SectionRequest source; | ||
SectionRequest target; | ||
}; | ||
|
||
struct PoolEntryResponse { | ||
std::string version; | ||
bool has_signature; | ||
}; | ||
|
||
struct PackageResponse { | ||
std::string name; | ||
Core::Application::PackageSectionDTO section; | ||
std::unordered_map<std::string, PoolEntryResponse> pool_entries; | ||
std::string preferred_location; | ||
}; | ||
} // namespace bxt::Presentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* === This file is part of bxt === | ||
* | ||
* SPDX-FileCopyrightText: 2024 Artem Grinev <agrinev@manjaro.org> | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
* | ||
*/ | ||
#pragma once | ||
|
||
#include "core/application/dtos/PackageSectionDTO.h" | ||
|
||
namespace bxt::Presentation { | ||
|
||
using SectionRequest = Core::Application::PackageSectionDTO; | ||
|
||
using SectionReponse = Core::Application::PackageSectionDTO; | ||
|
||
} // namespace bxt::Presentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* === This file is part of bxt === | ||
* | ||
* SPDX-FileCopyrightText: 2024 Artem Grinev <agrinev@manjaro.org> | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
* | ||
*/ | ||
#pragma once | ||
|
||
#include <optional> | ||
#include <set> | ||
#include <string> | ||
|
||
namespace bxt::Presentation { | ||
struct AddUserRequest { | ||
std::string name; | ||
std::string password; | ||
std::optional<std::set<std::string>> permissions; | ||
}; | ||
|
||
struct UpdateUserRequest { | ||
std::string name; | ||
std::optional<std::string> password; | ||
std::optional<std::set<std::string>> permissions; | ||
}; | ||
|
||
struct RemoveUserRequest { | ||
std::string name; | ||
}; | ||
|
||
struct UserResponse { | ||
std::string name; | ||
std::set<std::string> permissions; | ||
}; | ||
} // namespace bxt::Presentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.