diff --git a/cmd/discord.go b/cmd/discord.go index b7951aa..e7286b0 100644 --- a/cmd/discord.go +++ b/cmd/discord.go @@ -18,6 +18,10 @@ type discordPingMe struct { 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 { var discordOpts discordPingMe return &cli.Command{ diff --git a/cmd/email.go b/cmd/email.go index 3361463..e586833 100644 --- a/cmd/email.go +++ b/cmd/email.go @@ -22,6 +22,11 @@ type email struct { 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 { var emailOpts email return &cli.Command{ diff --git a/cmd/msteams.go b/cmd/msteams.go index eaec84c..cdc49b3 100644 --- a/cmd/msteams.go +++ b/cmd/msteams.go @@ -17,6 +17,10 @@ type msTeams struct { 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 { var msTeamOpt msTeams return &cli.Command{ diff --git a/cmd/rocketchat.go b/cmd/rocketchat.go index 16edb79..98db4ca 100644 --- a/cmd/rocketchat.go +++ b/cmd/rocketchat.go @@ -26,6 +26,10 @@ var ( 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 { var rocketChatOpts rocketChat return &cli.Command{ diff --git a/cmd/slack.go b/cmd/slack.go index 15461e3..1f69376 100644 --- a/cmd/slack.go +++ b/cmd/slack.go @@ -18,6 +18,10 @@ type slackPingMe struct { 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 { var slackOpts slackPingMe return &cli.Command{ diff --git a/cmd/telegram.go b/cmd/telegram.go index 7502361..bec2192 100644 --- a/cmd/telegram.go +++ b/cmd/telegram.go @@ -19,6 +19,10 @@ type teleGram struct { 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 { var telegramOpts teleGram return &cli.Command{