connector

package
v0.0.0-...-add09fe Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discord

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

func NewDiscordConnector

func NewDiscordConnector(channelName string, botToken string, botGuildID string) *Discord

Create a new instance of the Discord connector

func (*Discord) Send

func (d *Discord) Send(msg string) error

Send a message to Discord

func (*Discord) Start

func (d *Discord) Start() error

Start the Discord connector

func (*Discord) Stop

func (d *Discord) Stop() error

Stop the Discord connector

type Slack

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

func NewSlackConnector

func NewSlackConnector(channelID string, token string) *Slack

Create a new instance of the Slack connector

func (*Slack) Send

func (s *Slack) Send(msg string) error

Send a message to Slack

type Telegram

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

func NewTelegramConnector

func NewTelegramConnector(botToken string, chatID string) *Telegram

Create a new instance of the Telegram connector

func (*Telegram) Send

func (t *Telegram) Send(msg string) error

Send a message to Telegram

type Tweet

type Tweet struct {
	Id    int64
	IdStr string `json:"id_str"`
	User  User
	Text  string
}

Represents a Tweet on Twitter

type Twitter

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

func NewTwitterConnector

func NewTwitterConnector(
	consumerKey string, consumerSecret string,
	accessTokenKey string, accessTokenSecret string) *Twitter

Create a new instance of the Twitter connector

func (*Twitter) Send

func (t *Twitter) Send(msg string) error

Send a message to Twitter

type User

type User struct {
	Id     int64
	IdStr  string `json:"id_str"`
	Name   string
	Handle string `json:"screen_name"`
}

Represents a User on Twitter

Jump to

Keyboard shortcuts

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