更新
This commit is contained in:
15
vendor/alibabacloud/gateway-spi/.gitignore
vendored
Normal file
15
vendor/alibabacloud/gateway-spi/.gitignore
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
composer.phar
|
||||
/vendor/
|
||||
|
||||
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
|
||||
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
|
||||
composer.lock
|
||||
|
||||
.vscode/
|
||||
.idea
|
||||
.DS_Store
|
||||
|
||||
cache/
|
||||
*.cache
|
||||
runtime/
|
||||
.php_cs.cache
|
||||
65
vendor/alibabacloud/gateway-spi/.php_cs.dist
vendored
Normal file
65
vendor/alibabacloud/gateway-spi/.php_cs.dist
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/*
|
||||
* This document has been generated with
|
||||
* https://mlocati.github.io/php-cs-fixer-configurator/#version:2.15|configurator
|
||||
* you can change this configuration by importing this file.
|
||||
*/
|
||||
|
||||
return PhpCsFixer\Config::create()
|
||||
->setRiskyAllowed(true)
|
||||
->setIndent(' ')
|
||||
->setRules([
|
||||
'@PSR2' => true,
|
||||
'@PhpCsFixer' => true,
|
||||
'@Symfony:risky' => true,
|
||||
'concat_space' => ['spacing' => 'one'],
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
'array_indentation' => true,
|
||||
'combine_consecutive_unsets' => true,
|
||||
'method_separation' => true,
|
||||
'single_quote' => true,
|
||||
'declare_equal_normalize' => true,
|
||||
'function_typehint_space' => true,
|
||||
'hash_to_slash_comment' => true,
|
||||
'include' => true,
|
||||
'lowercase_cast' => true,
|
||||
'no_multiline_whitespace_before_semicolons' => true,
|
||||
'no_leading_import_slash' => true,
|
||||
'no_multiline_whitespace_around_double_arrow' => true,
|
||||
'no_spaces_around_offset' => true,
|
||||
'no_unneeded_control_parentheses' => true,
|
||||
'no_unused_imports' => true,
|
||||
'no_whitespace_before_comma_in_array' => true,
|
||||
'no_whitespace_in_blank_line' => true,
|
||||
'object_operator_without_whitespace' => true,
|
||||
'single_blank_line_before_namespace' => true,
|
||||
'single_class_element_per_statement' => true,
|
||||
'space_after_semicolon' => true,
|
||||
'standardize_not_equals' => true,
|
||||
'ternary_operator_spaces' => true,
|
||||
'trailing_comma_in_multiline_array' => true,
|
||||
'trim_array_spaces' => true,
|
||||
'unary_operator_spaces' => true,
|
||||
'whitespace_after_comma_in_array' => true,
|
||||
'no_extra_consecutive_blank_lines' => [
|
||||
'curly_brace_block',
|
||||
'extra',
|
||||
'parenthesis_brace_block',
|
||||
'square_brace_block',
|
||||
'throw',
|
||||
'use',
|
||||
],
|
||||
'binary_operator_spaces' => [
|
||||
'align_double_arrow' => true,
|
||||
'align_equals' => true,
|
||||
],
|
||||
'braces' => [
|
||||
'allow_single_line_closure' => true,
|
||||
],
|
||||
])
|
||||
->setFinder(
|
||||
PhpCsFixer\Finder::create()
|
||||
->exclude('vendor')
|
||||
->exclude('tests')
|
||||
->in(__DIR__)
|
||||
);
|
||||
15
vendor/alibabacloud/gateway-spi/autoload.php
vendored
Normal file
15
vendor/alibabacloud/gateway-spi/autoload.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
if (file_exists(__DIR__ . \DIRECTORY_SEPARATOR . 'vendor' . \DIRECTORY_SEPARATOR . 'autoload.php')) {
|
||||
require_once __DIR__ . \DIRECTORY_SEPARATOR . 'vendor' . \DIRECTORY_SEPARATOR . 'autoload.php';
|
||||
}
|
||||
|
||||
spl_autoload_register(function ($class) {
|
||||
$name = str_replace('Darabonba\\GatewaySpi\\', '', $class);
|
||||
$file = __DIR__ . \DIRECTORY_SEPARATOR . 'src' . \DIRECTORY_SEPARATOR . str_replace('\\', \DIRECTORY_SEPARATOR, $name) . '.php';
|
||||
if (file_exists($file)) {
|
||||
require_once $file;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
30
vendor/alibabacloud/gateway-spi/composer.json
vendored
Normal file
30
vendor/alibabacloud/gateway-spi/composer.json
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "alibabacloud/gateway-spi",
|
||||
"description": "Alibaba Cloud Gateway SPI Client",
|
||||
"type": "library",
|
||||
"license": "Apache-2.0",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Alibaba Cloud SDK",
|
||||
"email": "sdk-team@alibabacloud.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">5.5",
|
||||
"alibabacloud/credentials": "^1.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Darabonba\\GatewaySpi\\": "src"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"fixer": "php-cs-fixer fix ./"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true,
|
||||
"preferred-install": "dist",
|
||||
"optimize-autoloader": true
|
||||
},
|
||||
"prefer-stable": true
|
||||
}
|
||||
35
vendor/alibabacloud/gateway-spi/src/Client.php
vendored
Normal file
35
vendor/alibabacloud/gateway-spi/src/Client.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
// This file is auto-generated, don't edit it. Thanks.
|
||||
namespace Darabonba\GatewaySpi;
|
||||
|
||||
use \Exception;
|
||||
|
||||
use Darabonba\GatewaySpi\Models\InterceptorContext;
|
||||
use Darabonba\GatewaySpi\Models\AttributeMap;
|
||||
|
||||
abstract class Client {
|
||||
public function __construct(){
|
||||
}
|
||||
|
||||
/**
|
||||
* @param InterceptorContext $context
|
||||
* @param AttributeMap $attributeMap
|
||||
* @return void
|
||||
*/
|
||||
abstract function modifyConfiguration($context, $attributeMap);
|
||||
|
||||
/**
|
||||
* @param InterceptorContext $context
|
||||
* @param AttributeMap $attributeMap
|
||||
* @return void
|
||||
*/
|
||||
abstract function modifyRequest($context, $attributeMap);
|
||||
|
||||
/**
|
||||
* @param InterceptorContext $context
|
||||
* @param AttributeMap $attributeMap
|
||||
* @return void
|
||||
*/
|
||||
abstract function modifyResponse($context, $attributeMap);
|
||||
}
|
||||
47
vendor/alibabacloud/gateway-spi/src/Models/AttributeMap.php
vendored
Normal file
47
vendor/alibabacloud/gateway-spi/src/Models/AttributeMap.php
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
// This file is auto-generated, don't edit it. Thanks.
|
||||
namespace Darabonba\GatewaySpi\Models;
|
||||
|
||||
use AlibabaCloud\Tea\Model;
|
||||
|
||||
class AttributeMap extends Model {
|
||||
public function validate() {
|
||||
Model::validateRequired('attributes', $this->attributes, true);
|
||||
Model::validateRequired('key', $this->key, true);
|
||||
}
|
||||
public function toMap() {
|
||||
$res = [];
|
||||
if (null !== $this->attributes) {
|
||||
$res['attributes'] = $this->attributes;
|
||||
}
|
||||
if (null !== $this->key) {
|
||||
$res['key'] = $this->key;
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
/**
|
||||
* @param array $map
|
||||
* @return AttributeMap
|
||||
*/
|
||||
public static function fromMap($map = []) {
|
||||
$model = new self();
|
||||
if(isset($map['attributes'])){
|
||||
$model->attributes = $map['attributes'];
|
||||
}
|
||||
if(isset($map['key'])){
|
||||
$model->key = $map['key'];
|
||||
}
|
||||
return $model;
|
||||
}
|
||||
/**
|
||||
* @var mixed[]
|
||||
*/
|
||||
public $attributes;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
public $key;
|
||||
|
||||
}
|
||||
63
vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext.php
vendored
Normal file
63
vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext.php
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
// This file is auto-generated, don't edit it. Thanks.
|
||||
namespace Darabonba\GatewaySpi\Models;
|
||||
|
||||
use AlibabaCloud\Tea\Model;
|
||||
|
||||
use Darabonba\GatewaySpi\Models\InterceptorContext\request;
|
||||
use Darabonba\GatewaySpi\Models\InterceptorContext\configuration;
|
||||
use Darabonba\GatewaySpi\Models\InterceptorContext\response;
|
||||
|
||||
class InterceptorContext extends Model {
|
||||
public function validate() {
|
||||
Model::validateRequired('request', $this->request, true);
|
||||
Model::validateRequired('configuration', $this->configuration, true);
|
||||
Model::validateRequired('response', $this->response, true);
|
||||
}
|
||||
public function toMap() {
|
||||
$res = [];
|
||||
if (null !== $this->request) {
|
||||
$res['request'] = null !== $this->request ? $this->request->toMap() : null;
|
||||
}
|
||||
if (null !== $this->configuration) {
|
||||
$res['configuration'] = null !== $this->configuration ? $this->configuration->toMap() : null;
|
||||
}
|
||||
if (null !== $this->response) {
|
||||
$res['response'] = null !== $this->response ? $this->response->toMap() : null;
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
/**
|
||||
* @param array $map
|
||||
* @return InterceptorContext
|
||||
*/
|
||||
public static function fromMap($map = []) {
|
||||
$model = new self();
|
||||
if(isset($map['request'])){
|
||||
$model->request = request::fromMap($map['request']);
|
||||
}
|
||||
if(isset($map['configuration'])){
|
||||
$model->configuration = configuration::fromMap($map['configuration']);
|
||||
}
|
||||
if(isset($map['response'])){
|
||||
$model->response = response::fromMap($map['response']);
|
||||
}
|
||||
return $model;
|
||||
}
|
||||
/**
|
||||
* @var request
|
||||
*/
|
||||
public $request;
|
||||
|
||||
/**
|
||||
* @var configuration
|
||||
*/
|
||||
public $configuration;
|
||||
|
||||
/**
|
||||
* @var response
|
||||
*/
|
||||
public $response;
|
||||
|
||||
}
|
||||
83
vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/configuration.php
vendored
Normal file
83
vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/configuration.php
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
// This file is auto-generated, don't edit it. Thanks.
|
||||
namespace Darabonba\GatewaySpi\Models\InterceptorContext;
|
||||
|
||||
use AlibabaCloud\Tea\Model;
|
||||
|
||||
class configuration extends Model {
|
||||
public function validate() {
|
||||
Model::validateRequired('regionId', $this->regionId, true);
|
||||
}
|
||||
public function toMap() {
|
||||
$res = [];
|
||||
if (null !== $this->regionId) {
|
||||
$res['regionId'] = $this->regionId;
|
||||
}
|
||||
if (null !== $this->endpoint) {
|
||||
$res['endpoint'] = $this->endpoint;
|
||||
}
|
||||
if (null !== $this->endpointRule) {
|
||||
$res['endpointRule'] = $this->endpointRule;
|
||||
}
|
||||
if (null !== $this->endpointMap) {
|
||||
$res['endpointMap'] = $this->endpointMap;
|
||||
}
|
||||
if (null !== $this->endpointType) {
|
||||
$res['endpointType'] = $this->endpointType;
|
||||
}
|
||||
if (null !== $this->network) {
|
||||
$res['network'] = $this->network;
|
||||
}
|
||||
if (null !== $this->suffix) {
|
||||
$res['suffix'] = $this->suffix;
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
/**
|
||||
* @param array $map
|
||||
* @return configuration
|
||||
*/
|
||||
public static function fromMap($map = []) {
|
||||
$model = new self();
|
||||
if(isset($map['regionId'])){
|
||||
$model->regionId = $map['regionId'];
|
||||
}
|
||||
if(isset($map['endpoint'])){
|
||||
$model->endpoint = $map['endpoint'];
|
||||
}
|
||||
if(isset($map['endpointRule'])){
|
||||
$model->endpointRule = $map['endpointRule'];
|
||||
}
|
||||
if(isset($map['endpointMap'])){
|
||||
$model->endpointMap = $map['endpointMap'];
|
||||
}
|
||||
if(isset($map['endpointType'])){
|
||||
$model->endpointType = $map['endpointType'];
|
||||
}
|
||||
if(isset($map['network'])){
|
||||
$model->network = $map['network'];
|
||||
}
|
||||
if(isset($map['suffix'])){
|
||||
$model->suffix = $map['suffix'];
|
||||
}
|
||||
return $model;
|
||||
}
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $regionId;
|
||||
|
||||
public $endpoint;
|
||||
|
||||
public $endpointRule;
|
||||
|
||||
public $endpointMap;
|
||||
|
||||
public $endpointType;
|
||||
|
||||
public $network;
|
||||
|
||||
public $suffix;
|
||||
|
||||
}
|
||||
220
vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/request.php
vendored
Normal file
220
vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/request.php
vendored
Normal file
@@ -0,0 +1,220 @@
|
||||
<?php
|
||||
|
||||
// This file is auto-generated, don't edit it. Thanks.
|
||||
namespace Darabonba\GatewaySpi\Models\InterceptorContext;
|
||||
|
||||
use AlibabaCloud\Tea\Model;
|
||||
use AlibabaCloud\Credentials\Credential;
|
||||
|
||||
class request extends Model {
|
||||
public function validate() {
|
||||
Model::validateRequired('pathname', $this->pathname, true);
|
||||
Model::validateRequired('productId', $this->productId, true);
|
||||
Model::validateRequired('action', $this->action, true);
|
||||
Model::validateRequired('version', $this->version, true);
|
||||
Model::validateRequired('protocol', $this->protocol, true);
|
||||
Model::validateRequired('method', $this->method, true);
|
||||
Model::validateRequired('authType', $this->authType, true);
|
||||
Model::validateRequired('bodyType', $this->bodyType, true);
|
||||
Model::validateRequired('reqBodyType', $this->reqBodyType, true);
|
||||
Model::validateRequired('credential', $this->credential, true);
|
||||
Model::validateRequired('userAgent', $this->userAgent, true);
|
||||
}
|
||||
public function toMap() {
|
||||
$res = [];
|
||||
if (null !== $this->headers) {
|
||||
$res['headers'] = $this->headers;
|
||||
}
|
||||
if (null !== $this->query) {
|
||||
$res['query'] = $this->query;
|
||||
}
|
||||
if (null !== $this->body) {
|
||||
$res['body'] = $this->body;
|
||||
}
|
||||
if (null !== $this->stream) {
|
||||
$res['stream'] = $this->stream;
|
||||
}
|
||||
if (null !== $this->hostMap) {
|
||||
$res['hostMap'] = $this->hostMap;
|
||||
}
|
||||
if (null !== $this->pathname) {
|
||||
$res['pathname'] = $this->pathname;
|
||||
}
|
||||
if (null !== $this->productId) {
|
||||
$res['productId'] = $this->productId;
|
||||
}
|
||||
if (null !== $this->action) {
|
||||
$res['action'] = $this->action;
|
||||
}
|
||||
if (null !== $this->version) {
|
||||
$res['version'] = $this->version;
|
||||
}
|
||||
if (null !== $this->protocol) {
|
||||
$res['protocol'] = $this->protocol;
|
||||
}
|
||||
if (null !== $this->method) {
|
||||
$res['method'] = $this->method;
|
||||
}
|
||||
if (null !== $this->authType) {
|
||||
$res['authType'] = $this->authType;
|
||||
}
|
||||
if (null !== $this->bodyType) {
|
||||
$res['bodyType'] = $this->bodyType;
|
||||
}
|
||||
if (null !== $this->reqBodyType) {
|
||||
$res['reqBodyType'] = $this->reqBodyType;
|
||||
}
|
||||
if (null !== $this->style) {
|
||||
$res['style'] = $this->style;
|
||||
}
|
||||
if (null !== $this->credential) {
|
||||
$res['credential'] = null !== $this->credential ? $this->credential->toMap() : null;
|
||||
}
|
||||
if (null !== $this->signatureVersion) {
|
||||
$res['signatureVersion'] = $this->signatureVersion;
|
||||
}
|
||||
if (null !== $this->signatureAlgorithm) {
|
||||
$res['signatureAlgorithm'] = $this->signatureAlgorithm;
|
||||
}
|
||||
if (null !== $this->userAgent) {
|
||||
$res['userAgent'] = $this->userAgent;
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
/**
|
||||
* @param array $map
|
||||
* @return request
|
||||
*/
|
||||
public static function fromMap($map = []) {
|
||||
$model = new self();
|
||||
if(isset($map['headers'])){
|
||||
$model->headers = $map['headers'];
|
||||
}
|
||||
if(isset($map['query'])){
|
||||
$model->query = $map['query'];
|
||||
}
|
||||
if(isset($map['body'])){
|
||||
$model->body = $map['body'];
|
||||
}
|
||||
if(isset($map['stream'])){
|
||||
$model->stream = $map['stream'];
|
||||
}
|
||||
if(isset($map['hostMap'])){
|
||||
$model->hostMap = $map['hostMap'];
|
||||
}
|
||||
if(isset($map['pathname'])){
|
||||
$model->pathname = $map['pathname'];
|
||||
}
|
||||
if(isset($map['productId'])){
|
||||
$model->productId = $map['productId'];
|
||||
}
|
||||
if(isset($map['action'])){
|
||||
$model->action = $map['action'];
|
||||
}
|
||||
if(isset($map['version'])){
|
||||
$model->version = $map['version'];
|
||||
}
|
||||
if(isset($map['protocol'])){
|
||||
$model->protocol = $map['protocol'];
|
||||
}
|
||||
if(isset($map['method'])){
|
||||
$model->method = $map['method'];
|
||||
}
|
||||
if(isset($map['authType'])){
|
||||
$model->authType = $map['authType'];
|
||||
}
|
||||
if(isset($map['bodyType'])){
|
||||
$model->bodyType = $map['bodyType'];
|
||||
}
|
||||
if(isset($map['reqBodyType'])){
|
||||
$model->reqBodyType = $map['reqBodyType'];
|
||||
}
|
||||
if(isset($map['style'])){
|
||||
$model->style = $map['style'];
|
||||
}
|
||||
if(isset($map['credential'])){
|
||||
$model->credential = Credential::fromMap($map['credential']);
|
||||
}
|
||||
if(isset($map['signatureVersion'])){
|
||||
$model->signatureVersion = $map['signatureVersion'];
|
||||
}
|
||||
if(isset($map['signatureAlgorithm'])){
|
||||
$model->signatureAlgorithm = $map['signatureAlgorithm'];
|
||||
}
|
||||
if(isset($map['userAgent'])){
|
||||
$model->userAgent = $map['userAgent'];
|
||||
}
|
||||
return $model;
|
||||
}
|
||||
public $headers;
|
||||
|
||||
public $query;
|
||||
|
||||
public $body;
|
||||
|
||||
public $stream;
|
||||
|
||||
public $hostMap;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $pathname;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $productId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $action;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $version;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $protocol;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $method;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $authType;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $bodyType;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $reqBodyType;
|
||||
|
||||
public $style;
|
||||
|
||||
/**
|
||||
* @var Credential
|
||||
*/
|
||||
public $credential;
|
||||
|
||||
public $signatureVersion;
|
||||
|
||||
public $signatureAlgorithm;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $userAgent;
|
||||
|
||||
}
|
||||
54
vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/response.php
vendored
Normal file
54
vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/response.php
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
// This file is auto-generated, don't edit it. Thanks.
|
||||
namespace Darabonba\GatewaySpi\Models\InterceptorContext;
|
||||
|
||||
use AlibabaCloud\Tea\Model;
|
||||
|
||||
class response extends Model {
|
||||
public function validate() {}
|
||||
public function toMap() {
|
||||
$res = [];
|
||||
if (null !== $this->statusCode) {
|
||||
$res['statusCode'] = $this->statusCode;
|
||||
}
|
||||
if (null !== $this->headers) {
|
||||
$res['headers'] = $this->headers;
|
||||
}
|
||||
if (null !== $this->body) {
|
||||
$res['body'] = $this->body;
|
||||
}
|
||||
if (null !== $this->deserializedBody) {
|
||||
$res['deserializedBody'] = $this->deserializedBody;
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
/**
|
||||
* @param array $map
|
||||
* @return response
|
||||
*/
|
||||
public static function fromMap($map = []) {
|
||||
$model = new self();
|
||||
if(isset($map['statusCode'])){
|
||||
$model->statusCode = $map['statusCode'];
|
||||
}
|
||||
if(isset($map['headers'])){
|
||||
$model->headers = $map['headers'];
|
||||
}
|
||||
if(isset($map['body'])){
|
||||
$model->body = $map['body'];
|
||||
}
|
||||
if(isset($map['deserializedBody'])){
|
||||
$model->deserializedBody = $map['deserializedBody'];
|
||||
}
|
||||
return $model;
|
||||
}
|
||||
public $statusCode;
|
||||
|
||||
public $headers;
|
||||
|
||||
public $body;
|
||||
|
||||
public $deserializedBody;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user