Abstracted to allow multiple storage containers

This commit is contained in:
KodeStar 2017-08-03 13:34:02 +01:00
parent a727921498
commit 09eb01aaaf
6 changed files with 34 additions and 12 deletions

View File

@ -1,9 +1,9 @@
<?xml version="1.0"?>
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>objectstoragebackblaze</id>
<name>Object Storage Backblaze</name>
<summary>Backblaze B2 integration for primary storage</summary>
<id>objectstorageapp</id>
<name>Object Storage App</name>
<summary>Object storage integration for primary storage</summary>
<description><![CDATA[Backblaze B2 integration for primary storage]]></description>
<licence>agpl</licence>
<author mail="kode@fanart.tv" homepage="https://fanart.tv">Chris Hunt</author>
@ -12,14 +12,14 @@
<category>files</category>
<category>integration</category>
<category>tools</category>
<bugs>https://github.com/linuxserver/objectstoragebackblaze/issues</bugs>
<bugs>https://github.com/linuxserver/objectstorageapp/issues</bugs>
<dependencies>
<nextcloud min-version="12" max-version="12"/>
</dependencies>
<navigations>
<navigation>
<name>Object Storage Backblaze</name>
<route>objectstoragebackblaze.page.index</route>
<name>Object Storage App</name>
<route>objectstorageapp.page.index</route>
</navigation>
</navigations>
</info>

View File

@ -1,9 +1,9 @@
<?php
namespace OCA\ObjectStorageBackblaze\Controller;
namespace OCA\ObjectStorageApp\Controller;
use OCA\ObjectStorageBackblaze\Service\BackblazeService;
class BackblazeController extends Controller {
class AppController extends Controller {

View File

@ -1,5 +1,5 @@
<?php
namespace OCA\ObjectStorageBackblaze\Controller;
namespace OCA\ObjectStorageApp\Controller;
use OCP\IRequest;
use OCP\AppFramework\Http\TemplateResponse;

View File

@ -11,12 +11,12 @@
),
*/
namespace OCA\ObjectStorageBackblaze\ObjectStore;
namespace OCA\ObjectStorageApp\ObjectStore;
use OCP\Files\ObjectStore\IObjectStore;
use OCP\Files\StorageAuthException;
use OCP\Files\StorageNotAvailableException;
class Backblaze implements IObjectStore {
}

22
lib/ObjectStore/Hubic.php Normal file
View File

@ -0,0 +1,22 @@
<?php
/*
'objectstore' => array(
'class' => 'OCA\\ObjectStorageBackblaze\\ObjectStore\\Backblaze',
'arguments' => array(
'clientId' => 'username',
'applicationId' => 'Secr3tPaSSWoRdt7',
// the container to store the data in
'bucket' => 'nextcloud',
),
),
*/
namespace OCA\ObjectStorageApp\ObjectStore;
use OCP\Files\ObjectStore\IObjectStore;
use OCP\Files\StorageAuthException;
use OCP\Files\StorageNotAvailableException;
class Hubic implements IObjectStore {
}

View File

@ -1,5 +1,5 @@
<?php
namespace OCA\ObjectStorageBackblaze\Service;
namespace OCA\ObjectStorageApp\Service;
use \OCP\IConfig;