Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDuplicateGateway = errors.New("goop: Duplicate gateway") ErrDuplicateCommand = errors.New("goop: Duplicate command") )
Errors
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface { CanExecute(t *gateway.Trigger) bool Execute(t *gateway.Trigger, gw gateway.Gateway, g *Goop) error }
Command interface
type Config ¶
type Config interface { GetRelay(to, from string) *RelayConfig Map() map[string]interface{} FlatMap() map[string]interface{} Get(key string) (interface{}, error) Set(key string, val interface{}) error Unset(key string) (err error) GetString(key string) (string, error) SetString(key string, val string) error }
Config interface
type Goop ¶
type Goop struct { network.EventEmitter // Read-only Commands map[string]Command Gateways map[string]gateway.Gateway Relay map[string]map[string]*Relay Config Config }
Goop main
func (*Goop) AddCommand ¶
AddCommand to goop
func (*Goop) AddGateway ¶
AddGateway to goop
type NewCommand ¶ added in v0.10.0
NewCommand event
type Relay ¶
type Relay struct { From gateway.Gateway To gateway.Gateway *RelayConfig }
Relay manages a relay between two gateways
func NewRelay ¶
func NewRelay(from, to gateway.Gateway, conf *RelayConfig) *Relay
NewRelay initializes a new GatRelayeway struct
func (*Relay) InitDefaultHandlers ¶
func (r *Relay) InitDefaultHandlers()
InitDefaultHandlers adds the default callbacks for relevant events
type RelayConfig ¶
type RelayConfig struct { Log bool System bool Channel bool Joins bool Chat bool PrivateChat bool Say bool JoinAccess gateway.AccessLevel ChatAccess gateway.AccessLevel PrivateChatAccess gateway.AccessLevel }
RelayConfig stores the configuration of a gateway relay
Click to show internal directories.
Click to hide internal directories.