Laravel Hetzner Storagebox

PHP MIT

Production-ready Laravel package for integrating Hetzner Storage Box into Laravel applications using the native Storage facade and filesystem API.

Stars
19
Forks
0
Downloads
2,357
Open Issues
0
Files main

Repository Files

Loading file structure...
config/hetzner-storagebox.php
<?php

return [
    /*
    |--------------------------------------------------------------------------
    | Hetzner Storage Box API Token
    |--------------------------------------------------------------------------
    |
    | Your Hetzner Storage Box Console API project token. You can generate one
    | in the Hetzner Console under Security > API-Tokens.
    |
    */
    'token' => env('HETZNER_STORAGEBOX_TOKEN'),

    /*
    |--------------------------------------------------------------------------
    | Base API URL
    |--------------------------------------------------------------------------
    |
    | The base URL of the Hetzner Console API for managing Storage Boxes.
    |
    */
    'base_url' => env('HETZNER_STORAGEBOX_BASE_URL', 'https://api.hetzner.com/v1'),

    /*
    |--------------------------------------------------------------------------
    | Request Timeout
    |--------------------------------------------------------------------------
    |
    | The default request timeout in seconds.
    |
    */
    'timeout' => (int) env('HETZNER_STORAGEBOX_TIMEOUT', 30),

    /*
    |--------------------------------------------------------------------------
    | Retry Configuration
    |--------------------------------------------------------------------------
    |
    | Configuration for rate limit retries and server error retries.
    |
    */
    'retries' => (int) env('HETZNER_STORAGEBOX_RETRIES', 3),
    'retry_backoff' => (int) env('HETZNER_STORAGEBOX_RETRY_BACKOFF', 100), // ms multiplier

    /*
    |--------------------------------------------------------------------------
    | Logging
    |--------------------------------------------------------------------------
    |
    | When enabled, requests and responses will be logged using Laravel's
    | Log service.
    |
    */
    'logging' => [
        'enabled' => (bool) env('HETZNER_STORAGEBOX_LOGGING_ENABLED', false),
        'channel' => env('HETZNER_STORAGEBOX_LOGGING_CHANNEL'),
    ],
];