-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Product management database, schema, connection handling
- Introduce new configuration database schema, and database connection handling to this new database - Added basic API for product management - PostgreSQL server is not started automatically anymore - Products have a distinct endpoint (localhost:8001/ProductName/CodeCheckerService) in the request, and the requests are routed to the individual products based on this. - If server is started with SQLite configuration database and this is a brand new start, automatically configure a 'Default' product in the same folder. - Store a connection failure state for products that could not be connected to at server start. As no other packages manage and use database connections anymore, put the ORM and the run database handling into libcodechecker.server. This commit breaks the tests. It will be fixed later on. [ci skip]
- Loading branch information
1 parent
dc59025
commit 76f709b
Showing
24 changed files
with
1,253 additions
and
302 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,63 @@ | ||
// ------------------------------------------------------------------------- | ||
// The CodeChecker Infrastructure | ||
// This file is distributed under the University of Illinois Open Source | ||
// License. See LICENSE.TXT for details. | ||
// ------------------------------------------------------------------------- | ||
|
||
include "shared.thrift" | ||
|
||
namespace py ProductManagement | ||
namespace js codeCheckerProductManagement | ||
|
||
|
||
/* | ||
struct PrivilegeRecord { | ||
1: string name, | ||
2: bool isGroup | ||
} | ||
typedef list<PrivilegeRecord> PrivilegeRecords | ||
*/ | ||
|
||
struct DatabaseConnection { | ||
1: string engine, | ||
2: string host, | ||
3: i32 port, | ||
4: string username_b64, | ||
5: optional string password_b64, // Database password is NOT sent server->client! | ||
6: string database | ||
} | ||
|
||
/* ProductConfiguration carries administrative data regarding product settings */ | ||
struct ProductConfiguration { | ||
1: i64 id, | ||
2: string endpoint, | ||
3: string displayedName, | ||
4: string description, | ||
5: optional DatabaseConnection connection | ||
} | ||
typedef list<ProductConfiguration> ProductConfigurations | ||
|
||
/* Product carries data to the end user's product list and tasks */ | ||
struct Product { | ||
1: i64 id, | ||
2: string endpoint, | ||
3: string displayedName, | ||
4: string description, | ||
5: bool connected, // Indicates that the server could set up the database connection properly. | ||
6: bool accessible // Indicates whether the current user can access this product. | ||
} | ||
typedef list<Product> Products | ||
|
||
service codeCheckerProductService { | ||
|
||
// *** Handling the add-modify-remove of products registered *** // | ||
Products getProducts() | ||
throws (1: shared.RequestFailed requestError), | ||
|
||
bool addProduct(1: Product product) | ||
throws (1: shared.RequestFailed requestError), | ||
|
||
bool removeProduct(1: i64 productId) | ||
throws (1: shared.RequestFailed requestError) | ||
|
||
} |
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
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
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
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.