bark

package
v0.0.0-...-90bc1be Latest Latest
Warning

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

Go to latest
Published: May 31, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SenderColors = map[string]string{
	"cnn":                      "#B60002",
	"foxnews.com":              "#234E6C",
	"foxbusiness.com":          "#343434",
	"nbcnews.com":              "#343434",
	"nbc":                      "#343434",
	"nytimes.com":              "#1A1A1A",
	"the new york times":       "#1A1A1A",
	"the washington post":      "#222",
	"wsj.com":                  "#444242",
	"the wall street journal.": "#444242",
	"the wall street journal":  "#444242",
	"politico":                 "#256396",
	"los angeles times":        "#000",
	"cbs":                      "#313943",
	"abc":                      "#1b6295",
	"usatoday.com":             "#1877B6",
	"usatoday":                 "#1877B6",
	"usa today":                "#1877B6",
	"yahoo":                    "#7B0099",
	"ft":                       "#FFF1E0",
	"bbc":                      "#c00000",
	"npr":                      "#5f82be",
	"time":                     "#e90606",
	"bloomberg.com":            "#110c09",
}

Functions

func NewService

func NewService() (kit.Service, error)

Types

type AlertBarker

type AlertBarker interface {
	Bark(alert newshound.NewsAlertLite) error
}

type AlertBarkerFunc

type AlertBarkerFunc func(alert newshound.NewsAlertLite) error

func (AlertBarkerFunc) Bark

type EventBarker

type EventBarker interface {
	Bark(alert newshound.NewsEvent) error
}

type EventBarkerFunc

type EventBarkerFunc func(event newshound.NewsEvent) error

func (EventBarkerFunc) Bark

func (e EventBarkerFunc) Bark(event newshound.NewsEvent) error

type SlackAlertBarker

type SlackAlertBarker struct {
	// contains filtered or unexported fields
}

func NewSlackAlertBarker

func NewSlackAlertBarker(cfg SlackConfig) *SlackAlertBarker

func (*SlackAlertBarker) Bark

type SlackConfig

type SlackConfig struct {
	Key     string `envconfig:"SLACK_KEY"`
	BotName string `envconfig:"SLACK_BOT_NAME"`
}

type SlackEventBarker

type SlackEventBarker struct {
	// contains filtered or unexported fields
}

func NewSlackEventBarker

func NewSlackEventBarker(cfg SlackConfig) *SlackEventBarker

func (*SlackEventBarker) Bark

func (s *SlackEventBarker) Bark(event newshound.NewsEvent) error

type TwitterAlertBarker

type TwitterAlertBarker struct {
	// contains filtered or unexported fields
}

func NewTwitterAlertBarker

func NewTwitterAlertBarker(consumerKey, consumerSecret, token, secret string) *TwitterAlertBarker

func (*TwitterAlertBarker) Bark

type TwitterEventBarker

type TwitterEventBarker struct {
	// contains filtered or unexported fields
}

func NewTwitterEventBarker

func NewTwitterEventBarker(token, secret string) *TwitterEventBarker

func (*TwitterEventBarker) Bark

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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