api

package
Version: v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2021 License: Apache-2.0 Imports: 10 Imported by: 2

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 added in v1.12.0

type API struct {
	Messages ring.Ring
	sync.RWMutex
	*bridge.Config
	// contains filtered or unexported fields
}

func (*API) Connect added in v1.12.0

func (b *API) Connect() error

func (*API) Disconnect added in v1.12.0

func (b *API) Disconnect() error

func (*API) JoinChannel added in v1.12.0

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

func (*API) Send added in v1.12.0

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

type Message added in v1.12.0

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

Source Files

Jump to

Keyboard shortcuts

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