Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg *bridge.Config) bridge.Bridger

Types

type Api

type Api struct {
	Messages ring.Ring
	sync.RWMutex
	*bridge.Config
}

func (*Api) Connect

func (b *Api) Connect() error

func (*Api) Disconnect

func (b *Api) Disconnect() error

func (*Api) JoinChannel

func (b *Api) JoinChannel(channel config.ChannelInfo) error

func (*Api) Send

func (b *Api) Send(msg config.Message) (string, error)

type ApiMessage

type ApiMessage struct {
	Text     string `json:"text"`
	Username string `json:"username"`
	UserID   string `json:"userid"`
	Avatar   string `json:"avatar"`
	Gateway  string `json:"gateway"`
}

Source Files