sunkan / serverless-config-builder
Library to help with programmatically generate serverless.yml
Installs: 3 075
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.0
- ext-yaml: *
Requires (Dev)
- phpstan/phpstan: ^0.12.82
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-10-25 19:54:26 UTC
README
Installation
$ composer require sunkan/serverless-config-builder
Usage
use Sunkan\ServerlessConfigBuilder\Builder; use Sunkan\ServerlessConfigBuilder\Entities\HttpFunction; use Sunkan\ServerlessConfigBuilder\Entities\SqsFunction; $builder = Builder::fromTemplate(__DIR__ . '/resources/serverless.template.yml'); $builder->addFunction(HttpFunction::fromObject(TestAction::class)); $sqsFunction = new SqsFunction( 'sqs-handler', TestAction::class, 'arn:to:queue', ); $builder->addFunction($sqsFunction); $builder->save('serverless.yml');