mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
adding config to git
This commit is contained in:
parent
a9687ed9be
commit
c962050b30
@ -27,7 +27,8 @@
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\": "src/"
|
||||
"App\\": "src/",
|
||||
"" : "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
|
||||
10
composer.lock
generated
10
composer.lock
generated
@ -3860,16 +3860,16 @@
|
||||
},
|
||||
{
|
||||
"name": "seld/jsonlint",
|
||||
"version": "1.7.1",
|
||||
"version": "1.7.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Seldaek/jsonlint.git",
|
||||
"reference": "d15f59a67ff805a44c50ea0516d2341740f81a38"
|
||||
"reference": "e2e5d290e4d2a4f0eb449f510071392e00e10d19"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/d15f59a67ff805a44c50ea0516d2341740f81a38",
|
||||
"reference": "d15f59a67ff805a44c50ea0516d2341740f81a38",
|
||||
"url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/e2e5d290e4d2a4f0eb449f510071392e00e10d19",
|
||||
"reference": "e2e5d290e4d2a4f0eb449f510071392e00e10d19",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -3905,7 +3905,7 @@
|
||||
"parser",
|
||||
"validator"
|
||||
],
|
||||
"time": "2018-01-24T12:46:19+00:00"
|
||||
"time": "2019-10-24T14:27:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "seld/phar-utils",
|
||||
|
||||
400
config/app.default.php
Normal file
400
config/app.default.php
Normal file
@ -0,0 +1,400 @@
|
||||
<?php
|
||||
|
||||
use Cake\Cache\Engine\FileEngine;
|
||||
use Cake\Database\Connection;
|
||||
use Cake\Database\Driver\Mysql;
|
||||
use Cake\Error\ExceptionRenderer;
|
||||
use Cake\Log\Engine\FileLog;
|
||||
use Cake\Mailer\Transport\MailTransport;
|
||||
|
||||
return [
|
||||
/**
|
||||
* Debug Level:
|
||||
*
|
||||
* Production Mode:
|
||||
* false: No error messages, errors, or warnings shown.
|
||||
*
|
||||
* Development Mode:
|
||||
* true: Errors and warnings shown.
|
||||
*/
|
||||
'debug' => filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN),
|
||||
|
||||
/**
|
||||
* Configure basic information about the application.
|
||||
*
|
||||
* - namespace - The namespace to find app classes under.
|
||||
* - defaultLocale - The default locale for translation, formatting currencies and numbers, date and time.
|
||||
* - encoding - The encoding used for HTML + database connections.
|
||||
* - base - The base directory the app resides in. If false this
|
||||
* will be auto detected.
|
||||
* - dir - Name of app directory.
|
||||
* - webroot - The webroot directory.
|
||||
* - wwwRoot - The file path to webroot.
|
||||
* - baseUrl - To configure CakePHP to *not* use mod_rewrite and to
|
||||
* use CakePHP pretty URLs, remove these .htaccess
|
||||
* files:
|
||||
* /.htaccess
|
||||
* /webroot/.htaccess
|
||||
* And uncomment the baseUrl key below.
|
||||
* - fullBaseUrl - A base URL to use for absolute links. When set to false (default)
|
||||
* CakePHP generates required value based on `HTTP_HOST` environment variable.
|
||||
* However, you can define it manually to optimize performance or if you
|
||||
* are concerned about people manipulating the `Host` header.
|
||||
* - imageBaseUrl - Web path to the public images directory under webroot.
|
||||
* - cssBaseUrl - Web path to the public css directory under webroot.
|
||||
* - jsBaseUrl - Web path to the public js directory under webroot.
|
||||
* - paths - Configure paths for non class based resources. Supports the
|
||||
* `plugins`, `templates`, `locales` subkeys, which allow the definition of
|
||||
* paths for plugins, view templates and locale files respectively.
|
||||
*/
|
||||
'App' => [
|
||||
'namespace' => 'App',
|
||||
'encoding' => env('APP_ENCODING', 'UTF-8'),
|
||||
'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_US'),
|
||||
'defaultTimezone' => env('APP_DEFAULT_TIMEZONE', 'UTC'),
|
||||
'base' => false,
|
||||
'dir' => 'src',
|
||||
'webroot' => 'webroot',
|
||||
'wwwRoot' => WWW_ROOT,
|
||||
//'baseUrl' => env('SCRIPT_NAME'),
|
||||
'fullBaseUrl' => false,
|
||||
'imageBaseUrl' => 'img/',
|
||||
'cssBaseUrl' => 'css/',
|
||||
'jsBaseUrl' => 'js/',
|
||||
'paths' => [
|
||||
'plugins' => [ROOT . DS . 'plugins' . DS],
|
||||
'templates' => [APP . 'Template' . DS],
|
||||
'locales' => [APP . 'Locale' . DS],
|
||||
],
|
||||
],
|
||||
|
||||
/**
|
||||
* Security and encryption configuration
|
||||
*
|
||||
* - salt - A random string used in security hashing methods.
|
||||
* The salt value is also used as the encryption key.
|
||||
* You should treat it as extremely sensitive data.
|
||||
*/
|
||||
'Security' => [
|
||||
'salt' => env('SECURITY_SALT', '__SALT__'),
|
||||
],
|
||||
|
||||
/**
|
||||
* Apply timestamps with the last modified time to static assets (js, css, images).
|
||||
* Will append a querystring parameter containing the time the file was modified.
|
||||
* This is useful for busting browser caches.
|
||||
*
|
||||
* Set to true to apply timestamps when debug is true. Set to 'force' to always
|
||||
* enable timestamping regardless of debug value.
|
||||
*/
|
||||
'Asset' => [
|
||||
//'timestamp' => true,
|
||||
// 'cacheTime' => '+1 year'
|
||||
],
|
||||
|
||||
/**
|
||||
* Configure the cache adapters.
|
||||
*/
|
||||
'Cache' => [
|
||||
'default' => [
|
||||
'className' => FileEngine::class,
|
||||
'path' => CACHE,
|
||||
'url' => env('CACHE_DEFAULT_URL', null),
|
||||
],
|
||||
|
||||
/**
|
||||
* Configure the cache used for general framework caching.
|
||||
* Translation cache files are stored with this configuration.
|
||||
* Duration will be set to '+2 minutes' in bootstrap.php when debug = true
|
||||
* If you set 'className' => 'Null' core cache will be disabled.
|
||||
*/
|
||||
'_cake_core_' => [
|
||||
'className' => FileEngine::class,
|
||||
'prefix' => 'myapp_cake_core_',
|
||||
'path' => CACHE . 'persistent/',
|
||||
'serialize' => true,
|
||||
'duration' => '+1 years',
|
||||
'url' => env('CACHE_CAKECORE_URL', null),
|
||||
],
|
||||
|
||||
/**
|
||||
* Configure the cache for model and datasource caches. This cache
|
||||
* configuration is used to store schema descriptions, and table listings
|
||||
* in connections.
|
||||
* Duration will be set to '+2 minutes' in bootstrap.php when debug = true
|
||||
*/
|
||||
'_cake_model_' => [
|
||||
'className' => FileEngine::class,
|
||||
'prefix' => 'myapp_cake_model_',
|
||||
'path' => CACHE . 'models/',
|
||||
'serialize' => true,
|
||||
'duration' => '+1 years',
|
||||
'url' => env('CACHE_CAKEMODEL_URL', null),
|
||||
],
|
||||
|
||||
/**
|
||||
* Configure the cache for routes. The cached routes collection is built the
|
||||
* first time the routes are processed via `config/routes.php`.
|
||||
* Duration will be set to '+2 seconds' in bootstrap.php when debug = true
|
||||
*/
|
||||
'_cake_routes_' => [
|
||||
'className' => FileEngine::class,
|
||||
'prefix' => 'myapp_cake_routes_',
|
||||
'path' => CACHE,
|
||||
'serialize' => true,
|
||||
'duration' => '+1 years',
|
||||
'url' => env('CACHE_CAKEROUTES_URL', null),
|
||||
],
|
||||
],
|
||||
|
||||
/**
|
||||
* Configure the Error and Exception handlers used by your application.
|
||||
*
|
||||
* By default errors are displayed using Debugger, when debug is true and logged
|
||||
* by Cake\Log\Log when debug is false.
|
||||
*
|
||||
* In CLI environments exceptions will be printed to stderr with a backtrace.
|
||||
* In web environments an HTML page will be displayed for the exception.
|
||||
* With debug true, framework errors like Missing Controller will be displayed.
|
||||
* When debug is false, framework errors will be coerced into generic HTTP errors.
|
||||
*
|
||||
* Options:
|
||||
*
|
||||
* - `errorLevel` - int - The level of errors you are interested in capturing.
|
||||
* - `trace` - boolean - Whether or not backtraces should be included in
|
||||
* logged errors/exceptions.
|
||||
* - `log` - boolean - Whether or not you want exceptions logged.
|
||||
* - `exceptionRenderer` - string - The class responsible for rendering
|
||||
* uncaught exceptions. If you choose a custom class you should place
|
||||
* the file for that class in src/Error. This class needs to implement a
|
||||
* render method.
|
||||
* - `skipLog` - array - List of exceptions to skip for logging. Exceptions that
|
||||
* extend one of the listed exceptions will also be skipped for logging.
|
||||
* E.g.:
|
||||
* `'skipLog' => ['Cake\Http\Exception\NotFoundException', 'Cake\Http\Exception\UnauthorizedException']`
|
||||
* - `extraFatalErrorMemory` - int - The number of megabytes to increase
|
||||
* the memory limit by when a fatal error is encountered. This allows
|
||||
* breathing room to complete logging or error handling.
|
||||
*/
|
||||
'Error' => [
|
||||
'errorLevel' => E_ALL,
|
||||
'exceptionRenderer' => ExceptionRenderer::class,
|
||||
'skipLog' => [],
|
||||
'log' => true,
|
||||
'trace' => true,
|
||||
],
|
||||
|
||||
/**
|
||||
* Email configuration.
|
||||
*
|
||||
* By defining transports separately from delivery profiles you can easily
|
||||
* re-use transport configuration across multiple profiles.
|
||||
*
|
||||
* You can specify multiple configurations for production, development and
|
||||
* testing.
|
||||
*
|
||||
* Each transport needs a `className`. Valid options are as follows:
|
||||
*
|
||||
* Mail - Send using PHP mail function
|
||||
* Smtp - Send using SMTP
|
||||
* Debug - Do not send the email, just return the result
|
||||
*
|
||||
* You can add custom transports (or override existing transports) by adding the
|
||||
* appropriate file to src/Mailer/Transport. Transports should be named
|
||||
* 'YourTransport.php', where 'Your' is the name of the transport.
|
||||
*/
|
||||
'EmailTransport' => [
|
||||
'default' => [
|
||||
'className' => MailTransport::class,
|
||||
/*
|
||||
* The following keys are used in SMTP transports:
|
||||
*/
|
||||
'host' => 'localhost',
|
||||
'port' => 25,
|
||||
'timeout' => 30,
|
||||
'username' => null,
|
||||
'password' => null,
|
||||
'client' => null,
|
||||
'tls' => null,
|
||||
'url' => env('EMAIL_TRANSPORT_DEFAULT_URL', null),
|
||||
],
|
||||
],
|
||||
|
||||
/**
|
||||
* Email delivery profiles
|
||||
*
|
||||
* Delivery profiles allow you to predefine various properties about email
|
||||
* messages from your application and give the settings a name. This saves
|
||||
* duplication across your application and makes maintenance and development
|
||||
* easier. Each profile accepts a number of keys. See `Cake\Mailer\Email`
|
||||
* for more information.
|
||||
*/
|
||||
'Email' => [
|
||||
'default' => [
|
||||
'transport' => 'default',
|
||||
'from' => 'you@localhost',
|
||||
//'charset' => 'utf-8',
|
||||
//'headerCharset' => 'utf-8',
|
||||
],
|
||||
],
|
||||
|
||||
/**
|
||||
* Connection information used by the ORM to connect
|
||||
* to your application's datastores.
|
||||
*
|
||||
* ### Notes
|
||||
* - Drivers include Mysql Postgres Sqlite Sqlserver
|
||||
* See vendor\cakephp\cakephp\src\Database\Driver for complete list
|
||||
* - Do not use periods in database name - it may lead to error.
|
||||
* See https://github.com/cakephp/cakephp/issues/6471 for details.
|
||||
* - 'encoding' is recommended to be set to full UTF-8 4-Byte support.
|
||||
* E.g set it to 'utf8mb4' in MariaDB and MySQL and 'utf8' for any
|
||||
* other RDBMS.
|
||||
*/
|
||||
'Datasources' => [
|
||||
'default' => [
|
||||
'className' => Connection::class,
|
||||
'driver' => Mysql::class,
|
||||
'persistent' => false,
|
||||
'host' => 'localhost',
|
||||
/*
|
||||
* CakePHP will use the default DB port based on the driver selected
|
||||
* MySQL on MAMP uses port 8889, MAMP users will want to uncomment
|
||||
* the following line and set the port accordingly
|
||||
*/
|
||||
//'port' => 'non_standard_port_number',
|
||||
'username' => 'my_app',
|
||||
'password' => 'secret',
|
||||
'database' => 'my_app',
|
||||
/*
|
||||
* You do not need to set this flag to use full utf-8 encoding (internal default since CakePHP 3.6).
|
||||
*/
|
||||
//'encoding' => 'utf8mb4',
|
||||
'timezone' => 'UTC',
|
||||
'flags' => [],
|
||||
'cacheMetadata' => true,
|
||||
'log' => false,
|
||||
|
||||
/**
|
||||
* Set identifier quoting to true if you are using reserved words or
|
||||
* special characters in your table or column names. Enabling this
|
||||
* setting will result in queries built using the Query Builder having
|
||||
* identifiers quoted when creating SQL. It should be noted that this
|
||||
* decreases performance because each query needs to be traversed and
|
||||
* manipulated before being executed.
|
||||
*/
|
||||
'quoteIdentifiers' => false,
|
||||
|
||||
/**
|
||||
* During development, if using MySQL < 5.6, uncommenting the
|
||||
* following line could boost the speed at which schema metadata is
|
||||
* fetched from the database. It can also be set directly with the
|
||||
* mysql configuration directive 'innodb_stats_on_metadata = 0'
|
||||
* which is the recommended value in production environments
|
||||
*/
|
||||
//'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
|
||||
|
||||
'url' => env('DATABASE_URL', null),
|
||||
],
|
||||
|
||||
/**
|
||||
* The test connection is used during the test suite.
|
||||
*/
|
||||
'test' => [
|
||||
'className' => Connection::class,
|
||||
'driver' => Mysql::class,
|
||||
'persistent' => false,
|
||||
'host' => 'localhost',
|
||||
//'port' => 'non_standard_port_number',
|
||||
'username' => 'my_app',
|
||||
'password' => 'secret',
|
||||
'database' => 'test_myapp',
|
||||
//'encoding' => 'utf8mb4',
|
||||
'timezone' => 'UTC',
|
||||
'cacheMetadata' => true,
|
||||
'quoteIdentifiers' => false,
|
||||
'log' => false,
|
||||
//'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
|
||||
'url' => env('DATABASE_TEST_URL', null),
|
||||
],
|
||||
],
|
||||
|
||||
/**
|
||||
* Configures logging options
|
||||
*/
|
||||
'Log' => [
|
||||
'debug' => [
|
||||
'className' => FileLog::class,
|
||||
'path' => LOGS,
|
||||
'file' => 'debug',
|
||||
'url' => env('LOG_DEBUG_URL', null),
|
||||
'scopes' => false,
|
||||
'levels' => ['notice', 'info', 'debug'],
|
||||
],
|
||||
'error' => [
|
||||
'className' => FileLog::class,
|
||||
'path' => LOGS,
|
||||
'file' => 'error',
|
||||
'url' => env('LOG_ERROR_URL', null),
|
||||
'scopes' => false,
|
||||
'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
|
||||
],
|
||||
// To enable this dedicated query log, you need set your datasource's log flag to true
|
||||
'queries' => [
|
||||
'className' => FileLog::class,
|
||||
'path' => LOGS,
|
||||
'file' => 'queries',
|
||||
'url' => env('LOG_QUERIES_URL', null),
|
||||
'scopes' => ['queriesLog'],
|
||||
],
|
||||
],
|
||||
|
||||
/**
|
||||
* Session configuration.
|
||||
*
|
||||
* Contains an array of settings to use for session configuration. The
|
||||
* `defaults` key is used to define a default preset to use for sessions, any
|
||||
* settings declared here will override the settings of the default config.
|
||||
*
|
||||
* ## Options
|
||||
*
|
||||
* - `cookie` - The name of the cookie to use. Defaults to 'CAKEPHP'. Avoid using `.` in cookie names,
|
||||
* as PHP will drop sessions from cookies with `.` in the name.
|
||||
* - `cookiePath` - The url path for which session cookie is set. Maps to the
|
||||
* `session.cookie_path` php.ini config. Defaults to base path of app.
|
||||
* - `timeout` - The time in minutes the session should be valid for.
|
||||
* Pass 0 to disable checking timeout.
|
||||
* Please note that php.ini's session.gc_maxlifetime must be equal to or greater
|
||||
* than the largest Session['timeout'] in all served websites for it to have the
|
||||
* desired effect.
|
||||
* - `defaults` - The default configuration set to use as a basis for your session.
|
||||
* There are four built-in options: php, cake, cache, database.
|
||||
* - `handler` - Can be used to enable a custom session handler. Expects an
|
||||
* array with at least the `engine` key, being the name of the Session engine
|
||||
* class to use for managing the session. CakePHP bundles the `CacheSession`
|
||||
* and `DatabaseSession` engines.
|
||||
* - `ini` - An associative array of additional ini values to set.
|
||||
*
|
||||
* The built-in `defaults` options are:
|
||||
*
|
||||
* - 'php' - Uses settings defined in your php.ini.
|
||||
* - 'cake' - Saves session files in CakePHP's /tmp directory.
|
||||
* - 'database' - Uses CakePHP's database sessions.
|
||||
* - 'cache' - Use the Cache class to save sessions.
|
||||
*
|
||||
* To define a custom session handler, save it at src/Network/Session/<name>.php.
|
||||
* Make sure the class implements PHP's `SessionHandlerInterface` and set
|
||||
* Session.handler to <name>
|
||||
*
|
||||
* To use database sessions, load the SQL file located at config/schema/sessions.sql
|
||||
*/
|
||||
'Session' => [
|
||||
'defaults' => 'php',
|
||||
],
|
||||
// Gradido specific configuration
|
||||
// Login Server ip and port
|
||||
'LoginServer' => [
|
||||
'host' => 'http://127.0.0.1',
|
||||
'port' => 1201
|
||||
]
|
||||
];
|
||||
203
config/bootstrap.php
Normal file
203
config/bootstrap.php
Normal file
@ -0,0 +1,203 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 0.10.8
|
||||
* @license https://opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/*
|
||||
* Configure paths required to find CakePHP + general filepath constants
|
||||
*/
|
||||
require __DIR__ . '/paths.php';
|
||||
|
||||
/*
|
||||
* Bootstrap CakePHP.
|
||||
*
|
||||
* Does the various bits of setup that CakePHP needs to do.
|
||||
* This includes:
|
||||
*
|
||||
* - Registering the CakePHP autoloader.
|
||||
* - Setting the default application paths.
|
||||
*/
|
||||
require CORE_PATH . 'config' . DS . 'bootstrap.php';
|
||||
|
||||
use Cake\Cache\Cache;
|
||||
use Cake\Console\ConsoleErrorHandler;
|
||||
use Cake\Core\Configure;
|
||||
use Cake\Core\Configure\Engine\PhpConfig;
|
||||
use Cake\Core\Plugin;
|
||||
use Cake\Database\Type;
|
||||
use Cake\Datasource\ConnectionManager;
|
||||
use Cake\Error\ErrorHandler;
|
||||
use Cake\Http\ServerRequest;
|
||||
use Cake\Log\Log;
|
||||
use Cake\Mailer\Email;
|
||||
use Cake\Mailer\TransportFactory;
|
||||
use Cake\Utility\Inflector;
|
||||
use Cake\Utility\Security;
|
||||
|
||||
/**
|
||||
* Uncomment block of code below if you want to use `.env` file during development.
|
||||
* You should copy `config/.env.default to `config/.env` and set/modify the
|
||||
* variables as required.
|
||||
*
|
||||
* It is HIGHLY discouraged to use a .env file in production, due to security risks
|
||||
* and decreased performance on each request. The purpose of the .env file is to emulate
|
||||
* the presence of the environment variables like they would be present in production.
|
||||
*/
|
||||
// if (!env('APP_NAME') && file_exists(CONFIG . '.env')) {
|
||||
// $dotenv = new \josegonzalez\Dotenv\Loader([CONFIG . '.env']);
|
||||
// $dotenv->parse()
|
||||
// ->putenv()
|
||||
// ->toEnv()
|
||||
// ->toServer();
|
||||
// }
|
||||
|
||||
/*
|
||||
* Read configuration file and inject configuration into various
|
||||
* CakePHP classes.
|
||||
*
|
||||
* By default there is only one configuration file. It is often a good
|
||||
* idea to create multiple configuration files, and separate the configuration
|
||||
* that changes from configuration that does not. This makes deployment simpler.
|
||||
*/
|
||||
try {
|
||||
Configure::config('default', new PhpConfig());
|
||||
Configure::load('app', 'default', false);
|
||||
} catch (\Exception $e) {
|
||||
exit($e->getMessage() . "\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Load an environment local configuration file.
|
||||
* You can use a file like app_local.php to provide local overrides to your
|
||||
* shared configuration.
|
||||
*/
|
||||
//Configure::load('app_local', 'default');
|
||||
|
||||
/*
|
||||
* When debug = true the metadata cache should only last
|
||||
* for a short time.
|
||||
*/
|
||||
if (Configure::read('debug')) {
|
||||
Configure::write('Cache._cake_model_.duration', '+2 minutes');
|
||||
Configure::write('Cache._cake_core_.duration', '+2 minutes');
|
||||
// disable router cache during development
|
||||
Configure::write('Cache._cake_routes_.duration', '+2 seconds');
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the default server timezone. Using UTC makes time calculations / conversions easier.
|
||||
* Check http://php.net/manual/en/timezones.php for list of valid timezone strings.
|
||||
*/
|
||||
date_default_timezone_set(Configure::read('App.defaultTimezone'));
|
||||
|
||||
/*
|
||||
* Configure the mbstring extension to use the correct encoding.
|
||||
*/
|
||||
mb_internal_encoding(Configure::read('App.encoding'));
|
||||
|
||||
/*
|
||||
* Set the default locale. This controls how dates, number and currency is
|
||||
* formatted and sets the default language to use for translations.
|
||||
*/
|
||||
ini_set('intl.default_locale', Configure::read('App.defaultLocale'));
|
||||
|
||||
/*
|
||||
* Register application error and exception handlers.
|
||||
*/
|
||||
$isCli = PHP_SAPI === 'cli';
|
||||
if ($isCli) {
|
||||
(new ConsoleErrorHandler(Configure::read('Error')))->register();
|
||||
} else {
|
||||
(new ErrorHandler(Configure::read('Error')))->register();
|
||||
}
|
||||
|
||||
/*
|
||||
* Include the CLI bootstrap overrides.
|
||||
*/
|
||||
if ($isCli) {
|
||||
require __DIR__ . '/bootstrap_cli.php';
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the full base URL.
|
||||
* This URL is used as the base of all absolute links.
|
||||
*
|
||||
* If you define fullBaseUrl in your config file you can remove this.
|
||||
*/
|
||||
if (!Configure::read('App.fullBaseUrl')) {
|
||||
$s = null;
|
||||
if (env('HTTPS')) {
|
||||
$s = 's';
|
||||
}
|
||||
|
||||
$httpHost = env('HTTP_HOST');
|
||||
if (isset($httpHost)) {
|
||||
Configure::write('App.fullBaseUrl', 'http' . $s . '://' . $httpHost);
|
||||
}
|
||||
unset($httpHost, $s);
|
||||
}
|
||||
|
||||
Cache::setConfig(Configure::consume('Cache'));
|
||||
ConnectionManager::setConfig(Configure::consume('Datasources'));
|
||||
TransportFactory::setConfig(Configure::consume('EmailTransport'));
|
||||
Email::setConfig(Configure::consume('Email'));
|
||||
Log::setConfig(Configure::consume('Log'));
|
||||
Security::setSalt(Configure::consume('Security.salt'));
|
||||
|
||||
/*
|
||||
* The default crypto extension in 3.0 is OpenSSL.
|
||||
* If you are migrating from 2.x uncomment this code to
|
||||
* use a more compatible Mcrypt based implementation
|
||||
*/
|
||||
//Security::engine(new \Cake\Utility\Crypto\Mcrypt());
|
||||
|
||||
/*
|
||||
* Setup detectors for mobile and tablet.
|
||||
*/
|
||||
ServerRequest::addDetector('mobile', function ($request) {
|
||||
$detector = new \Detection\MobileDetect();
|
||||
|
||||
return $detector->isMobile();
|
||||
});
|
||||
ServerRequest::addDetector('tablet', function ($request) {
|
||||
$detector = new \Detection\MobileDetect();
|
||||
|
||||
return $detector->isTablet();
|
||||
});
|
||||
|
||||
/*
|
||||
* Enable immutable time objects in the ORM.
|
||||
*
|
||||
* You can enable default locale format parsing by adding calls
|
||||
* to `useLocaleParser()`. This enables the automatic conversion of
|
||||
* locale specific date formats. For details see
|
||||
* @link https://book.cakephp.org/3.0/en/core-libraries/internationalization-and-localization.html#parsing-localized-datetime-data
|
||||
*/
|
||||
Type::build('time')
|
||||
->useImmutable();
|
||||
Type::build('date')
|
||||
->useImmutable();
|
||||
Type::build('datetime')
|
||||
->useImmutable();
|
||||
Type::build('timestamp')
|
||||
->useImmutable();
|
||||
|
||||
/*
|
||||
* Custom Inflector rules, can be set to correctly pluralize or singularize
|
||||
* table, model, controller names or whatever other string is passed to the
|
||||
* inflection functions.
|
||||
*/
|
||||
//Inflector::rules('plural', ['/^(inflect)or$/i' => '\1ables']);
|
||||
//Inflector::rules('irregular', ['red' => 'redlings']);
|
||||
//Inflector::rules('uninflected', ['dontinflectme']);
|
||||
//Inflector::rules('transliteration', ['/å/' => 'aa']);
|
||||
28
config/bootstrap_cli.php
Normal file
28
config/bootstrap_cli.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 3.0.0
|
||||
* @license https://opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
use Cake\Core\Configure;
|
||||
|
||||
/**
|
||||
* Additional bootstrapping and configuration for CLI environments should
|
||||
* be put here.
|
||||
*/
|
||||
|
||||
// Set the fullBaseUrl to allow URLs to be generated in shell tasks.
|
||||
// This is useful when sending email from shells.
|
||||
//Configure::write('App.fullBaseUrl', php_uname('n'));
|
||||
|
||||
// Set logs to different files so they don't have permission conflicts.
|
||||
Configure::write('Log.debug.file', 'cli-debug');
|
||||
Configure::write('Log.error.file', 'cli-error');
|
||||
89
config/paths.php
Normal file
89
config/paths.php
Normal file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 3.0.0
|
||||
* @license MIT License (https://opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
|
||||
/**
|
||||
* Use the DS to separate the directories in other defines
|
||||
*/
|
||||
if (!defined('DS')) {
|
||||
define('DS', DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* These defines should only be edited if you have cake installed in
|
||||
* a directory layout other than the way it is distributed.
|
||||
* When using custom settings be sure to use the DS and do not add a trailing DS.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The full path to the directory which holds "src", WITHOUT a trailing DS.
|
||||
*/
|
||||
define('ROOT', dirname(__DIR__));
|
||||
|
||||
/**
|
||||
* The actual directory name for the application directory. Normally
|
||||
* named 'src'.
|
||||
*/
|
||||
define('APP_DIR', 'src');
|
||||
|
||||
/**
|
||||
* Path to the application's directory.
|
||||
*/
|
||||
define('APP', ROOT . DS . APP_DIR . DS);
|
||||
|
||||
/**
|
||||
* Path to the config directory.
|
||||
*/
|
||||
define('CONFIG', ROOT . DS . 'config' . DS);
|
||||
|
||||
/**
|
||||
* File path to the webroot directory.
|
||||
*
|
||||
* To derive your webroot from your webserver change this to:
|
||||
*
|
||||
* `define('WWW_ROOT', rtrim($_SERVER['DOCUMENT_ROOT'], DS) . DS);`
|
||||
*/
|
||||
define('WWW_ROOT', ROOT . DS . 'webroot' . DS);
|
||||
|
||||
/**
|
||||
* Path to the tests directory.
|
||||
*/
|
||||
define('TESTS', ROOT . DS . 'tests' . DS);
|
||||
|
||||
/**
|
||||
* Path to the temporary files directory.
|
||||
*/
|
||||
define('TMP', ROOT . DS . 'tmp' . DS);
|
||||
|
||||
/**
|
||||
* Path to the logs directory.
|
||||
*/
|
||||
define('LOGS', ROOT . DS . 'logs' . DS);
|
||||
|
||||
/**
|
||||
* Path to the cache files directory. It can be shared between hosts in a multi-server setup.
|
||||
*/
|
||||
define('CACHE', TMP . 'cache' . DS);
|
||||
|
||||
/**
|
||||
* The absolute path to the "cake" directory, WITHOUT a trailing DS.
|
||||
*
|
||||
* CakePHP should always be installed with composer, so look there.
|
||||
*/
|
||||
define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'vendor' . DS . 'cakephp' . DS . 'cakephp');
|
||||
|
||||
/**
|
||||
* Path to the cake directory.
|
||||
*/
|
||||
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
|
||||
define('CAKE', CORE_PATH . 'src' . DS);
|
||||
39
config/requirements.php
Normal file
39
config/requirements.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 3.5.0
|
||||
* @license https://opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/*
|
||||
* You can empty out this file, if you are certain that you match all requirements.
|
||||
*/
|
||||
|
||||
/*
|
||||
* You can remove this if you are confident that your PHP version is sufficient.
|
||||
*/
|
||||
if (version_compare(PHP_VERSION, '5.6.0') < 0) {
|
||||
trigger_error('Your PHP version must be equal or higher than 5.6.0 to use CakePHP.' . PHP_EOL, E_USER_ERROR);
|
||||
}
|
||||
|
||||
/*
|
||||
* You can remove this if you are confident you have intl installed.
|
||||
*/
|
||||
if (!extension_loaded('intl')) {
|
||||
trigger_error('You must enable the intl extension to use CakePHP.' . PHP_EOL, E_USER_ERROR);
|
||||
}
|
||||
|
||||
/*
|
||||
* You can remove this if you are confident you have mbstring installed.
|
||||
*/
|
||||
if (!extension_loaded('mbstring')) {
|
||||
trigger_error('You must enable the mbstring extension to use CakePHP.' . PHP_EOL, E_USER_ERROR);
|
||||
}
|
||||
106
config/routes.php
Normal file
106
config/routes.php
Normal file
@ -0,0 +1,106 @@
|
||||
<?php
|
||||
/**
|
||||
* Routes configuration
|
||||
*
|
||||
* In this file, you set up routes to your controllers and their actions.
|
||||
* Routes are very important mechanism that allows you to freely connect
|
||||
* different URLs to chosen controllers and their actions (functions).
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @license https://opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
use Cake\Http\Middleware\CsrfProtectionMiddleware;
|
||||
use Cake\Routing\RouteBuilder;
|
||||
use Cake\Routing\Router;
|
||||
use Cake\Routing\Route\DashedRoute;
|
||||
|
||||
/**
|
||||
* The default class to use for all routes
|
||||
*
|
||||
* The following route classes are supplied with CakePHP and are appropriate
|
||||
* to set as the default:
|
||||
*
|
||||
* - Route
|
||||
* - InflectedRoute
|
||||
* - DashedRoute
|
||||
*
|
||||
* If no call is made to `Router::defaultRouteClass()`, the class used is
|
||||
* `Route` (`Cake\Routing\Route\Route`)
|
||||
*
|
||||
* Note that `Route` does not do any inflections on URLs which will result in
|
||||
* inconsistently cased URLs when used with `:plugin`, `:controller` and
|
||||
* `:action` markers.
|
||||
*
|
||||
* Cache: Routes are cached to improve performance, check the RoutingMiddleware
|
||||
* constructor in your `src/Application.php` file to change this behavior.
|
||||
*
|
||||
*/
|
||||
Router::defaultRouteClass(DashedRoute::class);
|
||||
|
||||
Router::scope('/', function (RouteBuilder $routes) {
|
||||
// Register scoped middleware for in scopes.
|
||||
$routes->registerMiddleware('csrf', new CsrfProtectionMiddleware([
|
||||
'httpOnly' => true
|
||||
]));
|
||||
|
||||
/**
|
||||
* Apply a middleware to the current route scope.
|
||||
* Requires middleware to be registered via `Application::routes()` with `registerMiddleware()`
|
||||
*/
|
||||
$routes->applyMiddleware('csrf');
|
||||
|
||||
/**
|
||||
* Here, we are connecting '/' (base path) to a controller called 'Pages',
|
||||
* its action called 'display', and we pass a param to select the view file
|
||||
* to use (in this case, src/Template/Pages/home.ctp)...
|
||||
*/
|
||||
//$routes->connect('/', ['controller' => 'Pages', 'action' => 'display', 'home']);
|
||||
$routes->connect('/', ['controller' => 'Dashboard', 'action' => 'index']);
|
||||
//$routes->connect('/', 'https://gradido2.dario-rekowski.de/account', array('status' => 303));
|
||||
|
||||
/**
|
||||
* ...and connect the rest of 'Pages' controller's URLs.
|
||||
*/
|
||||
$routes->connect('/pages/*', ['controller' => 'Pages', 'action' => 'display']);
|
||||
|
||||
/**
|
||||
* Connect catchall routes for all controllers.
|
||||
*
|
||||
* Using the argument `DashedRoute`, the `fallbacks` method is a shortcut for
|
||||
*
|
||||
* ```
|
||||
* $routes->connect('/:controller', ['action' => 'index'], ['routeClass' => 'DashedRoute']);
|
||||
* $routes->connect('/:controller/:action/*', [], ['routeClass' => 'DashedRoute']);
|
||||
* ```
|
||||
*
|
||||
* Any route class can be used with this method, such as:
|
||||
* - DashedRoute
|
||||
* - InflectedRoute
|
||||
* - Route
|
||||
* - Or your own route class
|
||||
*
|
||||
* You can remove these routes once you've connected the
|
||||
* routes you want in your application.
|
||||
*/
|
||||
$routes->fallbacks(DashedRoute::class);
|
||||
});
|
||||
|
||||
/**
|
||||
* If you need a different set of middleware or none at all,
|
||||
* open new scope and define routes there.
|
||||
*
|
||||
* ```
|
||||
* Router::scope('/api', function (RouteBuilder $routes) {
|
||||
* // No $routes->applyMiddleware() here.
|
||||
* // Connect API actions here.
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
18
config/schema/i18n.sql
Normal file
18
config/schema/i18n.sql
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
#
|
||||
# Licensed under The MIT License
|
||||
# For full copyright and license information, please see the LICENSE.txt
|
||||
# Redistributions of files must retain the above copyright notice.
|
||||
# MIT License (https://opensource.org/licenses/mit-license.php)
|
||||
|
||||
CREATE TABLE i18n (
|
||||
id int NOT NULL auto_increment,
|
||||
locale varchar(6) NOT NULL,
|
||||
model varchar(255) NOT NULL,
|
||||
foreign_key int(10) NOT NULL,
|
||||
field varchar(255) NOT NULL,
|
||||
content text,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE INDEX I18N_LOCALE_FIELD(locale, model, foreign_key, field),
|
||||
INDEX I18N_FIELD(model, foreign_key, field)
|
||||
);
|
||||
15
config/schema/sessions.sql
Normal file
15
config/schema/sessions.sql
Normal file
@ -0,0 +1,15 @@
|
||||
# Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
#
|
||||
# Licensed under The MIT License
|
||||
# For full copyright and license information, please see the LICENSE.txt
|
||||
# Redistributions of files must retain the above copyright notice.
|
||||
# MIT License (https://opensource.org/licenses/mit-license.php)
|
||||
|
||||
CREATE TABLE `sessions` (
|
||||
`id` char(40) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
||||
`created` datetime DEFAULT CURRENT_TIMESTAMP, -- optional, requires MySQL 5.6.5+
|
||||
`modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- optional, requires MySQL 5.6.5+
|
||||
`data` blob DEFAULT NULL, -- for PostgreSQL use bytea instead of blob
|
||||
`expires` int(10) unsigned DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
@ -2,7 +2,17 @@
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Controller\AppController;
|
||||
use Cake\ORM\TableRegistry;
|
||||
use Cake\Routing\Router;
|
||||
use Cake\I18n\Number;
|
||||
use Cake\Http\Client;
|
||||
use Cake\Core\Configure;
|
||||
|
||||
use App\Form\CreationForm;
|
||||
// protobuf transactions
|
||||
use Model\Messages\Gradido\TransactionCreation;
|
||||
use Model\Messages\Gradido\TransactionBody;
|
||||
use Model\Messages\Gradido\ReceiverAmount;
|
||||
/**
|
||||
* TransactionCreations Controller
|
||||
*
|
||||
@ -17,7 +27,7 @@ class TransactionCreationsController extends AppController
|
||||
{
|
||||
parent::initialize();
|
||||
//$this->Auth->allow(['add', 'edit']);
|
||||
$this->Auth->allow('add');
|
||||
$this->Auth->allow('create');
|
||||
}
|
||||
/**
|
||||
* Index method
|
||||
@ -56,11 +66,101 @@ class TransactionCreationsController extends AppController
|
||||
$this->viewBuilder()->setLayout('frontend');
|
||||
$session = $this->getRequest()->getSession();
|
||||
$user = $session->read('StateUser');
|
||||
//var_dump($user);
|
||||
// var_dump($user);
|
||||
if(!$user) {
|
||||
return $this->redirect(Router::url('/', true) . 'account/', 303);
|
||||
}
|
||||
$creationForm = new CreationForm();
|
||||
$transactionCreation = $this->TransactionCreations->newEntity();
|
||||
$transactionCreation->state_user_id = $user->id;
|
||||
$transactionCreation->state_user_id = $user['id'];
|
||||
|
||||
// adding possible addresses + input field for copy
|
||||
$stateUserTable = TableRegistry::getTableLocator()->get('StateUsers');
|
||||
$stateUsers = $stateUserTable->find('all');
|
||||
$receiverProposal = [];
|
||||
foreach($stateUsers as $stateUser) {
|
||||
$name = $stateUser->email;
|
||||
$keyHex = bin2hex(stream_get_contents($stateUser->public_key));
|
||||
if($name === NULL) {
|
||||
$name = $stateUser->first_name . ' ' . $stateUser->last_name;
|
||||
}
|
||||
array_push($receiverProposal, ['name' => $name, 'key' => $keyHex]);
|
||||
//$stateUser->public_key
|
||||
}
|
||||
$timeUsed = microtime(true) - $startTime;
|
||||
$this->set(compact('transactionCreation', 'timeUsed'));
|
||||
$this->set(compact('transactionCreation', 'timeUsed', 'receiverProposal', 'creationForm'));
|
||||
|
||||
if ($this->request->is('post')) {
|
||||
$requestData = $this->request->getData();
|
||||
if($creationForm->validate($requestData)) {
|
||||
|
||||
$pubKeyHex = '';
|
||||
$receiver = new ReceiverAmount();
|
||||
//echo 'amount: ' . $requestData['amount'] . '<br>';
|
||||
$floatAmount = floatval(Number::format($requestData['amount'], ['places' => 4, 'locale' => 'en_GB']));
|
||||
//echo 'set for receiver: ' . round($floatAmount * 10000) . '<br>';
|
||||
$receiver->setAmount(round($floatAmount * 10000));
|
||||
//echo 'after receiver amount set<br>';
|
||||
|
||||
if(intval($requestData['receiver']) == 0) {
|
||||
if(strlen($requestData['receiver_pubkey_hex']) != 64) {
|
||||
$this->Flash->error(__('Invalid public Key, must contain 64 Character'));
|
||||
} else {
|
||||
$pubKeyHex = $requestData['receiver_pubkey_hex'];
|
||||
}
|
||||
} else {
|
||||
$receiverIndex = intval($requestData['receiver'])-1;
|
||||
|
||||
if(count($receiverProposal) > $receiverIndex) {
|
||||
$pubKeyHex = $receiverProposal[$receiverIndex]['key'];
|
||||
}
|
||||
}
|
||||
if($pubKeyHex != '') {
|
||||
$receiver->setEd25519ReceiverPubkey(hex2bin($pubKeyHex));
|
||||
//var_dump($requestData);
|
||||
$transactionBody = new TransactionBody();
|
||||
$transactionBody->setMemo($requestData['memo']);
|
||||
|
||||
$transaction = new TransactionCreation();
|
||||
$transaction->setReceiverAmount($receiver);
|
||||
$transaction->setIdentHash($user['ident_hash']);
|
||||
$transactionBody->setCreation($transaction);
|
||||
|
||||
$http = new Client();
|
||||
try {
|
||||
$loginServer = Configure::read('LoginServer');
|
||||
$url = $loginServer['host'] . ':' . $loginServer['port'];
|
||||
$session_id = $session->read('session_id');
|
||||
$response = $http->get($url . '/checkTransaction', [
|
||||
'session_id' => $session_id,
|
||||
'transaction_base64' => base64_encode($transactionBody->serializeToString())
|
||||
]);
|
||||
$json = $response->getJson();
|
||||
if($json['state'] != 'success') {
|
||||
if($json['msg'] == 'session not found') {
|
||||
$session->destroy();
|
||||
$this->Flash->error(__('session not found, please login again'));
|
||||
} else {
|
||||
$this->Flash->error(__('login server return error: ' . json_encode($json)));
|
||||
}
|
||||
} else {
|
||||
return $this->redirect(Router::url('/', true) . 'account/checkTransactions', 303);
|
||||
}
|
||||
|
||||
} catch(\Exception $e) {
|
||||
$msg = $e->getMessage();
|
||||
$this->Flash->error(__('error http request: ') . $msg);
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->Flash->error(__('No Valid Receiver Public given'));
|
||||
}
|
||||
|
||||
// */
|
||||
} else {
|
||||
$this->Flash->error(__('Something was invalid, please try again!'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace App\Model\Entity;
|
||||
|
||||
|
||||
use Cake\ORM\Entity;
|
||||
|
||||
/**
|
||||
|
||||
@ -2,14 +2,14 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: BasicTypes.proto
|
||||
|
||||
namespace Gradido;
|
||||
namespace Model\Messages\Gradido;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\RepeatedField;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
|
||||
/**
|
||||
* Generated from protobuf message <code>gradido.Key</code>
|
||||
* Generated from protobuf message <code>model.messages.gradido.Key</code>
|
||||
*/
|
||||
final class Key extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
|
||||
@ -2,14 +2,14 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: BasicTypes.proto
|
||||
|
||||
namespace Gradido;
|
||||
namespace Model\Messages\Gradido;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\RepeatedField;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
|
||||
/**
|
||||
* Generated from protobuf message <code>gradido.ReceiverAmount</code>
|
||||
* Generated from protobuf message <code>model.messages.gradido.ReceiverAmount</code>
|
||||
*/
|
||||
final class ReceiverAmount extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
|
||||
@ -2,14 +2,14 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: BasicTypes.proto
|
||||
|
||||
namespace Gradido;
|
||||
namespace Model\Messages\Gradido;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\RepeatedField;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
|
||||
/**
|
||||
* Generated from protobuf message <code>gradido.SenderAmount</code>
|
||||
* Generated from protobuf message <code>model.messages.gradido.SenderAmount</code>
|
||||
*/
|
||||
final class SenderAmount extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
|
||||
@ -2,21 +2,21 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: BasicTypes.proto
|
||||
|
||||
namespace Gradido;
|
||||
namespace Model\Messages\Gradido;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\RepeatedField;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
|
||||
/**
|
||||
* Generated from protobuf message <code>gradido.SignatureMap</code>
|
||||
* Generated from protobuf message <code>model.messages.gradido.SignatureMap</code>
|
||||
*/
|
||||
final class SignatureMap extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Each signature pair corresponds to a unique Key required to sign the transaction.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .gradido.SignaturePair sigPair = 1;</code>
|
||||
* Generated from protobuf field <code>repeated .model.messages.gradido.SignaturePair sigPair = 1;</code>
|
||||
*/
|
||||
private $sigPair;
|
||||
|
||||
@ -26,7 +26,7 @@ final class SignatureMap extends \Google\Protobuf\Internal\Message
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type \Gradido\SignaturePair[]|\Google\Protobuf\Internal\RepeatedField $sigPair
|
||||
* @type \Model\Messages\Gradido\SignaturePair[]|\Google\Protobuf\Internal\RepeatedField $sigPair
|
||||
* Each signature pair corresponds to a unique Key required to sign the transaction.
|
||||
* }
|
||||
*/
|
||||
@ -38,7 +38,7 @@ final class SignatureMap extends \Google\Protobuf\Internal\Message
|
||||
/**
|
||||
* Each signature pair corresponds to a unique Key required to sign the transaction.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .gradido.SignaturePair sigPair = 1;</code>
|
||||
* Generated from protobuf field <code>repeated .model.messages.gradido.SignaturePair sigPair = 1;</code>
|
||||
* @return \Google\Protobuf\Internal\RepeatedField
|
||||
*/
|
||||
public function getSigPair()
|
||||
@ -49,13 +49,13 @@ final class SignatureMap extends \Google\Protobuf\Internal\Message
|
||||
/**
|
||||
* Each signature pair corresponds to a unique Key required to sign the transaction.
|
||||
*
|
||||
* Generated from protobuf field <code>repeated .gradido.SignaturePair sigPair = 1;</code>
|
||||
* @param \Gradido\SignaturePair[]|\Google\Protobuf\Internal\RepeatedField $var
|
||||
* Generated from protobuf field <code>repeated .model.messages.gradido.SignaturePair sigPair = 1;</code>
|
||||
* @param \Model\Messages\Gradido\SignaturePair[]|\Google\Protobuf\Internal\RepeatedField $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setSigPair($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Gradido\SignaturePair::class);
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Model\Messages\Gradido\SignaturePair::class);
|
||||
$this->sigPair = $arr;
|
||||
|
||||
return $this;
|
||||
|
||||
@ -2,14 +2,14 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: BasicTypes.proto
|
||||
|
||||
namespace Gradido;
|
||||
namespace Model\Messages\Gradido;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\RepeatedField;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
|
||||
/**
|
||||
* Generated from protobuf message <code>gradido.SignaturePair</code>
|
||||
* Generated from protobuf message <code>model.messages.gradido.SignaturePair</code>
|
||||
*/
|
||||
final class SignaturePair extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: StateCreateGroup.proto
|
||||
|
||||
namespace Gradido;
|
||||
namespace Model\Messages\Gradido;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\RepeatedField;
|
||||
@ -11,7 +11,7 @@ use Google\Protobuf\Internal\GPBUtil;
|
||||
/**
|
||||
* need signature from this group and from parent (if it isn't zero)
|
||||
*
|
||||
* Generated from protobuf message <code>gradido.StateCreateGroup</code>
|
||||
* Generated from protobuf message <code>model.messages.gradido.StateCreateGroup</code>
|
||||
*/
|
||||
final class StateCreateGroup extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
@ -20,11 +20,11 @@ final class StateCreateGroup extends \Google\Protobuf\Internal\Message
|
||||
*/
|
||||
private $name = '';
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.Key groupPublicKey = 2;</code>
|
||||
* Generated from protobuf field <code>.model.messages.gradido.Key groupPublicKey = 2;</code>
|
||||
*/
|
||||
private $groupPublicKey = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.Key parentGroupPublicKey = 3;</code>
|
||||
* Generated from protobuf field <code>.model.messages.gradido.Key parentGroupPublicKey = 3;</code>
|
||||
*/
|
||||
private $parentGroupPublicKey = null;
|
||||
|
||||
@ -35,8 +35,8 @@ final class StateCreateGroup extends \Google\Protobuf\Internal\Message
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type string $name
|
||||
* @type \Gradido\Key $groupPublicKey
|
||||
* @type \Gradido\Key $parentGroupPublicKey
|
||||
* @type \Model\Messages\Gradido\Key $groupPublicKey
|
||||
* @type \Model\Messages\Gradido\Key $parentGroupPublicKey
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
@ -67,8 +67,8 @@ final class StateCreateGroup extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.Key groupPublicKey = 2;</code>
|
||||
* @return \Gradido\Key
|
||||
* Generated from protobuf field <code>.model.messages.gradido.Key groupPublicKey = 2;</code>
|
||||
* @return \Model\Messages\Gradido\Key
|
||||
*/
|
||||
public function getGroupPublicKey()
|
||||
{
|
||||
@ -76,21 +76,21 @@ final class StateCreateGroup extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.Key groupPublicKey = 2;</code>
|
||||
* @param \Gradido\Key $var
|
||||
* Generated from protobuf field <code>.model.messages.gradido.Key groupPublicKey = 2;</code>
|
||||
* @param \Model\Messages\Gradido\Key $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setGroupPublicKey($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Gradido\Key::class);
|
||||
GPBUtil::checkMessage($var, \Model\Messages\Gradido\Key::class);
|
||||
$this->groupPublicKey = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.Key parentGroupPublicKey = 3;</code>
|
||||
* @return \Gradido\Key
|
||||
* Generated from protobuf field <code>.model.messages.gradido.Key parentGroupPublicKey = 3;</code>
|
||||
* @return \Model\Messages\Gradido\Key
|
||||
*/
|
||||
public function getParentGroupPublicKey()
|
||||
{
|
||||
@ -98,13 +98,13 @@ final class StateCreateGroup extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.Key parentGroupPublicKey = 3;</code>
|
||||
* @param \Gradido\Key $var
|
||||
* Generated from protobuf field <code>.model.messages.gradido.Key parentGroupPublicKey = 3;</code>
|
||||
* @param \Model\Messages\Gradido\Key $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setParentGroupPublicKey($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Gradido\Key::class);
|
||||
GPBUtil::checkMessage($var, \Model\Messages\Gradido\Key::class);
|
||||
$this->parentGroupPublicKey = $var;
|
||||
|
||||
return $this;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: StateGroupChangeParent.proto
|
||||
|
||||
namespace Gradido;
|
||||
namespace Model\Messages\Gradido;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\RepeatedField;
|
||||
@ -11,20 +11,20 @@ use Google\Protobuf\Internal\GPBUtil;
|
||||
/**
|
||||
* need signature from this group and from both parents (if it isn't zero)
|
||||
*
|
||||
* Generated from protobuf message <code>gradido.StateGroupChangeParent</code>
|
||||
* Generated from protobuf message <code>model.messages.gradido.StateGroupChangeParent</code>
|
||||
*/
|
||||
final class StateGroupChangeParent extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.Key groupPublicKey = 1;</code>
|
||||
* Generated from protobuf field <code>.model.messages.gradido.Key groupPublicKey = 1;</code>
|
||||
*/
|
||||
private $groupPublicKey = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.Key newParentGroupPublicKey = 2;</code>
|
||||
* Generated from protobuf field <code>.model.messages.gradido.Key newParentGroupPublicKey = 2;</code>
|
||||
*/
|
||||
private $newParentGroupPublicKey = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.Key oldParentGroupPublicKey = 3;</code>
|
||||
* Generated from protobuf field <code>.model.messages.gradido.Key oldParentGroupPublicKey = 3;</code>
|
||||
*/
|
||||
private $oldParentGroupPublicKey = null;
|
||||
|
||||
@ -34,9 +34,9 @@ final class StateGroupChangeParent extends \Google\Protobuf\Internal\Message
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type \Gradido\Key $groupPublicKey
|
||||
* @type \Gradido\Key $newParentGroupPublicKey
|
||||
* @type \Gradido\Key $oldParentGroupPublicKey
|
||||
* @type \Model\Messages\Gradido\Key $groupPublicKey
|
||||
* @type \Model\Messages\Gradido\Key $newParentGroupPublicKey
|
||||
* @type \Model\Messages\Gradido\Key $oldParentGroupPublicKey
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
@ -45,8 +45,8 @@ final class StateGroupChangeParent extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.Key groupPublicKey = 1;</code>
|
||||
* @return \Gradido\Key
|
||||
* Generated from protobuf field <code>.model.messages.gradido.Key groupPublicKey = 1;</code>
|
||||
* @return \Model\Messages\Gradido\Key
|
||||
*/
|
||||
public function getGroupPublicKey()
|
||||
{
|
||||
@ -54,21 +54,21 @@ final class StateGroupChangeParent extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.Key groupPublicKey = 1;</code>
|
||||
* @param \Gradido\Key $var
|
||||
* Generated from protobuf field <code>.model.messages.gradido.Key groupPublicKey = 1;</code>
|
||||
* @param \Model\Messages\Gradido\Key $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setGroupPublicKey($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Gradido\Key::class);
|
||||
GPBUtil::checkMessage($var, \Model\Messages\Gradido\Key::class);
|
||||
$this->groupPublicKey = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.Key newParentGroupPublicKey = 2;</code>
|
||||
* @return \Gradido\Key
|
||||
* Generated from protobuf field <code>.model.messages.gradido.Key newParentGroupPublicKey = 2;</code>
|
||||
* @return \Model\Messages\Gradido\Key
|
||||
*/
|
||||
public function getNewParentGroupPublicKey()
|
||||
{
|
||||
@ -76,21 +76,21 @@ final class StateGroupChangeParent extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.Key newParentGroupPublicKey = 2;</code>
|
||||
* @param \Gradido\Key $var
|
||||
* Generated from protobuf field <code>.model.messages.gradido.Key newParentGroupPublicKey = 2;</code>
|
||||
* @param \Model\Messages\Gradido\Key $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setNewParentGroupPublicKey($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Gradido\Key::class);
|
||||
GPBUtil::checkMessage($var, \Model\Messages\Gradido\Key::class);
|
||||
$this->newParentGroupPublicKey = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.Key oldParentGroupPublicKey = 3;</code>
|
||||
* @return \Gradido\Key
|
||||
* Generated from protobuf field <code>.model.messages.gradido.Key oldParentGroupPublicKey = 3;</code>
|
||||
* @return \Model\Messages\Gradido\Key
|
||||
*/
|
||||
public function getOldParentGroupPublicKey()
|
||||
{
|
||||
@ -98,13 +98,13 @@ final class StateGroupChangeParent extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.Key oldParentGroupPublicKey = 3;</code>
|
||||
* @param \Gradido\Key $var
|
||||
* Generated from protobuf field <code>.model.messages.gradido.Key oldParentGroupPublicKey = 3;</code>
|
||||
* @param \Model\Messages\Gradido\Key $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setOldParentGroupPublicKey($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Gradido\Key::class);
|
||||
GPBUtil::checkMessage($var, \Model\Messages\Gradido\Key::class);
|
||||
$this->oldParentGroupPublicKey = $var;
|
||||
|
||||
return $this;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: BasicTypes.proto
|
||||
|
||||
namespace Gradido;
|
||||
namespace Model\Messages\Gradido;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\RepeatedField;
|
||||
@ -11,7 +11,7 @@ use Google\Protobuf\Internal\GPBUtil;
|
||||
/**
|
||||
* An exact date and time. This is the same data structure as the protobuf Timestamp.proto (see the comments in https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto)
|
||||
*
|
||||
* Generated from protobuf message <code>gradido.Timestamp</code>
|
||||
* Generated from protobuf message <code>model.messages.gradido.Timestamp</code>
|
||||
*/
|
||||
final class Timestamp extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: BasicTypes.proto
|
||||
|
||||
namespace Gradido;
|
||||
namespace Model\Messages\Gradido;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\RepeatedField;
|
||||
@ -11,7 +11,7 @@ use Google\Protobuf\Internal\GPBUtil;
|
||||
/**
|
||||
* An exact date and time, with a resolution of one second (no nanoseconds).
|
||||
*
|
||||
* Generated from protobuf message <code>gradido.TimestampSeconds</code>
|
||||
* Generated from protobuf message <code>model.messages.gradido.TimestampSeconds</code>
|
||||
*/
|
||||
final class TimestampSeconds extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
|
||||
@ -2,14 +2,14 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: Transaction.proto
|
||||
|
||||
namespace Gradido;
|
||||
namespace Model\Messages\Gradido;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\RepeatedField;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
|
||||
/**
|
||||
* Generated from protobuf message <code>gradido.Transaction</code>
|
||||
* Generated from protobuf message <code>model.messages.gradido.Transaction</code>
|
||||
*/
|
||||
final class Transaction extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
@ -18,11 +18,11 @@ final class Transaction extends \Google\Protobuf\Internal\Message
|
||||
*/
|
||||
private $id = 0;
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.TimestampSeconds received = 2;</code>
|
||||
* Generated from protobuf field <code>.model.messages.gradido.TimestampSeconds received = 2;</code>
|
||||
*/
|
||||
private $received = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.SignatureMap sigMap = 3;</code>
|
||||
* Generated from protobuf field <code>.model.messages.gradido.SignatureMap sigMap = 3;</code>
|
||||
*/
|
||||
private $sigMap = null;
|
||||
/**
|
||||
@ -41,8 +41,8 @@ final class Transaction extends \Google\Protobuf\Internal\Message
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type int|string $id
|
||||
* @type \Gradido\TimestampSeconds $received
|
||||
* @type \Gradido\SignatureMap $sigMap
|
||||
* @type \Model\Messages\Gradido\TimestampSeconds $received
|
||||
* @type \Model\Messages\Gradido\SignatureMap $sigMap
|
||||
* @type string $txHash
|
||||
* @type string $bodyBytes
|
||||
* }
|
||||
@ -75,8 +75,8 @@ final class Transaction extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.TimestampSeconds received = 2;</code>
|
||||
* @return \Gradido\TimestampSeconds
|
||||
* Generated from protobuf field <code>.model.messages.gradido.TimestampSeconds received = 2;</code>
|
||||
* @return \Model\Messages\Gradido\TimestampSeconds
|
||||
*/
|
||||
public function getReceived()
|
||||
{
|
||||
@ -84,21 +84,21 @@ final class Transaction extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.TimestampSeconds received = 2;</code>
|
||||
* @param \Gradido\TimestampSeconds $var
|
||||
* Generated from protobuf field <code>.model.messages.gradido.TimestampSeconds received = 2;</code>
|
||||
* @param \Model\Messages\Gradido\TimestampSeconds $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setReceived($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Gradido\TimestampSeconds::class);
|
||||
GPBUtil::checkMessage($var, \Model\Messages\Gradido\TimestampSeconds::class);
|
||||
$this->received = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.SignatureMap sigMap = 3;</code>
|
||||
* @return \Gradido\SignatureMap
|
||||
* Generated from protobuf field <code>.model.messages.gradido.SignatureMap sigMap = 3;</code>
|
||||
* @return \Model\Messages\Gradido\SignatureMap
|
||||
*/
|
||||
public function getSigMap()
|
||||
{
|
||||
@ -106,13 +106,13 @@ final class Transaction extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.SignatureMap sigMap = 3;</code>
|
||||
* @param \Gradido\SignatureMap $var
|
||||
* Generated from protobuf field <code>.model.messages.gradido.SignatureMap sigMap = 3;</code>
|
||||
* @param \Model\Messages\Gradido\SignatureMap $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setSigMap($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Gradido\SignatureMap::class);
|
||||
GPBUtil::checkMessage($var, \Model\Messages\Gradido\SignatureMap::class);
|
||||
$this->sigMap = $var;
|
||||
|
||||
return $this;
|
||||
|
||||
@ -2,14 +2,14 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: TransactionBody.proto
|
||||
|
||||
namespace Gradido;
|
||||
namespace Model\Messages\Gradido;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\RepeatedField;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
|
||||
/**
|
||||
* Generated from protobuf message <code>gradido.TransactionBody</code>
|
||||
* Generated from protobuf message <code>model.messages.gradido.TransactionBody</code>
|
||||
*/
|
||||
final class TransactionBody extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
@ -29,10 +29,10 @@ final class TransactionBody extends \Google\Protobuf\Internal\Message
|
||||
*
|
||||
* @type string $memo
|
||||
* max 150 chars
|
||||
* @type \Gradido\StateCreateGroup $createGroup
|
||||
* @type \Gradido\StateGroupChangeParent $groupChangeParent
|
||||
* @type \Gradido\Transfer $transfer
|
||||
* @type \Gradido\TransactionCreation $creation
|
||||
* @type \Model\Messages\Gradido\StateCreateGroup $createGroup
|
||||
* @type \Model\Messages\Gradido\StateGroupChangeParent $groupChangeParent
|
||||
* @type \Model\Messages\Gradido\Transfer $transfer
|
||||
* @type \Model\Messages\Gradido\TransactionCreation $creation
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
@ -67,8 +67,8 @@ final class TransactionBody extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.StateCreateGroup createGroup = 2;</code>
|
||||
* @return \Gradido\StateCreateGroup
|
||||
* Generated from protobuf field <code>.model.messages.gradido.StateCreateGroup createGroup = 2;</code>
|
||||
* @return \Model\Messages\Gradido\StateCreateGroup
|
||||
*/
|
||||
public function getCreateGroup()
|
||||
{
|
||||
@ -76,21 +76,21 @@ final class TransactionBody extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.StateCreateGroup createGroup = 2;</code>
|
||||
* @param \Gradido\StateCreateGroup $var
|
||||
* Generated from protobuf field <code>.model.messages.gradido.StateCreateGroup createGroup = 2;</code>
|
||||
* @param \Model\Messages\Gradido\StateCreateGroup $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setCreateGroup($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Gradido\StateCreateGroup::class);
|
||||
GPBUtil::checkMessage($var, \Model\Messages\Gradido\StateCreateGroup::class);
|
||||
$this->writeOneof(2, $var);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.StateGroupChangeParent groupChangeParent = 3;</code>
|
||||
* @return \Gradido\StateGroupChangeParent
|
||||
* Generated from protobuf field <code>.model.messages.gradido.StateGroupChangeParent groupChangeParent = 3;</code>
|
||||
* @return \Model\Messages\Gradido\StateGroupChangeParent
|
||||
*/
|
||||
public function getGroupChangeParent()
|
||||
{
|
||||
@ -98,21 +98,21 @@ final class TransactionBody extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.StateGroupChangeParent groupChangeParent = 3;</code>
|
||||
* @param \Gradido\StateGroupChangeParent $var
|
||||
* Generated from protobuf field <code>.model.messages.gradido.StateGroupChangeParent groupChangeParent = 3;</code>
|
||||
* @param \Model\Messages\Gradido\StateGroupChangeParent $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setGroupChangeParent($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Gradido\StateGroupChangeParent::class);
|
||||
GPBUtil::checkMessage($var, \Model\Messages\Gradido\StateGroupChangeParent::class);
|
||||
$this->writeOneof(3, $var);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.Transfer transfer = 4;</code>
|
||||
* @return \Gradido\Transfer
|
||||
* Generated from protobuf field <code>.model.messages.gradido.Transfer transfer = 4;</code>
|
||||
* @return \Model\Messages\Gradido\Transfer
|
||||
*/
|
||||
public function getTransfer()
|
||||
{
|
||||
@ -120,21 +120,21 @@ final class TransactionBody extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.Transfer transfer = 4;</code>
|
||||
* @param \Gradido\Transfer $var
|
||||
* Generated from protobuf field <code>.model.messages.gradido.Transfer transfer = 4;</code>
|
||||
* @param \Model\Messages\Gradido\Transfer $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setTransfer($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Gradido\Transfer::class);
|
||||
GPBUtil::checkMessage($var, \Model\Messages\Gradido\Transfer::class);
|
||||
$this->writeOneof(4, $var);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.TransactionCreation creation = 5;</code>
|
||||
* @return \Gradido\TransactionCreation
|
||||
* Generated from protobuf field <code>.model.messages.gradido.TransactionCreation creation = 5;</code>
|
||||
* @return \Model\Messages\Gradido\TransactionCreation
|
||||
*/
|
||||
public function getCreation()
|
||||
{
|
||||
@ -142,13 +142,13 @@ final class TransactionBody extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.TransactionCreation creation = 5;</code>
|
||||
* @param \Gradido\TransactionCreation $var
|
||||
* Generated from protobuf field <code>.model.messages.gradido.TransactionCreation creation = 5;</code>
|
||||
* @param \Model\Messages\Gradido\TransactionCreation $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setCreation($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Gradido\TransactionCreation::class);
|
||||
GPBUtil::checkMessage($var, \Model\Messages\Gradido\TransactionCreation::class);
|
||||
$this->writeOneof(5, $var);
|
||||
|
||||
return $this;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: TransactionCreation.proto
|
||||
|
||||
namespace Gradido;
|
||||
namespace Model\Messages\Gradido;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\RepeatedField;
|
||||
@ -12,12 +12,12 @@ use Google\Protobuf\Internal\GPBUtil;
|
||||
* need signature from group admin or
|
||||
* percent of group users another than the receiver
|
||||
*
|
||||
* Generated from protobuf message <code>gradido.TransactionCreation</code>
|
||||
* Generated from protobuf message <code>model.messages.gradido.TransactionCreation</code>
|
||||
*/
|
||||
final class TransactionCreation extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.ReceiverAmount receiverAmount = 1;</code>
|
||||
* Generated from protobuf field <code>.model.messages.gradido.ReceiverAmount receiverAmount = 1;</code>
|
||||
*/
|
||||
private $receiverAmount = null;
|
||||
/**
|
||||
@ -31,7 +31,7 @@ final class TransactionCreation extends \Google\Protobuf\Internal\Message
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type \Gradido\ReceiverAmount $receiverAmount
|
||||
* @type \Model\Messages\Gradido\ReceiverAmount $receiverAmount
|
||||
* @type int $ident_hash
|
||||
* }
|
||||
*/
|
||||
@ -41,8 +41,8 @@ final class TransactionCreation extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.ReceiverAmount receiverAmount = 1;</code>
|
||||
* @return \Gradido\ReceiverAmount
|
||||
* Generated from protobuf field <code>.model.messages.gradido.ReceiverAmount receiverAmount = 1;</code>
|
||||
* @return \Model\Messages\Gradido\ReceiverAmount
|
||||
*/
|
||||
public function getReceiverAmount()
|
||||
{
|
||||
@ -50,13 +50,13 @@ final class TransactionCreation extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.gradido.ReceiverAmount receiverAmount = 1;</code>
|
||||
* @param \Gradido\ReceiverAmount $var
|
||||
* Generated from protobuf field <code>.model.messages.gradido.ReceiverAmount receiverAmount = 1;</code>
|
||||
* @param \Model\Messages\Gradido\ReceiverAmount $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setReceiverAmount($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Gradido\ReceiverAmount::class);
|
||||
GPBUtil::checkMessage($var, \Model\Messages\Gradido\ReceiverAmount::class);
|
||||
$this->receiverAmount = $var;
|
||||
|
||||
return $this;
|
||||
|
||||
@ -2,23 +2,23 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: Transfer.proto
|
||||
|
||||
namespace Gradido;
|
||||
namespace Model\Messages\Gradido;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\RepeatedField;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
|
||||
/**
|
||||
* Generated from protobuf message <code>gradido.Transfer</code>
|
||||
* Generated from protobuf message <code>model.messages.gradido.Transfer</code>
|
||||
*/
|
||||
final class Transfer extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .gradido.SenderAmount senderAmounts = 1;</code>
|
||||
* Generated from protobuf field <code>repeated .model.messages.gradido.SenderAmount senderAmounts = 1;</code>
|
||||
*/
|
||||
private $senderAmounts;
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .gradido.ReceiverAmount receiverAmounts = 2;</code>
|
||||
* Generated from protobuf field <code>repeated .model.messages.gradido.ReceiverAmount receiverAmounts = 2;</code>
|
||||
*/
|
||||
private $receiverAmounts;
|
||||
|
||||
@ -28,8 +28,8 @@ final class Transfer extends \Google\Protobuf\Internal\Message
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type \Gradido\SenderAmount[]|\Google\Protobuf\Internal\RepeatedField $senderAmounts
|
||||
* @type \Gradido\ReceiverAmount[]|\Google\Protobuf\Internal\RepeatedField $receiverAmounts
|
||||
* @type \Model\Messages\Gradido\SenderAmount[]|\Google\Protobuf\Internal\RepeatedField $senderAmounts
|
||||
* @type \Model\Messages\Gradido\ReceiverAmount[]|\Google\Protobuf\Internal\RepeatedField $receiverAmounts
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
@ -38,7 +38,7 @@ final class Transfer extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .gradido.SenderAmount senderAmounts = 1;</code>
|
||||
* Generated from protobuf field <code>repeated .model.messages.gradido.SenderAmount senderAmounts = 1;</code>
|
||||
* @return \Google\Protobuf\Internal\RepeatedField
|
||||
*/
|
||||
public function getSenderAmounts()
|
||||
@ -47,20 +47,20 @@ final class Transfer extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .gradido.SenderAmount senderAmounts = 1;</code>
|
||||
* @param \Gradido\SenderAmount[]|\Google\Protobuf\Internal\RepeatedField $var
|
||||
* Generated from protobuf field <code>repeated .model.messages.gradido.SenderAmount senderAmounts = 1;</code>
|
||||
* @param \Model\Messages\Gradido\SenderAmount[]|\Google\Protobuf\Internal\RepeatedField $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setSenderAmounts($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Gradido\SenderAmount::class);
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Model\Messages\Gradido\SenderAmount::class);
|
||||
$this->senderAmounts = $arr;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .gradido.ReceiverAmount receiverAmounts = 2;</code>
|
||||
* Generated from protobuf field <code>repeated .model.messages.gradido.ReceiverAmount receiverAmounts = 2;</code>
|
||||
* @return \Google\Protobuf\Internal\RepeatedField
|
||||
*/
|
||||
public function getReceiverAmounts()
|
||||
@ -69,13 +69,13 @@ final class Transfer extends \Google\Protobuf\Internal\Message
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>repeated .gradido.ReceiverAmount receiverAmounts = 2;</code>
|
||||
* @param \Gradido\ReceiverAmount[]|\Google\Protobuf\Internal\RepeatedField $var
|
||||
* Generated from protobuf field <code>repeated .model.messages.gradido.ReceiverAmount receiverAmounts = 2;</code>
|
||||
* @param \Model\Messages\Gradido\ReceiverAmount[]|\Google\Protobuf\Internal\RepeatedField $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setReceiverAmounts($var)
|
||||
{
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Gradido\ReceiverAmount::class);
|
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Model\Messages\Gradido\ReceiverAmount::class);
|
||||
$this->receiverAmounts = $arr;
|
||||
|
||||
return $this;
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package gradido;
|
||||
|
||||
message Key {
|
||||
oneof key {
|
||||
bytes ed25519 = 2; // ed25519 signature (libsodium default)
|
||||
bytes ed25519_ref10 = 3; // ed25519 ref10 signature
|
||||
}
|
||||
}
|
||||
|
||||
message SignaturePair {
|
||||
bytes pubKey = 1;
|
||||
oneof signature {
|
||||
bytes ed25519 = 2; // ed25519 signature (libsodium default)
|
||||
bytes ed25519_ref10 = 3; // ed25519 ref10 signature
|
||||
}
|
||||
}
|
||||
|
||||
message SignatureMap {
|
||||
repeated SignaturePair sigPair = 1; // Each signature pair corresponds to a unique Key required to sign the transaction.
|
||||
}
|
||||
|
||||
/* An exact date and time. This is the same data structure as the protobuf Timestamp.proto (see the comments in https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto) */
|
||||
message Timestamp {
|
||||
int64 seconds = 1; // Number of complete seconds since the start of the epoch
|
||||
int32 nanos = 2; // Number of nanoseconds since the start of the last second
|
||||
}
|
||||
|
||||
/* An exact date and time, with a resolution of one second (no nanoseconds). */
|
||||
message TimestampSeconds {
|
||||
int64 seconds = 1; // Number of complete seconds since the start of the epoch
|
||||
}
|
||||
|
||||
message SenderAmount {
|
||||
bytes ed25519_sender_pubkey = 1;
|
||||
sint64 amount = 2;
|
||||
sint64 senderFinalBalance = 3; // sender balance after transaction, including perishability
|
||||
}
|
||||
|
||||
message ReceiverAmount {
|
||||
bytes ed25519_receiver_pubkey = 1;
|
||||
sint64 amount = 2;
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package gradido;
|
||||
|
||||
import "BasicTypes.proto";
|
||||
|
||||
// need signature from this group and from parent (if it isn't zero)
|
||||
message StateCreateGroup {
|
||||
string name = 1;
|
||||
Key groupPublicKey = 2;
|
||||
Key parentGroupPublicKey = 3;
|
||||
reserved "hederaConsensusId";
|
||||
reserved 4;
|
||||
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package gradido;
|
||||
|
||||
import "BasicTypes.proto";
|
||||
|
||||
// need signature from this group and from both parents (if it isn't zero)
|
||||
message StateGroupChangeParent {
|
||||
Key groupPublicKey = 1;
|
||||
Key newParentGroupPublicKey = 2;
|
||||
Key oldParentGroupPublicKey = 3;
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package gradido;
|
||||
|
||||
import "BasicTypes.proto";
|
||||
|
||||
/*
|
||||
id will be set by Node server
|
||||
txHash will be also set by Node server,
|
||||
calculated from previous transaction txHash and this id, sigMap and received;
|
||||
*/
|
||||
|
||||
message Transaction {
|
||||
uint64 id = 1;
|
||||
TimestampSeconds received = 2;
|
||||
SignatureMap sigMap = 3;
|
||||
bytes txHash = 4;
|
||||
bytes bodyBytes = 5;
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package gradido;
|
||||
|
||||
import "Transfer.proto";
|
||||
import "StateCreateGroup.proto";
|
||||
import "StateGroupChangeParent.proto";
|
||||
import "TransactionCreation.proto";
|
||||
|
||||
message TransactionBody {
|
||||
string memo = 1; // max 150 chars
|
||||
oneof data {
|
||||
StateCreateGroup createGroup = 2;
|
||||
StateGroupChangeParent groupChangeParent = 3;
|
||||
Transfer transfer = 4;
|
||||
TransactionCreation creation = 5;
|
||||
}
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package gradido;
|
||||
|
||||
import "BasicTypes.proto";
|
||||
|
||||
// need signature from group admin or
|
||||
// percent of group users another than the receiver
|
||||
message TransactionCreation {
|
||||
ReceiverAmount receiverAmount = 1;
|
||||
sint32 ident_hash = 2;
|
||||
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package gradido;
|
||||
|
||||
import "BasicTypes.proto";
|
||||
|
||||
message Transfer {
|
||||
repeated SenderAmount senderAmounts = 1;
|
||||
repeated ReceiverAmount receiverAmounts = 2;
|
||||
}
|
||||
@ -26,7 +26,7 @@ $cakeDescription = 'Gradido';
|
||||
</title>
|
||||
<?= $this->Html->meta('icon') ?>
|
||||
|
||||
<?= $this->Html->css('base.css') ?>
|
||||
<!--<?= $this->Html->css('base.css') ?>-->
|
||||
<?= $this->Html->css('styles.css') ?>
|
||||
|
||||
<?= $this->fetch('meta') ?>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user