docs: Added comments for go-doc

pull/4/head
kha7iq 4 years ago
parent 218fac39d3
commit e7d745eda9

@ -18,6 +18,10 @@ type discordPingMe struct {
Title string Title string
} }
// SendToDiscord parse values from *cli.context and return *cli.Command.
// Values include discord bot token, userID, channelIDs, Message and Title.
// If multiple channels are provided then the string is split with "," separator and
// each channelID is added to receiver.
func SendToDiscord() *cli.Command { func SendToDiscord() *cli.Command {
var discordOpts discordPingMe var discordOpts discordPingMe
return &cli.Command{ return &cli.Command{

@ -22,6 +22,11 @@ type email struct {
Identity string Identity string
} }
// SendToEmail parse values from *cli.context and return *cli.Command.
// SendAddress is used for authentication with smtp server, host and port is required
// the default value for port is set to "587" and host as "smtp.gmail.com"
// If multiple ReceiverAddress are provided then the string value is split with "," separator and
// each ReceiverAddress is added to receiver.
func SendToEmail() *cli.Command { func SendToEmail() *cli.Command {
var emailOpts email var emailOpts email
return &cli.Command{ return &cli.Command{

@ -17,6 +17,10 @@ type msTeams struct {
Title string Title string
} }
// SendToTeams parse values from *cli.context and return *cli.Command.
// Values include Ms Teams Webhook, Message and Title.
// If multiple webhooks are provided then the string is split with "," separator and
// each webhook is added to receiver.
func SendToTeams() *cli.Command { func SendToTeams() *cli.Command {
var msTeamOpt msTeams var msTeamOpt msTeams
return &cli.Command{ return &cli.Command{

@ -26,6 +26,10 @@ var (
TimeValue = "⏰ " + time.Now().String() TimeValue = "⏰ " + time.Now().String()
) )
// SendToRocketChat parse values from *cli.context and return *cli.Command.
// Values include rocketchat token, , UserId, channelIDs, ServerURL, Scheme, Message and Title.
// If multiple channels are provided then the string is split with "," separator and
// each channelID is added to receiver.
func SendToRocketChat() *cli.Command { func SendToRocketChat() *cli.Command {
var rocketChatOpts rocketChat var rocketChatOpts rocketChat
return &cli.Command{ return &cli.Command{

@ -18,6 +18,10 @@ type slackPingMe struct {
Title string Title string
} }
// SendToSlack parse values from *cli.context and return *cli.Command.
// Values include slack token, channelIDs, Message and Title.
// If multiple channels are provided then the string is split with "," separator and
// each channelID is added to receiver.
func SendToSlack() *cli.Command { func SendToSlack() *cli.Command {
var slackOpts slackPingMe var slackOpts slackPingMe
return &cli.Command{ return &cli.Command{

@ -19,6 +19,10 @@ type teleGram struct {
Title string Title string
} }
// SendToTelegram parse values from *cli.context and return *cli.Command.
// Values include telegram token, channelIDs, Message and Title.
// If multiple channels are provided they the string is split with "," separator and
// each channelID is added to receiver.
func SendToTelegram() *cli.Command { func SendToTelegram() *cli.Command {
var telegramOpts teleGram var telegramOpts teleGram
return &cli.Command{ return &cli.Command{

Loading…
Cancel
Save