-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
362 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ToshY\BunnyNet\Model\API\EdgeScripting\Secret; | ||
|
||
use ToshY\BunnyNet\Enum\Header; | ||
use ToshY\BunnyNet\Enum\Method; | ||
use ToshY\BunnyNet\Enum\Type; | ||
use ToshY\BunnyNet\Model\AbstractParameter; | ||
use ToshY\BunnyNet\Model\EndpointBodyInterface; | ||
use ToshY\BunnyNet\Model\EndpointInterface; | ||
|
||
class AddSecret implements EndpointInterface, EndpointBodyInterface | ||
{ | ||
public function getMethod(): Method | ||
{ | ||
return Method::POST; | ||
} | ||
|
||
public function getPath(): string | ||
{ | ||
return 'compute/script/%d/secrets'; | ||
} | ||
|
||
public function getHeaders(): array | ||
{ | ||
return [ | ||
Header::ACCEPT_JSON, | ||
Header::CONTENT_TYPE_JSON, | ||
]; | ||
} | ||
|
||
public function getBody(): array | ||
{ | ||
return [ | ||
new AbstractParameter(name: 'Name', type: Type::STRING_TYPE, required: true), | ||
new AbstractParameter(name: 'Secret', type: Type::STRING_TYPE), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ToshY\BunnyNet\Model\API\EdgeScripting\Secret; | ||
|
||
use ToshY\BunnyNet\Enum\Header; | ||
use ToshY\BunnyNet\Enum\Method; | ||
use ToshY\BunnyNet\Model\EndpointInterface; | ||
|
||
class DeleteSecret implements EndpointInterface | ||
{ | ||
public function getMethod(): Method | ||
{ | ||
return Method::DELETE; | ||
} | ||
|
||
public function getPath(): string | ||
{ | ||
return 'compute/script/%d/secrets/%d'; | ||
} | ||
|
||
public function getHeaders(): array | ||
{ | ||
return [ | ||
Header::ACCEPT_JSON, | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ToshY\BunnyNet\Model\API\EdgeScripting\Secret; | ||
|
||
use ToshY\BunnyNet\Enum\Header; | ||
use ToshY\BunnyNet\Enum\Method; | ||
use ToshY\BunnyNet\Model\EndpointInterface; | ||
|
||
class ListSecrets implements EndpointInterface | ||
{ | ||
public function getMethod(): Method | ||
{ | ||
return Method::GET; | ||
} | ||
|
||
public function getPath(): string | ||
{ | ||
return 'compute/script/%d/secrets'; | ||
} | ||
|
||
public function getHeaders(): array | ||
{ | ||
return [ | ||
Header::ACCEPT_JSON, | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ToshY\BunnyNet\Model\API\EdgeScripting\Secret; | ||
|
||
use ToshY\BunnyNet\Enum\Header; | ||
use ToshY\BunnyNet\Enum\Method; | ||
use ToshY\BunnyNet\Enum\Type; | ||
use ToshY\BunnyNet\Model\AbstractParameter; | ||
use ToshY\BunnyNet\Model\EndpointBodyInterface; | ||
use ToshY\BunnyNet\Model\EndpointInterface; | ||
|
||
class UpdateSecret implements EndpointInterface, EndpointBodyInterface | ||
{ | ||
public function getMethod(): Method | ||
{ | ||
return Method::POST; | ||
} | ||
|
||
public function getPath(): string | ||
{ | ||
return 'compute/script/%d/secrets/%d'; | ||
} | ||
|
||
public function getHeaders(): array | ||
{ | ||
return [ | ||
Header::ACCEPT_JSON, | ||
Header::CONTENT_TYPE_JSON, | ||
]; | ||
} | ||
|
||
public function getBody(): array | ||
{ | ||
return [ | ||
new AbstractParameter(name: 'Secret', type: Type::STRING_TYPE), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ToshY\BunnyNet\Model\API\EdgeScripting\Secret; | ||
|
||
use ToshY\BunnyNet\Enum\Header; | ||
use ToshY\BunnyNet\Enum\Method; | ||
use ToshY\BunnyNet\Enum\Type; | ||
use ToshY\BunnyNet\Model\AbstractParameter; | ||
use ToshY\BunnyNet\Model\EndpointBodyInterface; | ||
use ToshY\BunnyNet\Model\EndpointInterface; | ||
|
||
class UpsertSecret implements EndpointInterface, EndpointBodyInterface | ||
{ | ||
public function getMethod(): Method | ||
{ | ||
return Method::PUT; | ||
} | ||
|
||
public function getPath(): string | ||
{ | ||
return 'compute/script/%d/secrets'; | ||
} | ||
|
||
public function getHeaders(): array | ||
{ | ||
return [ | ||
Header::ACCEPT_JSON, | ||
Header::CONTENT_TYPE_JSON, | ||
]; | ||
} | ||
|
||
public function getBody(): array | ||
{ | ||
return [ | ||
new AbstractParameter(name: 'Name', type: Type::STRING_TYPE, required: true), | ||
new AbstractParameter(name: 'Secret', type: Type::STRING_TYPE), | ||
]; | ||
} | ||
} |
Oops, something went wrong.