Documentation
¶
Index ¶
- type Bridger
- type ChannelAddEvent
- type ChannelCreateEvent
- type ChannelDeleteEvent
- type ChannelInfo
- type ChannelMessageEvent
- type ChannelRemoveEvent
- type ChannelTopicEvent
- type Credentials
- type DirectMessageEvent
- type Event
- type File
- type FileEvent
- type LogoutEvent
- type Message
- type ReactionAddEvent
- type ReactionRemoveEvent
- type StatusChangeEvent
- type UserInfo
- type UserUpdateEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bridger ¶
type Bridger interface {
Invite(channelID, username string) error
Join(channelName string) (string, string, error)
List() (map[string]string, error)
Part(channel string) error
SetTopic(channelID, text string) error
Topic(channelID string) string
Kick(channelID, username string) error
Nick(name string) error
UpdateChannels() error
Logout() error
Connected() bool
MsgUser(userID, text string) (string, error)
MsgUserThread(userID, parentID, text string) (string, error)
MsgChannel(channelID, text string) (string, error)
MsgChannelThread(channelID, parentID, text string) (string, error)
AddReaction(msgID, emoji string) error
RemoveReaction(msgID, emoji string) error
StatusUser(userID string) (string, error)
StatusUsers() (map[string]string, error)
SetStatus(status string) error
Protocol() string
GetChannels() []*ChannelInfo
GetChannel(channelID string) (*ChannelInfo, error)
GetChannelName(channelID string) string
GetLastViewedAt(channelID string) int64
UpdateLastViewed(channelID string)
UpdateLastViewedUser(userID string) error
GetChannelID(name, teamID string) string
GetChannelUsers(channelID string) ([]*UserInfo, error)
GetUsers() []*UserInfo
GetUser(userID string) *UserInfo
GetMe() *UserInfo
GetUserByUsername(username string) *UserInfo
SearchUsers(query string) ([]*UserInfo, error)
GetTeamName(teamID string) string
GetPostsSince(channelID string, since int64) interface{}
GetPosts(channelID string, limit int) interface{}
GetPostThread(postID string) interface{}
SearchPosts(search string) interface{}
ModifyPost(msgID, text string) error
GetFileLinks(fileIDs []string) []string
GetLastSentMsgs() []string
}
type ChannelAddEvent ¶
type ChannelCreateEvent ¶
type ChannelCreateEvent struct {
ChannelID string
}
type ChannelDeleteEvent ¶
type ChannelDeleteEvent struct {
ChannelID string
}
type ChannelInfo ¶
type ChannelMessageEvent ¶
type ChannelRemoveEvent ¶
type ChannelTopicEvent ¶
type Credentials ¶
type DirectMessageEvent ¶
type LogoutEvent ¶
type LogoutEvent struct{}
type Message ¶
type Message struct {
Text string `json:"text"`
Channel string `json:"channel"`
Username string `json:"username"`
UserID string `json:"userid"` // userid on the bridge
Account string `json:"account"`
Event string `json:"event"`
Protocol string `json:"protocol"`
ParentID string `json:"parent_id"`
Timestamp time.Time `json:"timestamp"`
ID string `json:"id"`
Extra map[string][]interface{}
}
type ReactionAddEvent ¶
type ReactionRemoveEvent ¶
type ReactionRemoveEvent ReactionAddEvent
type StatusChangeEvent ¶
type UserInfo ¶
type UserInfo struct {
Nick string // From NICK command
User string // From USER command
Real string // From USER command
Pass []string // From PASS command
Host string
Roles string
DisplayName string
Ghost bool
Me bool
Username string
TeamID string
FirstName string
LastName string
MentionKeys []string
}
type UserUpdateEvent ¶
type UserUpdateEvent struct {
User *UserInfo
}
Click to show internal directories.
Click to hide internal directories.