Adds a new 'S3-Compatible Storage' provider that works with any
S3-API-compatible object storage service, including MinIO, Ceph,
Cloudflare R2, Backblaze B2, and others.
Changes:
- New provider class: classes/providers/storage/s3-compatible-provider.php
- Provider key: s3compatible
- Reads user-configured endpoint URL from settings
- Uses path-style URL access (required by most S3-compatible services)
- Supports credentials via AS3CF_S3COMPAT_ACCESS_KEY_ID /
AS3CF_S3COMPAT_SECRET_ACCESS_KEY wp-config.php constants
- Disables AWS-specific features (Block Public Access, Object Ownership)
- New provider SVG icons (s3compatible.svg, -link.svg, -round.svg)
- Registered provider in main plugin class with endpoint setting support
- Updated StorageProviderSubPage to show endpoint URL input for S3-compatible
- Built pro settings bundle with rollup (Svelte 4.2.19)
- Added package.json and updated rollup.config.mjs for pro-only builds
110 lines
3.9 KiB
PHP
110 lines
3.9 KiB
PHP
<?php
|
|
|
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
# source: google/api/billing.proto
|
|
namespace DeliciousBrains\WP_Offload_Media\Gcp\Google\Api\Billing;
|
|
|
|
use DeliciousBrains\WP_Offload_Media\Gcp\Google\Protobuf\Internal\GPBType;
|
|
use DeliciousBrains\WP_Offload_Media\Gcp\Google\Protobuf\Internal\RepeatedField;
|
|
use DeliciousBrains\WP_Offload_Media\Gcp\Google\Protobuf\Internal\GPBUtil;
|
|
/**
|
|
* Configuration of a specific billing destination (Currently only support
|
|
* bill against consumer project).
|
|
*
|
|
* Generated from protobuf message <code>google.api.Billing.BillingDestination</code>
|
|
*/
|
|
class BillingDestination extends \DeliciousBrains\WP_Offload_Media\Gcp\Google\Protobuf\Internal\Message
|
|
{
|
|
/**
|
|
* The monitored resource type. The type must be defined in
|
|
* [Service.monitored_resources][google.api.Service.monitored_resources]
|
|
* section.
|
|
*
|
|
* Generated from protobuf field <code>string monitored_resource = 1;</code>
|
|
*/
|
|
protected $monitored_resource = '';
|
|
/**
|
|
* Names of the metrics to report to this billing destination.
|
|
* Each name must be defined in
|
|
* [Service.metrics][google.api.Service.metrics] section.
|
|
*
|
|
* Generated from protobuf field <code>repeated string metrics = 2;</code>
|
|
*/
|
|
private $metrics;
|
|
/**
|
|
* Constructor.
|
|
*
|
|
* @param array $data {
|
|
* Optional. Data for populating the Message object.
|
|
*
|
|
* @type string $monitored_resource
|
|
* The monitored resource type. The type must be defined in
|
|
* [Service.monitored_resources][google.api.Service.monitored_resources]
|
|
* section.
|
|
* @type array<string>|\Google\Protobuf\Internal\RepeatedField $metrics
|
|
* Names of the metrics to report to this billing destination.
|
|
* Each name must be defined in
|
|
* [Service.metrics][google.api.Service.metrics] section.
|
|
* }
|
|
*/
|
|
public function __construct($data = NULL)
|
|
{
|
|
\DeliciousBrains\WP_Offload_Media\Gcp\GPBMetadata\Google\Api\Billing::initOnce();
|
|
parent::__construct($data);
|
|
}
|
|
/**
|
|
* The monitored resource type. The type must be defined in
|
|
* [Service.monitored_resources][google.api.Service.monitored_resources]
|
|
* section.
|
|
*
|
|
* Generated from protobuf field <code>string monitored_resource = 1;</code>
|
|
* @return string
|
|
*/
|
|
public function getMonitoredResource()
|
|
{
|
|
return $this->monitored_resource;
|
|
}
|
|
/**
|
|
* The monitored resource type. The type must be defined in
|
|
* [Service.monitored_resources][google.api.Service.monitored_resources]
|
|
* section.
|
|
*
|
|
* Generated from protobuf field <code>string monitored_resource = 1;</code>
|
|
* @param string $var
|
|
* @return $this
|
|
*/
|
|
public function setMonitoredResource($var)
|
|
{
|
|
GPBUtil::checkString($var, True);
|
|
$this->monitored_resource = $var;
|
|
return $this;
|
|
}
|
|
/**
|
|
* Names of the metrics to report to this billing destination.
|
|
* Each name must be defined in
|
|
* [Service.metrics][google.api.Service.metrics] section.
|
|
*
|
|
* Generated from protobuf field <code>repeated string metrics = 2;</code>
|
|
* @return \Google\Protobuf\Internal\RepeatedField
|
|
*/
|
|
public function getMetrics()
|
|
{
|
|
return $this->metrics;
|
|
}
|
|
/**
|
|
* Names of the metrics to report to this billing destination.
|
|
* Each name must be defined in
|
|
* [Service.metrics][google.api.Service.metrics] section.
|
|
*
|
|
* Generated from protobuf field <code>repeated string metrics = 2;</code>
|
|
* @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
|
|
* @return $this
|
|
*/
|
|
public function setMetrics($var)
|
|
{
|
|
$arr = GPBUtil::checkRepeatedField($var, \DeliciousBrains\WP_Offload_Media\Gcp\Google\Protobuf\Internal\GPBType::STRING);
|
|
$this->metrics = $arr;
|
|
return $this;
|
|
}
|
|
}
|