Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudMessage ¶
type CloudMessage struct { // Secret and DefaultTo can be stored in config. Secret is required. // https://llamalab.com/automate/cloud/ - generate secret. Secret string DefaultTo string // contains filtered or unexported fields }
func Create ¶
func Create() (*CloudMessage, error)
func (*CloudMessage) Send ¶
func (c *CloudMessage) Send(msg string)
Sends message to the default recipient.
func (*CloudMessage) SendTo ¶
func (c *CloudMessage) SendTo(to string, msg string)
Sends message to the custom recipient.
func (*CloudMessage) SendUrgent ¶
func (c *CloudMessage) SendUrgent(msg string)
Sends message to the default recipient with priority set to urgent. Note: Formatted payload with priority is supported only if UseFormattedPayload was called.
func (*CloudMessage) SendUrgentTo ¶
func (c *CloudMessage) SendUrgentTo(to string, msg string)
Sends message to the custom recipient with priority set to urgent. Note: Formatted payload with priority is supported only if UseFormattedPayload was called.
func (*CloudMessage) UseFormattedPayload ¶
func (c *CloudMessage) UseFormattedPayload(appName string)
When appName is set, the formatted payload will be used: $from [$hostname]|$priority|$message
Click to show internal directories.
Click to hide internal directories.