Documentation
¶
Index ¶
- type Chatroom
- type ConnType
- type Event
- type HandlerField
- type HandlerFunc
- type MessageObject
- type OTRMessage
- type Opts
- type Packet
- type PhoxyConn
- func (pc *PhoxyConn) APIURL(path string) string
- func (pc *PhoxyConn) AccessLevel(chat, name string) int64
- func (pc *PhoxyConn) AmIAuthorized() bool
- func (pc *PhoxyConn) BackendURL() string
- func (pc *PhoxyConn) Ban(chat, name string) error
- func (pc *PhoxyConn) CallFunc(typ HandlerField, msg *Event)
- func (pc *PhoxyConn) Chmod(chat, name, level string) error
- func (pc *PhoxyConn) Cleanup(chat string, time int64) (int, error)
- func (pc *PhoxyConn) ClearJail() error
- func (pc *PhoxyConn) Close()
- func (pc *PhoxyConn) Connect() error
- func (pc *PhoxyConn) Disconnect()
- func (pc *PhoxyConn) Fingerprint(u string) string
- func (pc *PhoxyConn) GetChatrooms() (map[string]*Chatroom, error)
- func (pc *PhoxyConn) GroupMessage(body string)
- func (pc *PhoxyConn) Groupf(body string, args ...interface{})
- func (pc *PhoxyConn) HandleFunc(typ HandlerField, h HandlerFunc)
- func (pc *PhoxyConn) HandleOTRMessage(from string, body string)
- func (pc *PhoxyConn) Intercept(f func(*Event))
- func (pc *PhoxyConn) Interrupt(chat, name string) error
- func (pc *PhoxyConn) IsAuthorized(chat, name string) bool
- func (pc *PhoxyConn) Lockdown(chat, level string) error
- func (pc *PhoxyConn) OTRFingerprint(user string) string
- func (pc *PhoxyConn) Send(p Packet)
- func (pc *PhoxyConn) SendChallenge(to string, question string, answer string)
- func (pc *PhoxyConn) SendColor(color string)
- func (pc *PhoxyConn) SendComposing()
- func (pc *PhoxyConn) SendPaused()
- func (pc *PhoxyConn) SendPrivateMessage(to string, body string, errct int)
- func (pc *PhoxyConn) SendPublicKey(nick string)
- func (pc *PhoxyConn) SendRawGroupMessage(body string)
- func (pc *PhoxyConn) SendRawPrivateMessage(to string, body string)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Type HandlerField `json:"type" xorm:"'type'"`
Username string `json:"username" xorm:"'username'"`
Body string `json:"body" xorm:"longtext 'body'"`
At int64 `json:"at" xorm:"'at'"`
Callback chan bool `json:"-" xorm:"-"`
}
type HandlerField ¶
type HandlerField int
const ( USERJOIN HandlerField = iota USERQUIT GROUPMESSAGE PRIVATEMESSAGE VERIFY AUTHSUCCESS AUTHFAIL JOINED USERCONNECT COMPOSING PAUSED )
type HandlerFunc ¶
type HandlerFunc func(*Event)
type MessageObject ¶
type OTRMessage ¶
type OTRMessage struct {
Body string `json:"body"`
}
type Packet ¶
type PhoxyConn ¶
type PhoxyConn struct {
Conn *websocket.Conn
WS *xmpp.Client
Me *multiparty.Me
APIKey string
Handlers map[HandlerField]*HandlerFunc
OTRKey *otr.PrivateKey
Opts *Opts
Errc chan error
AlreadyJoined map[string]bool
Closed bool
PM map[string]*otr.Conversation
PML *sync.Mutex
Start time.Time
// contains filtered or unexported fields
}
func (*PhoxyConn) AccessLevel ¶
func (*PhoxyConn) AmIAuthorized ¶
func (*PhoxyConn) BackendURL ¶
func (*PhoxyConn) CallFunc ¶
func (pc *PhoxyConn) CallFunc(typ HandlerField, msg *Event)
func (*PhoxyConn) Disconnect ¶
func (pc *PhoxyConn) Disconnect()
func (*PhoxyConn) Fingerprint ¶
func (*PhoxyConn) GroupMessage ¶
func (*PhoxyConn) HandleFunc ¶
func (pc *PhoxyConn) HandleFunc(typ HandlerField, h HandlerFunc)
func (*PhoxyConn) HandleOTRMessage ¶
func (*PhoxyConn) IsAuthorized ¶
func (*PhoxyConn) OTRFingerprint ¶
func (*PhoxyConn) SendChallenge ¶
func (*PhoxyConn) SendComposing ¶
func (pc *PhoxyConn) SendComposing()
func (*PhoxyConn) SendPaused ¶
func (pc *PhoxyConn) SendPaused()
func (*PhoxyConn) SendPrivateMessage ¶
func (*PhoxyConn) SendPublicKey ¶
func (*PhoxyConn) SendRawGroupMessage ¶
func (*PhoxyConn) SendRawPrivateMessage ¶
Click to show internal directories.
Click to hide internal directories.