app

Application contains four build configurations: production, unittests, integration test 1, integration test 2 and test client.

Unittests configuration produce dummy executable the only purpose is to run module unittests.

Production configuration is main and default configuration. There the configuration files and argument parameters are parsed, daemon or terminal mode is selected and actual rpc server starts.

Integration test 1 performs simple tests on real PostgreSQL instance. The configuration expects '--conn' parameter with valid connection string to test database. The main thing that is tested is connection pool operational correctness.

Integration test 2 performs major tests on real PostgreSQL instance. The configuration expects '--conn' parameter with valid connection string to test database. There are many tests for binary converting from libpq format. This test is the most important one as it should expose libp binary format changing while updating to new versions.

Test client is most general integration tests set. First client expects that there is an instance of production configuration is running already. The '--host' argument specifies URL the server is binded to (usually 'http://localhost:8080). The '--serverpid' argument should hold the server process PID to enable automatic server reloading while changing json-rpc table. '--conn' and '--tableName' specifies connection string to PostgreSQL and json-rpc table respectively that are used in server being tested.

Test client performs automatic rules addition to json-rpc table, testing request sending to the production server and checking returned results. Finally test client cleans up used testing rules in json-rpc table.

Members

Functions

getPid
uint getPid()
Undocumented in source. Be warned that the author may not have intended to support it.
getPidConsole
uint getPidConsole()
Undocumented in source. Be warned that the author may not have intended to support it.
loadConfig
LoadedConfig loadConfig(Options options)
Undocumented in source. Be warned that the author may not have intended to support it.
main
void main()
Undocumented in source. Be warned that the author may not have intended to support it.
main
int main(string[] args)
Undocumented in source. Be warned that the author may not have intended to support it.
main
int main(string[] args)
Undocumented in source. Be warned that the author may not have intended to support it.
resolveRootLowing
Tuple!(int, int) resolveRootLowing(ILogger logger, string groupName, string userName)

Converts group and user names to corresponding gid and uid. If the groupName or userName are already a ints, simply converts them and returns.

Structs

LoadedConfig
struct LoadedConfig
Undocumented in source.

Variables

helpStr
auto helpStr;
Undocumented in source.

Meta

License

Subject to the terms of the MIT license, as written in the included LICENSE file.

Authors

NCrashed <ncrashed@gmail.com> Zaramzan <shamyan.roman@gmail.com>