4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-27 18:09:26 +00:00

Add REST API support

This commit is contained in:
Wim
2017-02-18 23:10:22 +01:00
parent 930b639cc9
commit 73f01ad8d8
7 changed files with 146 additions and 7 deletions

View File

@ -6,6 +6,7 @@ import (
"os"
"reflect"
"strings"
"time"
)
const (
@ -14,16 +15,19 @@ const (
)
type Message struct {
Text string
Channel string
Username string
Avatar string
Account string
Event string
Text string
Channel string
Username string
Avatar string
Account string
Event string
Protocol string
Timestamp time.Time
}
type Protocol struct {
BindAddress string // mattermost, slack
Buffer int // api
IconURL string // mattermost, slack
IgnoreNicks string // all protocols
Jid string // xmpp
@ -79,6 +83,7 @@ type SameChannelGateway struct {
}
type Config struct {
Api map[string]Protocol
IRC map[string]Protocol
Mattermost map[string]Protocol
Slack map[string]Protocol