Documentation
¶
Index ¶
- Variables
- type Client
- func (m *Client) DeleteMessage(postID string) error
- func (m *Client) EditMessage(postID string, text string) (string, error)
- func (m *Client) GetChannelHeader(channelID string) string
- func (m *Client) GetChannelID(name string, teamID string) string
- func (m *Client) GetChannelName(channelID string) string
- func (m *Client) GetChannelTeamID(id string) string
- func (m *Client) GetChannels() []*model.Channel
- func (m *Client) GetFileLinks(filenames []string) []string
- func (m *Client) GetLastViewedAt(channelID string) int64
- func (m *Client) GetMoreChannels() []*model.Channel
- func (m *Client) GetNickName(userID string) string
- func (m *Client) GetPostThread(postID string) *model.PostList
- func (m *Client) GetPosts(channelID string, limit int) *model.PostList
- func (m *Client) GetPostsSince(channelID string, time int64) *model.PostList
- func (m *Client) GetPublicLink(filename string) string
- func (m *Client) GetPublicLinks(filenames []string) []string
- func (m *Client) GetStatus(userID string) string
- func (m *Client) GetStatuses() map[string]string
- func (m *Client) GetTeamFromChannel(channelID string) string
- func (m *Client) GetTeamID() string
- func (m *Client) GetTeamName(teamID string) string
- func (m *Client) GetUser(userID string) *model.User
- func (m *Client) GetUserName(userID string) string
- func (m *Client) GetUsers() map[string]*model.User
- func (m *Client) HandleRatelimit(name string, resp *model.Response) error
- func (m *Client) JoinChannel(channelID string) error
- func (m *Client) Login() error
- func (m *Client) Logout() error
- func (m *Client) PostMessage(channelID string, text string, rootID string) (string, error)
- func (m *Client) PostMessageWithFiles(channelID string, text string, rootID string, fileIds []string) (string, error)
- func (m *Client) Reconnect()
- func (m *Client) SearchPosts(query string) *model.PostList
- func (m *Client) SendDirectMessage(toUserID string, msg string, rootID string) error
- func (m *Client) SendDirectMessageProps(toUserID string, msg string, rootID string, props map[string]interface{}) error
- func (m *Client) SetLogLevel(level string)
- func (m *Client) UpdateChannelHeader(channelID string, header string)
- func (m *Client) UpdateChannels() error
- func (m *Client) UpdateChannelsTeam(teamID string) error
- func (m *Client) UpdateLastViewed(channelID string) error
- func (m *Client) UpdateStatus(userID string, status string) error
- func (m *Client) UpdateUser(userID string)
- func (m *Client) UpdateUserNick(nick string) error
- func (m *Client) UpdateUsers() error
- func (m *Client) UploadFile(data []byte, channelID string, filename string) (string, error)
- func (m *Client) UsernamesInChannel(channelID string) []string
- func (m *Client) WsReceiver(ctx context.Context)
- type Credentials
- type Message
- type Team
Constants ¶
This section is empty.
Variables ¶
var Matterircd bool
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { sync.RWMutex *Credentials Team *Team OtherTeams []*Team Client *model.Client4 User *model.User Users map[string]*model.User MessageChan chan *Message WsClient *model.WebSocketClient AntiIdle bool AntiIdleChan string AntiIdleIntvl int WsQuit bool WsConnected bool OnWsConnect func() Timeout int // contains filtered or unexported fields }
func (*Client) DeleteMessage ¶
func (*Client) EditMessage ¶
func (*Client) GetChannelHeader ¶
func (*Client) GetChannelName ¶
func (*Client) GetChannelTeamID ¶
func (*Client) GetChannels ¶
GetChannels returns all channels we're members off
func (*Client) GetFileLinks ¶
func (*Client) GetLastViewedAt ¶
func (*Client) GetMoreChannels ¶
GetMoreChannels returns existing channels where we're not a member off.
func (*Client) GetNickName ¶
func (*Client) GetPostsSince ¶
func (*Client) GetPublicLink ¶
func (*Client) GetPublicLinks ¶
func (*Client) GetStatuses ¶
func (*Client) GetTeamFromChannel ¶
GetTeamFromChannel returns teamId belonging to channel (DM channels have no teamId).
func (*Client) GetTeamName ¶
GetTeamName returns the name of the specified teamId
func (*Client) GetUserName ¶
func (*Client) HandleRatelimit ¶
func (*Client) JoinChannel ¶
func (*Client) Login ¶
Login tries to connect the client with the loging details with which it was initialized.
func (*Client) PostMessage ¶
func (*Client) PostMessageWithFiles ¶
func (*Client) SendDirectMessage ¶
SendDirectMessage sends a direct message to specified user
func (*Client) SendDirectMessageProps ¶
func (*Client) SetLogLevel ¶
SetLogLevel tries to parse the specified level and if successful sets the log level accordingly. Accepted levels are: 'debug', 'info', 'warn', 'error', 'fatal' and 'panic'.
func (*Client) UpdateChannelHeader ¶
func (*Client) UpdateChannels ¶
func (*Client) UpdateChannelsTeam ¶
func (*Client) UpdateLastViewed ¶
func (*Client) UpdateUser ¶
func (*Client) UpdateUserNick ¶
func (*Client) UpdateUsers ¶
func (*Client) UploadFile ¶
func (*Client) UsernamesInChannel ¶
func (*Client) WsReceiver ¶
WsReceiver implements the core loop that manages the connection to the chat server. In case of a disconnect it will try to reconnect. A call to this method is blocking until the 'WsQuite' field of the MMClient object is set to 'true'.