<?php

return [
    'radb' => [
        'endpoint'  => env('RADB_ENDPOINT', null),
        'username'  => env('RADB_USERNAME', null),
        'password'  => env('RADB_PASSWORD', null),
        'crypt'     => env('RADB_CRYPT', null)
    ],
    'clickhouse' => [
        'endpoint'  => env('CLICKHOUSE_ENDPOINT', null),
        'port'      => env('CLICKHOUSE_PORT', null),
        'user'      => env('CLICKHOUSE_USER', null),
        'password'  => env('CLICKHOUSE_PASSWORD', null),
        'database'  => env('CLICKHOUSE_DATABASE', null)
    ],
    'webhook' => [
        'standard' => env('HOOK_STANDARD', null),
        'goliath' => env('HOOK_GOLIATH', env('HOOK_STANDARD', null)),
        'mercury' => env('HOOK_MERCURY', env('HOOK_STANDARD', null)),
        'noc' => [
            'backhaul_metro'        => env('HOOK_NOC_METRO', env('HOOK_STANDARD', null)),
            'backhaul_subsea'       => env('HOOK_NOC_SUBSEA', env('HOOK_STANDARD', null)),
            'backhaul_terrestrial'  => env('HOOK_NOC_TERRESTRIAL', env('HOOK_STANDARD', null))
        ],
        'appliance' => env('HOOK_APPLIANCE', env('HOOK_STANDARD', null))
    ],
    'whmcs' => [
        'secret' => env('WHMCS_SECRET', '')
    ],
    'frontend' => [
        'main'                  => env('FRONTEND_MAIN', ''),
        'uri_asn_approve'       => env('FRONTEND_ASN_APPROVE', ''),
        'uri_account_verify'    => env('FRONTEND_ACC_VERIFY', ''),
        'uri_account_reset'     => env('FRONTEND_ACC_RESET', '')
    ],
    'endpoint' => [
        'whois_forward' => explode(",", env('ENDPOINT_WHOIS', '10.50.1.91:52020')),
        'acl_forward'   => explode(",", env('ENDPOINT_ACL', '')),
        'prefix_server' => env('ENDPOINT_PREFIX', ''),
        'route_server'  => env('ENDPOINT_ROUTES', '10.50.1.197:10102'),
        'bgp_forward'   => env('ENDPOINT_BGP_FORWARD', ''),
        'goliath' => explode(',', env('ENDPOINT_GOLIATH', 'mia,lax,chi,ash'))
    ],
    'constant' => [
        'chunk_small' => env('CHUNK_SM', 1000),
        'chunk_medium' => env('CHUNK_MD', 5000),
        'chunk_large' => env('CHUNK_LG', 10000)
    ],
    'whitelist' => [
        'apermon' => explode(",", env('WHITELIST_APERMON', '')),
        'whmcs' => explode(",", env('WHITELIST_WHMCS', ''))
    ],
    'secret' => [
        'bgp_forward' => env('SECRET_BGP_FORWARD')
    ],
    'reporting' => [
        'db'    => env('reporting_clickhouse_db', ''),
        'host'  => env('reporting_clickhouse_ip', ''),
        'port'  => env('reporting_clickhouse_port', ''),
        'user'  => env('reporting_clickhouse_user', ''),
        'pass'  => env('reporting_clickhouse_password', ''),
        'encryption_key' => env('webhook_key'),
        'microservice_url' => env('microservice_reporting_url'),
        'microservice_password' => env('microservice_reporting_password')
    ],
    'automation' => [
        'main_organisation_name' => env('AUTOMATION_MAIN_ORGANISATION_NAME', 'Global Secure Layer'),
        'main_organisation_asn' => env('AUTOMATION_MAIN_ASN', '137409'),
        'main_organisation_asns' => explode(',', env('AUTOMATION_MAIN_ASNS', '137409,136510,7578')),
    ],
    'oculi' => [
        'url'       => env('OCULI_URL', null),
        'secret'    => env('OCULI_SECRET', null),

        // A path to a CA bundle, or false to skip verification. Left unset it keeps Guzzle's default.
        'cert'      => env('OCULI_CERT', true),

        'timeout'   => env('OCULI_TIMEOUT', 300),

        // Queue rows resolved and shipped per round trip.
        'chunk'     => env('OCULI_CHUNK', 500),

        // Wall clock budget in seconds before the command yields to the next scheduled pass.
        'budget'    => env('OCULI_BUDGET', 45),

        // Minutes an event with no attributable prefix is retried for before it is written off.
        'grace'     => env('OCULI_GRACE', 60),

        // Days back the notification tracker polls the Oculi attack table for.
        'track_days' => env('OCULI_TRACK_DAYS', 8),

        // Days a minted guest report download link stays valid for.
        'link_days' => env('OCULI_LINK_DAYS', 7)
    ],
    'hook' => [
        // Seconds slept between webhook deliveries so chat platform rate limits are never provoked.
        // Tests zero this; production should not.
        'pace' => env('HOOK_PACE', 2)
    ],
    'mock' => [
        'http' => env('CREATIA_MOCK_HTTP', false),
    ]
];
