rocketchat

package
v1.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

type Content struct {
	Username string `json:"username"`
	IconURL  string `json:"icon_url"`
	Text     string `json:"text"`
}

Content is sent as json to the Rocket.Chat webhook endpoint.

type Provider

type Provider struct {
	WebhookURL string `yaml:"webhookURL"`
	IconURL    string `yaml:"iconURL"`
	IsEnabled  bool   `yaml:"enabled"`
}

Provider is an implementation of the `go-aws-news/providers` Provider interface.

func (*Provider) Enabled

func (p *Provider) Enabled() bool

Enabled returns true if the provider is enabled in the config.

func (*Provider) GetName

func (*Provider) GetName() string

GetName returns the Provider's name.

func (*Provider) Notify

func (p *Provider) Notify(news news.Announcements)

Notify is the function executed to POST to a provider's webhook url.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL