Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoogleChat ¶
type GoogleChat struct {
WebhookURL string
}
func NewGoogleChat ¶
func NewGoogleChat() *GoogleChat
NewGoogleChat returns a new instance of the GoogleChat struct.
No parameters. Returns a pointer to a GoogleChat object.
func (*GoogleChat) SendGridCard ¶
func (gc *GoogleChat) SendGridCard(title string, gridMsgs [][]string) bool
SendGridCard sends a Google Apps Card message to a Google Chat webhook.
The function takes a title string and a gridMsgs [][]string as parameters. The title is used as the title of the card, and gridMsgs is a 2D slice containing the messages to be displayed in the card's grid format.
The function returns a boolean value indicating whether the message was successfully sent or not.
func (*GoogleChat) SendMessage ¶
func (gc *GoogleChat) SendMessage(message string) bool
SendMessage sends a message to the Google Chat API webhook.
It takes a string parameter `message` which is the content of the message to be sent. The function returns a boolean value indicating whether the message was sent successfully or not.
func (*GoogleChat) SetWebhookURL ¶
func (gc *GoogleChat) SetWebhookURL(url string)
SetWebhookURL sets the webhook URL for the GoogleChat instance.
Parameters: - url: The URL to set as the webhook URL.