1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
package interfaces
import (
"golang.org/x/net/proxy"
"github.com/twstrike/coyim/tls"
"github.com/twstrike/coyim/xmpp/data"
)
// Dialer connects and authenticates to an XMPP server
type Dialer interface {
Config() data.Config
Dial() (Conn, error)
GetServer() string
RegisterAccount(data.FormCallback) (Conn, error)
ServerAddress() string
SetConfig(data.Config)
SetJID(string)
SetPassword(string)
SetProxy(proxy.Dialer)
SetServerAddress(v string)
}
// DialerFactory represents a function that can create a Dialer
type DialerFactory func(tls.Verifier) Dialer
|