Documentation ¶
Index ¶
- type C2S
- type InOutStream
- type InStream
- type MockC2S
- func (m *MockC2S) Context() map[string]interface{}
- func (m *MockC2S) Disconnect(err error)
- func (m *MockC2S) Domain() string
- func (m *MockC2S) GetBool(key string) bool
- func (m *MockC2S) GetFloat(key string) float64
- func (m *MockC2S) GetInt(key string) int
- func (m *MockC2S) GetString(key string) string
- func (m *MockC2S) ID() string
- func (m *MockC2S) IsAuthenticated() bool
- func (m *MockC2S) IsDisconnected() bool
- func (m *MockC2S) IsSecured() bool
- func (m *MockC2S) JID() *jid.JID
- func (m *MockC2S) Presence() *xmpp.Presence
- func (m *MockC2S) ReceiveElement() xmpp.XElement
- func (m *MockC2S) Resource() string
- func (m *MockC2S) SendElement(elem xmpp.XElement)
- func (m *MockC2S) SetAuthenticated(authenticated bool)
- func (m *MockC2S) SetBool(key string, value bool)
- func (m *MockC2S) SetFloat(key string, value float64)
- func (m *MockC2S) SetInt(key string, value int)
- func (m *MockC2S) SetJID(jid *jid.JID)
- func (m *MockC2S) SetPresence(presence *xmpp.Presence)
- func (m *MockC2S) SetSecured(secured bool)
- func (m *MockC2S) SetString(key string, value string)
- func (m *MockC2S) Username() string
- func (m *MockC2S) WaitDisconnection() error
- type S2SIn
- type S2SOut
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type C2S ¶ added in v0.3.0
type C2S interface { InOutStream Context() map[string]interface{} SetString(key string, value string) GetString(key string) string SetInt(key string, value int) GetInt(key string) int SetFloat(key string, value float64) GetFloat(key string) float64 SetBool(key string, value bool) GetBool(key string) bool Username() string Domain() string Resource() string JID() *jid.JID IsSecured() bool IsAuthenticated() bool Presence() *xmpp.Presence }
C2S represents a client-to-server XMPP stream.
type InOutStream ¶ added in v0.3.0
InOutStream represents a generic incoming/outgoing stream.
type MockC2S ¶ added in v0.3.0
type MockC2S struct {
// contains filtered or unexported fields
}
MockC2S represents a mocked c2s stream.
func NewMockC2S ¶ added in v0.3.0
NewMockC2S returns a new mocked stream instance.
func (*MockC2S) Disconnect ¶ added in v0.3.0
Disconnect disconnects mocked stream.
func (*MockC2S) GetBool ¶ added in v0.4.0
GetBool returns the context value associated with the key as a boolean.
func (*MockC2S) GetFloat ¶ added in v0.4.0
GetFloat returns the context value associated with the key as a float64.
func (*MockC2S) GetInt ¶ added in v0.4.0
GetInt returns the context value associated with the key as an integer.
func (*MockC2S) GetString ¶ added in v0.4.0
GetString returns the context value associated with the key as a string.
func (*MockC2S) IsAuthenticated ¶ added in v0.3.0
IsAuthenticated returns whether or not the mocked stream has successfully authenticated.
func (*MockC2S) IsDisconnected ¶ added in v0.3.0
IsDisconnected returns whether or not the mocked stream has been disconnected.
func (*MockC2S) IsSecured ¶ added in v0.3.0
IsSecured returns whether or not the mocked stream has been secured.
func (*MockC2S) ReceiveElement ¶ added in v0.4.0
ReceiveElement waits until a new XML element is sent to the mocked stream and returns it.
func (*MockC2S) SendElement ¶ added in v0.3.0
SendElement sends the given XML element.
func (*MockC2S) SetAuthenticated ¶ added in v0.3.0
SetAuthenticated sets whether or not the a mocked stream has been authenticated.
func (*MockC2S) SetPresence ¶ added in v0.3.0
SetPresence sets the mocked stream last received presence element.
func (*MockC2S) SetSecured ¶ added in v0.3.0
SetSecured sets whether or not the a mocked stream has been secured.
func (*MockC2S) WaitDisconnection ¶ added in v0.3.0
WaitDisconnection waits until the mocked stream disconnects.
type S2SIn ¶ added in v0.3.0
type S2SIn interface { InStream }
S2SIn represents an incoming server-to-server XMPP stream.
type S2SOut ¶ added in v0.3.0
type S2SOut interface { InOutStream }
S2SOut represents an outgoing server-to-server XMPP stream.