yammer

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Payload

type Payload struct {
	Body        string `json:"body"`
	MessageType string `json:"message_type"`
	Title       string `json:"title"`
	GroupID     int    `json:"group_id"`
	IsRichText  bool   `json:"is_rich_text"`
}

Payload is the respresentation of the json body being sent to Yammer via POST

func (Payload) UnescapedJSON

func (p Payload) UnescapedJSON() ([]byte, error)

UnescapedJSON creates its own encoder to ensure html characters are not converted to unicode

type Provider

type Provider struct {
	APIURL      string `yaml:"APIURL"`
	Token       string `yaml:"token"`
	MessageType string `yaml:"messageType"`
	Title       string `yaml:"title"`
	GroupID     int    `yaml:"groupID"`
	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