repositorypackage
1.0.5
Repository: https://github.com/fako1024/rc-notify.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# README
A Simple tool to emit messages via RocketChat Webhook REST API
This package provides an interface to RocketChat's Webhook / notification REST API (provided an endpoint is made available) and a command line tool for simple message sending / delivery.
Installation
go get -u github.com/fako1024/rc-notify
Examples
Send a simple message
req := rc.Request{
Channel: "@me",
User: "Sending User",
Message: "My message",
Emoji: rc.EmojiAlert,
}
// Execute the request (set webhook URI accordingly)
uri := "https://your.rc.instance.com/hooks/.../..."
if err := rc.Send(uri, req); err != nil {
log.Fatalf("Failed to send message: %s", err)
}