bridge

package
v0.0.0-...-c0abdc2 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

type Bridge struct {
	Bridger
	*sync.RWMutex

	Name           string
	Account        string
	Protocol       string
	Channels       map[string]config.ChannelInfo
	Joined         map[string]bool
	ChannelMembers *config.ChannelMembers
	Log            *logrus.Entry
	Config         config.Config
	General        *config.Protocol
}

func New

func New(bridge *config.Bridge) *Bridge

func (*Bridge) GetBool

func (b *Bridge) GetBool(key string) bool

func (*Bridge) GetConfigKey

func (b *Bridge) GetConfigKey(key string) string

func (*Bridge) GetInt

func (b *Bridge) GetInt(key string) int

func (*Bridge) GetString

func (b *Bridge) GetString(key string) string

func (*Bridge) GetStringSlice

func (b *Bridge) GetStringSlice(key string) []string

func (*Bridge) GetStringSlice2D

func (b *Bridge) GetStringSlice2D(key string) [][]string

func (*Bridge) IsKeySet

func (b *Bridge) IsKeySet(key string) bool

func (*Bridge) JoinChannels

func (b *Bridge) JoinChannels() error

func (*Bridge) SetChannelMembers

func (b *Bridge) SetChannelMembers(newMembers *config.ChannelMembers)

SetChannelMembers sets the newMembers to the bridge ChannelMembers

type Bridger

type Bridger interface {
	Send(msg config.Message) (string, error)
	Connect() error
	JoinChannel(channel config.ChannelInfo) error
	Disconnect() error
}

type Config

type Config struct {
	*Bridge

	Remote chan config.Message
}

type Factory

type Factory func(*Config) Bridger

Factory is the factory function to create a bridge

Directories

Path Synopsis
transmitter
Package transmitter provides functionality for transmitting arbitrary webhook messages to Discord.
Package transmitter provides functionality for transmitting arbitrary webhook messages to Discord.
nolint:goconst
nolint:goconst

Jump to

Keyboard shortcuts

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