mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-08-19 21:03:44 -07:00
v2: Updates
* Simplifies & beautifies everything * Introduces a new Class system. * Errors are defaulted to AWS's handler. * New function names & more efficient handling. * Should fix a majority of the errors. Please read the README for more!
This commit is contained in:
parent
ad0726e41e
commit
e6d7753dc8
1095 changed files with 45088 additions and 2911 deletions
|
@ -2,10 +2,14 @@
|
|||
namespace Aws\Lambda;
|
||||
|
||||
use Aws\AwsClient;
|
||||
use Aws\CommandInterface;
|
||||
use Aws\Middleware;
|
||||
|
||||
/**
|
||||
* This client is used to interact with AWS Lambda
|
||||
*
|
||||
* @method \Aws\Result addLayerVersionPermission(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise addLayerVersionPermissionAsync(array $args = [])
|
||||
* @method \Aws\Result addPermission(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise addPermissionAsync(array $args = [])
|
||||
* @method \Aws\Result createAlias(array $args = [])
|
||||
|
@ -22,6 +26,12 @@ use Aws\AwsClient;
|
|||
* @method \GuzzleHttp\Promise\Promise deleteFunctionAsync(array $args = [])
|
||||
* @method \Aws\Result deleteFunctionConcurrency(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteFunctionConcurrencyAsync(array $args = [])
|
||||
* @method \Aws\Result deleteFunctionEventInvokeConfig(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteFunctionEventInvokeConfigAsync(array $args = [])
|
||||
* @method \Aws\Result deleteLayerVersion(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteLayerVersionAsync(array $args = [])
|
||||
* @method \Aws\Result deleteProvisionedConcurrencyConfig(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteProvisionedConcurrencyConfigAsync(array $args = [])
|
||||
* @method \Aws\Result getAccountSettings(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAccountSettingsAsync(array $args = [])
|
||||
* @method \Aws\Result getAlias(array $args = [])
|
||||
|
@ -30,10 +40,22 @@ use Aws\AwsClient;
|
|||
* @method \GuzzleHttp\Promise\Promise getEventSourceMappingAsync(array $args = [])
|
||||
* @method \Aws\Result getFunction(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getFunctionAsync(array $args = [])
|
||||
* @method \Aws\Result getFunctionConcurrency(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getFunctionConcurrencyAsync(array $args = [])
|
||||
* @method \Aws\Result getFunctionConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getFunctionConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result getFunctionEventInvokeConfig(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getFunctionEventInvokeConfigAsync(array $args = [])
|
||||
* @method \Aws\Result getLayerVersion(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getLayerVersionAsync(array $args = [])
|
||||
* @method \Aws\Result getLayerVersionByArn(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getLayerVersionByArnAsync(array $args = [])
|
||||
* @method \Aws\Result getLayerVersionPolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getLayerVersionPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result getPolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result getProvisionedConcurrencyConfig(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getProvisionedConcurrencyConfigAsync(array $args = [])
|
||||
* @method \Aws\Result invoke(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise invokeAsync(array $args = [])
|
||||
* @method \Aws\Result invokeAsync(array $args = [])
|
||||
|
@ -42,16 +64,32 @@ use Aws\AwsClient;
|
|||
* @method \GuzzleHttp\Promise\Promise listAliasesAsync(array $args = [])
|
||||
* @method \Aws\Result listEventSourceMappings(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listEventSourceMappingsAsync(array $args = [])
|
||||
* @method \Aws\Result listFunctionEventInvokeConfigs(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listFunctionEventInvokeConfigsAsync(array $args = [])
|
||||
* @method \Aws\Result listFunctions(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listFunctionsAsync(array $args = [])
|
||||
* @method \Aws\Result listLayerVersions(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listLayerVersionsAsync(array $args = [])
|
||||
* @method \Aws\Result listLayers(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listLayersAsync(array $args = [])
|
||||
* @method \Aws\Result listProvisionedConcurrencyConfigs(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listProvisionedConcurrencyConfigsAsync(array $args = [])
|
||||
* @method \Aws\Result listTags(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsAsync(array $args = [])
|
||||
* @method \Aws\Result listVersionsByFunction(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listVersionsByFunctionAsync(array $args = [])
|
||||
* @method \Aws\Result publishLayerVersion(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise publishLayerVersionAsync(array $args = [])
|
||||
* @method \Aws\Result publishVersion(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise publishVersionAsync(array $args = [])
|
||||
* @method \Aws\Result putFunctionConcurrency(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putFunctionConcurrencyAsync(array $args = [])
|
||||
* @method \Aws\Result putFunctionEventInvokeConfig(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putFunctionEventInvokeConfigAsync(array $args = [])
|
||||
* @method \Aws\Result putProvisionedConcurrencyConfig(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putProvisionedConcurrencyConfigAsync(array $args = [])
|
||||
* @method \Aws\Result removeLayerVersionPermission(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise removeLayerVersionPermissionAsync(array $args = [])
|
||||
* @method \Aws\Result removePermission(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise removePermissionAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
|
@ -66,5 +104,40 @@ use Aws\AwsClient;
|
|||
* @method \GuzzleHttp\Promise\Promise updateFunctionCodeAsync(array $args = [])
|
||||
* @method \Aws\Result updateFunctionConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateFunctionConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result updateFunctionEventInvokeConfig(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateFunctionEventInvokeConfigAsync(array $args = [])
|
||||
*/
|
||||
class LambdaClient extends AwsClient {}
|
||||
class LambdaClient extends AwsClient
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __construct(array $args)
|
||||
{
|
||||
parent::__construct($args);
|
||||
$list = $this->getHandlerList();
|
||||
if (extension_loaded('curl')) {
|
||||
$list->appendInit($this->getDefaultCurlOptionsMiddleware());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a middleware that sets default Curl options for the command
|
||||
*
|
||||
* @return callable
|
||||
*/
|
||||
public function getDefaultCurlOptionsMiddleware()
|
||||
{
|
||||
return Middleware::mapCommand(function (CommandInterface $cmd) {
|
||||
$defaultCurlOptions = [
|
||||
CURLOPT_TCP_KEEPALIVE => 1,
|
||||
];
|
||||
if (!isset($cmd['@http']['curl'])) {
|
||||
$cmd['@http']['curl'] = $defaultCurlOptions;
|
||||
} else {
|
||||
$cmd['@http']['curl'] += $defaultCurlOptions;
|
||||
}
|
||||
return $cmd;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue