platforms

package
v0.0.0-...-9acea3b Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Platforms = map[string]factory{
	"riot":       NewRiot,
	"rocketchat": NewRocketChat,
	"slack":      NewSlack,
}

Functions

This section is empty.

Types

type Config

type Config map[string]string

type Platform

type Platform interface {
	Send(room, msg string) error
}

func NewPlatform

func NewPlatform(conf string) (Platform, error)

func NewRiot

func NewRiot(conf map[string]string) (Platform, error)

func NewRocketChat

func NewRocketChat(conf map[string]string) (Platform, error)

func NewSlack

func NewSlack(conf map[string]string) (Platform, error)

type Riot

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

func (Riot) Send

func (r Riot) Send(room, msg string) error

type RocketChat

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

func (RocketChat) GetChannel

func (r RocketChat) GetChannel(room string) (*api.Channel, error)

func (RocketChat) Send

func (r RocketChat) Send(room, msg string) error

type Slack

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

func (Slack) Send

func (r Slack) Send(room, msg string) error

Jump to

Keyboard shortcuts

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