403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.60
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/projects/nextcloud/3rdparty/php-opencloud/openstack/src/Images/v2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/projects/nextcloud/3rdparty/php-opencloud/openstack/src/Images/v2/Api.php
<?php

declare(strict_types=1);

namespace OpenStack\Images\v2;

use OpenStack\Common\Api\AbstractApi;

class Api extends AbstractApi
{
    private $basePath;

    public function __construct()
    {
        $this->params   = new Params();
        $this->basePath = 'v2/';
    }

    public function postImages(): array
    {
        return [
            'method' => 'POST',
            'path'   => $this->basePath.'images',
            'params' => [
                'name'            => $this->params->imageName(),
                'visibility'      => $this->params->visibility(),
                'tags'            => $this->params->tags(),
                'containerFormat' => $this->params->containerFormat(),
                'diskFormat'      => $this->params->diskFormat(),
                'minDisk'         => $this->params->minDisk(),
                'minRam'          => $this->params->minRam(),
                'protected'       => $this->params->protectedParam(),
            ],
        ];
    }

    public function getImages(): array
    {
        return [
            'method' => 'GET',
            'path'   => $this->basePath.'images',
            'params' => [
                'limit'        => $this->params->limit(),
                'marker'       => $this->params->marker(),
                'sortKey'      => $this->params->sortKey(),
                'sortDir'      => $this->params->sortDir(),
                'name'         => $this->params->queryName(),
                'visibility'   => $this->params->queryVisibility(),
                'memberStatus' => $this->params->queryMemberStatus(),
                'owner'        => $this->params->queryOwner(),
                'status'       => $this->params->queryStatus(),
                'sizeMin'      => $this->params->querySizeMin(),
                'sizeMax'      => $this->params->querySizeMax(),
                'tag'          => $this->params->queryTag(),
            ],
        ];
    }

    public function getImage(): array
    {
        return [
            'method' => 'GET',
            'path'   => $this->basePath.'images/{id}',
            'params' => ['id' => $this->params->idPath()],
        ];
    }

    public function patchImage(): array
    {
        return [
            'method' => 'PATCH',
            'path'   => $this->basePath.'images/{id}',
            'params' => [
                'id'          => $this->params->idPath(),
                'patchDoc'    => $this->params->patchDoc(),
                'contentType' => $this->params->contentType(),
            ],
        ];
    }

    public function deleteImage(): array
    {
        return [
            'method' => 'DELETE',
            'path'   => $this->basePath.'images/{id}',
            'params' => ['id' => $this->params->idPath()],
        ];
    }

    public function reactivateImage(): array
    {
        return [
            'method' => 'POST',
            'path'   => $this->basePath.'images/{id}/actions/reactivate',
            'params' => ['id' => $this->params->idPath()],
        ];
    }

    public function deactivateImage(): array
    {
        return [
            'method' => 'POST',
            'path'   => $this->basePath.'images/{id}/actions/deactivate',
            'params' => ['id' => $this->params->idPath()],
        ];
    }

    public function postImageData(): array
    {
        return [
            'method' => 'PUT',
            'path'   => $this->basePath.'images/{id}/file',
            'params' => [
                'id'          => $this->params->idPath(),
                'data'        => $this->params->data(),
                'contentType' => $this->params->contentType(),
            ],
        ];
    }

    public function getImageData(): array
    {
        return [
            'method' => 'GET',
            'path'   => $this->basePath.'images/{id}/file',
            'params' => ['id' => $this->params->idPath()],
        ];
    }

    public function getImageSchema(): array
    {
        return [
            'method' => 'GET',
            'path'   => $this->basePath.'schemas/image',
            'params' => [],
        ];
    }

    public function postImageMembers(): array
    {
        return [
            'method' => 'POST',
            'path'   => $this->basePath.'images/{imageId}/members',
            'params' => [
                'imageId' => $this->params->idPath(),
                'id'      => $this->params->memberId(),
            ],
        ];
    }

    public function getImageMembers(): array
    {
        return [
            'method' => 'GET',
            'path'   => $this->basePath.'images/{imageId}/members',
            'params' => ['imageId' => $this->params->idPath()],
        ];
    }

    public function getImageMember(): array
    {
        return [
            'method' => 'GET',
            'path'   => $this->basePath.'images/{imageId}/members/{id}',
            'params' => [
                'imageId' => $this->params->idPath(),
                'id'      => $this->params->idPath(),
            ],
        ];
    }

    public function deleteImageMember(): array
    {
        return [
            'method' => 'DELETE',
            'path'   => $this->basePath.'images/{imageId}/members/{id}',
            'params' => [
                'imageId' => $this->params->idPath(),
                'id'      => $this->params->idPath(),
            ],
        ];
    }

    public function putImageMember(): array
    {
        return [
            'method' => 'PUT',
            'path'   => $this->basePath.'images/{imageId}/members/{id}',
            'params' => [
                'imageId' => $this->params->idPath(),
                'id'      => $this->params->idPath(),
                'status'  => $this->params->status(),
            ],
        ];
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit