APPLICATIONS
APPLICATIONS
Class CloudmunchService This class provides the service methods for the plugins to make various API calls to cloudmunch.
__construct(\CloudMunch\CloudMunch\AppContext $appContext, \CloudMunch\CloudMunch\loghandling\LogHandler $logHandler)
Constructor to initialise Application Context and LogHandler.
| \CloudMunch\CloudMunch\AppContext | $appContext | |
| \CloudMunch\CloudMunch\loghandling\LogHandler | $logHandler |
sendNotification(string $message, string $channel, string $to, string $subject = "", string $attachment = "")
This method is to send notification on a selected channel.
| string | $message | : Notification message. |
| string | $channel | : Channel to send notification to |
| string | $to | : To addresses to be notified |
| string | $subject |
|
| string | $attachment |
|
updateCustomContextData(array $contextArray, array $data = null, string $method = "PATCH", array $extraParams = null) :
This method is used to update data for a particular context.
| array | $contextArray | associative array with key as context and value as its id. |
| array | $data | Data to be updated. |
| string | $method | method for updation, example POST,PATCH. |
| array | $extraParams | Extra parameters |
getCloudmunchData(string $context, string $contextid, array $filterdata) : array
Method for API calls to CloudMunch service to retreive context data.
| string | $context | Context for which data has to be retrieved. |
| string | $contextid | ID of the context. |
| array | $filterdata | Filter data |
data
updateCloudmunchData(string $context, string $contextid, array $data) : array
Method for API calls to CloudMunch service to update context data.
| string | $context | Context for which data has to be updated. |
| string | $contextid | ID of the context. |
| array | $data | Data to be updated |
data
downloadGCRKeys(string $filekey, string $context, string $contextid) : string
This method downloads Google container registry key.
| string | $filekey | name of the key field |
| string | $context | context of the key |
| string | $contextid | id of the context |
location of the downloaded file
downloadKeys(string $filekey, string $context, string $contextid) : string
This method downloads key files from cloudmunch.
| string | $filekey | name of the key field |
| string | $context | context of the key |
| string | $contextid | id of the context |
location of the downloaded file