Documentation
¶
Index ¶
- type BannerChangeEvent
- type Bridger
- type ChannelAddEvent
- type ChannelCreateEvent
- type ChannelDeleteEvent
- type ChannelInfo
- type ChannelMessageEvent
- type ChannelRemoveEvent
- type ChannelTopicEvent
- type ChannelUpdateEvent
- type Credentials
- type DirectMessageEvent
- type Event
- type File
- type FileEvent
- type LogoutEvent
- type Message
- type ReactionAddEvent
- type ReactionRemoveEvent
- type StatusChangeEvent
- type TypingEvent
- type UserInfo
- type UserUpdateEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BannerChangeEvent ¶ added in v0.32.0
type BannerChangeEvent struct {
Text string
}
type Bridger ¶
type Bridger interface {
Invite(ctx context.Context, channelID, username string) error
Join(ctx context.Context, channelName string) (string, string, error)
List(ctx context.Context) (map[string]string, error)
Part(ctx context.Context, channel string) error
SetTopic(ctx context.Context, channelID, text string) error
Topic(ctx context.Context, channelID string) string
Kick(ctx context.Context, channelID, username string) error
Nick(ctx context.Context, name string) error
UpdateChannels(ctx context.Context) error
Logout(ctx context.Context) error
Connected() bool
MsgUser(ctx context.Context, userID, text string) (string, error)
MsgUserThread(ctx context.Context, userID, parentID, text string) (string, error)
MsgChannel(ctx context.Context, channelID, text string) (string, error)
MsgChannelThread(ctx context.Context, channelID, parentID, text string) (string, error)
AddReaction(ctx context.Context, msgID, emoji string) error
RemoveReaction(ctx context.Context, msgID, emoji string) error
IsOnline(status string) bool
StatusUser(ctx context.Context, userID string) (string, error)
StatusUsers(ctx context.Context) (map[string]string, error)
SetStatus(ctx context.Context, status string) error
Protocol() string
CreateChannel(ctx context.Context, channelName string, channelType string) (*ChannelInfo, error)
GetChannels() []*ChannelInfo
GetChannel(ctx context.Context, channelID string) (*ChannelInfo, error)
GetChannelCount() int
GetChannelName(ctx context.Context, channelID string) string
GetLastViewedAt(ctx context.Context, channelID string) int64
UpdateLastViewed(ctx context.Context, channelID string)
UpdateLastViewedUser(ctx context.Context, userID string) error
GetChannelID(ctx context.Context, name, teamID string) string
GetChannelUsers(ctx context.Context, channelID string) ([]*UserInfo, error)
GetUsers() []*UserInfo
GetUser(ctx context.Context, userID string) *UserInfo
GetUserChannels(ctx context.Context, userID string) ([]string, error)
GetUserCount() int
GetMe() *UserInfo
GetUserByUsername(ctx context.Context, username string) *UserInfo
SearchUsers(ctx context.Context, query string) ([]*UserInfo, error)
GetDMChannelName(userID1 string, userID2 string) string
GetDMUser(ctx context.Context, channelName string) *UserInfo
GetDMUserIDs(channelName string) (string, string, bool)
GetDMOtherUserID(channelName, myUserID string) (string, bool)
IsDMChannelName(channelName string) bool
GetTeamName(ctx context.Context, teamID string) string
GetPostsSince(ctx context.Context, channelID string, since int64) []*Event
GetPosts(ctx context.Context, channelID string, limit int) []*Event
GetPostThread(ctx context.Context, postID string) []*Event
GetReplayEvents(ctx context.Context, channelID string, since int64) []*Event
SearchPosts(ctx context.Context, search string) []*Event
ModifyPost(ctx context.Context, msgID, text string) error
GetFilesInfo(ctx context.Context, fileIDs []string) []*File
GetLastSentMsgs() []string
Config() any
BridgeConfig() *config.BridgeConfig
FormatterConfig() *config.FormatterConfig
IsChannelMember(channelID string) bool
GetPostSizeLimit() int
Ping(ctx context.Context, proto ...string) error
SendTyping(ctx context.Context, channelName 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 ChannelUpdateEvent ¶ added in v0.32.0
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 TypingEvent ¶ added in v0.32.0
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.