<?php

declare(strict_types=1);

/*
 * This file is part of Laravel Flysystem.
 *
 * (c) Graham Campbell <graham@alt-three.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

return [

    /*
    |--------------------------------------------------------------------------
    | Default Connection Name
    |--------------------------------------------------------------------------
    |
    | Here you may specify which of the connections below you wish to use as
    | your default connection for all work. Of course, you may use many
    | connections at once using the manager class.
    |
    */

    'default' => 'local',

    /*
    |--------------------------------------------------------------------------
    | Flysystem Connections
    |--------------------------------------------------------------------------
    |
    | Here are each of the connections setup for your application. Examples of
    | configuring each supported driver is shown below. You can of course have
    | multiple connections per driver.
    |
    */

    'connections' => [

		'local' => [
            'driver'     => 'local',
            'path'       =>  public_path() . '/uploads',
             'visibility' => 'public',
        ],

        'video' => [
			'driver'          => 'awss3',
			'version'         => 'latest',
			'visibility'      => 'public',
			'calculate_md5'   => true,
			'scheme'          => 'https',
			'key' => env('AWS_ACCESS_KEY_ID'),
			'secret' => env('AWS_SECRET_ACCESS_KEY'),
			'region' => env('AWS_DEFAULT_REGION'),
			'bucket' => env('AWS_VIDEO_BUCKET'),
			'endpoint' => env('AWS_URL'),
		],

		'preview' => [
			'driver'          => 'awss3',
			'version'         => 'latest',
			'visibility'      => 'public',
			'calculate_md5'   => true,
			'scheme'          => 'https',
			'key' => env('AWS_ACCESS_KEY_ID'),
			'secret' => env('AWS_SECRET_ACCESS_KEY'),
			'region' => env('AWS_DEFAULT_REGION'),
			'bucket' => env('AWS_PREVIEW_BUCKET'),
			'endpoint' => env('AWS_URL'),
		],

        'avatar' => [
            'driver'          => 'awss3',
            'version'         => 'latest',
            'visibility'      => 'public',
            'calculate_md5'   => true,
            'scheme'          => 'https',
            'key' => env('AWS_ACCESS_KEY_ID'),
            'secret' => env('AWS_SECRET_ACCESS_KEY'),
            'region' => env('AWS_DEFAULT_REGION'),
            'bucket' => env('AWS_AVATAR_BUCKET'),
            'endpoint' => env('AWS_URL'),
        ],

        'teaser' => [
            'driver'          => 'awss3',
            'version'         => 'latest',
            'visibility'      => 'public',
            'calculate_md5'   => true,
            'scheme'          => 'https',
            'key' => env('AWS_ACCESS_KEY_ID'),
            'secret' => env('AWS_SECRET_ACCESS_KEY'),
            'region' => env('AWS_DEFAULT_REGION'),
            'bucket' => env('AWS_TEASER_BUCKET'),
            'endpoint' => env('AWS_URL'),
        ],

//        'azure' => [
//            'driver'       => 'azure',
//            'account-name' => 'your-account-name',
//            'api-key'      => 'your-api-key',
//            'container'    => 'your-container',
//            // 'visibility'   => 'public',
//            // 'pirate'       => false,
//            // 'eventable'    => true,
//            // 'cache'        => 'foo'
//        ],
//
//        'dropbox' => [
//            'driver'     => 'dropbox',
//            'token'      => 'your-token',
//            // 'prefix'     => 'your-prefix',
//            // 'visibility' => 'public',
//            // 'pirate'     => false,
//            // 'eventable'  => true,
//            // 'cache'      => 'foo'
//        ],
//
//        'ftp' => [
//            'driver'     => 'ftp',
//            'host'       => 'ftp.example.com',
//            'port'       => 21,
//            'username'   => 'your-username',
//            'password'   => 'your-password',
//            // 'root'       => '/path/to/root',
//            // 'passive'    => true,
//            // 'ssl'        => true,
//            // 'timeout'    => 20,
//            // 'visibility' => 'public',
//            // 'pirate'     => false,
//            // 'eventable'  => true,
//            // 'cache'      => 'foo'
//        ],
//
//        'gridfs' => [
//            'driver'     => 'gridfs',
//            'server'     => 'mongodb://localhost:27017',
//            'database'   => 'your-database',
//            // 'visibility' => 'public',
//            // 'pirate'     => false,
//            // 'eventable'  => true,
//            // 'cache'      => 'foo'
//        ],
//
//        'local' => [
//            'driver'     => 'local',
//            'path'       => storage_path('files'),
//            // 'visibility' => 'public',
//            // 'pirate'     => false,
//            // 'eventable'  => true,
//            // 'cache'      => 'foo'
//        ],
//
//        'null' => [
//            'driver'    => 'null',
//            // 'eventable' => true,
//            // 'cache'     => 'foo'
//        ],
//
//        'rackspace' => [
//            'driver'     => 'rackspace',
//            'endpoint'   => 'your-endpoint',
//            'region'     => 'your-region',
//            'username'   => 'your-username',
//            'apiKey'     => 'your-api-key',
//            'container'  => 'your-container',
//            // 'internal'   => false,
//            // 'visibility' => 'public',
//            // 'pirate'     => false,
//            // 'eventable'  => true,
//            // 'cache'      => 'foo'
//        ],
//
//        'replicate' => [
//            'driver'     => 'replicate',
//            'source'     => 'your-source-adapter',
//            'replica'    => 'your-replica-adapter',
//            // 'visibility' => 'public',
//            // 'pirate'     => false,
//            // 'eventable'  => true,
//            // 'cache'      => 'foo'
//        ],
//
//        'sftp' => [
//            'driver'     => 'sftp',
//            'host'       => 'sftp.example.com',
//            'port'       => 22,
//            'username'   => 'your-username',
//            'password'   => 'your-password',
//            // 'privateKey' => 'path/to/or/contents/of/privatekey',
//            // 'root'       => '/path/to/root',
//            // 'timeout'    => 20,
//            // 'visibility' => 'public',
//            // 'pirate'     => false,
//            // 'eventable'  => true,
//            // 'cache'      => 'foo'
//        ],
//
//        'webdav' => [
//            'driver'     => 'webdav',
//            'baseUri'    => 'http://example.org/dav/',
//            'userName'   => 'your-username',
//            'password'   => 'your-password',
//            // 'visibility' => 'public',
//            // 'pirate'     => false,
//            // 'eventable'  => true,
//            // 'cache'      => 'foo'
//        ],
//
//        'zip' => [
//            'driver'     => 'zip',
//            'path'       => storage_path('files.zip'),
//            // 'visibility' => 'public',
//            // 'pirate'     => false,
//            // 'eventable'  => true,
//            // 'cache'      => 'foo'
//        ],

    ],

    /*
    |--------------------------------------------------------------------------
    | Flysystem Cache
    |--------------------------------------------------------------------------
    */

    'cache' => [

        'foo' => [
            'driver'    => 'illuminate',
            'connector' => null, // null means use default driver
            'key'       => 'foo',
            // 'ttl'       => 300
        ],

        'bar' => [
            'driver'    => 'illuminate',
            'connector' => 'redis', // config/cache.php
            'key'       => 'bar',
            'ttl'       => 600,
        ],

        'adapter' => [
            'driver'  => 'adapter',
            'adapter' => 'local', // as defined in connections
            'file'    => 'flysystem.json',
            'ttl'     => 600,
        ],

    ],

];
