Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helpers classes for known values #93

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@ On multiple actions supported by this SDK you may need to pass some parameters,

```php
$server = $forge->createServer([
"provider"=> "ocean2",
"provider"=> ServerProviders::DIGITAL_OCEAN,
"credential_id"=> 1,
"name"=> "test-via-api",
"size"=> "01",
"database"=> "test123",
"php_version"=> "php71",
"database_type" => InstallableServices::POSTGRES,
"php_version"=> InstallableServices::PHP_71,
"region"=> "ams2"
]);
```
Expand Down
11 changes: 11 additions & 0 deletions src/Resources/GitProviders.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Laravel\Forge\Resources;

class GitProviders
{
const BITBUCKET = 'bitbucket';
const CUSTOM = 'custom';
const GITHUB = 'github';
const GITLAB = 'gitlab';
}
20 changes: 20 additions & 0 deletions src/Resources/InstallableServices.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Laravel\Forge\Resources;

class InstallableServices
{
const PHP_56 = 'php56';
const PHP_70 = 'php70';
const PHP_71 = 'php71';
const PHP_72 = 'php72';
const PHP_73 = 'php73';
const PHP_74 = 'php74';

const MYSQL = 'mysql';
const MYSQL_8 = 'mysql8';

const MARIADB = 'mariadb';

const POSTGRES = 'postgres';
}
10 changes: 10 additions & 0 deletions src/Resources/LoadBalancingStrategies.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Laravel\Forge\Resources;

class LoadBalancingStrategies
{
const ROUND_ROBIN = 'round_robin';
const LEAST_CONNECTIONS = 'least_conn';
const IP_HASH = 'ip_hash';
}
13 changes: 13 additions & 0 deletions src/Resources/ServerProviders.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Laravel\Forge\Resources;

class ServerProviders
{
const AWS = 'aws';
const CUSTOM = 'custom';
const DIGITAL_OCEAN = 'ocean2';
const HETZNER = 'hetzner';
const LINODE = 'linode';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this should be linode4.

Ping @themsaid

const VULTR = 'vultr';
}