slack

package
v0.28.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(v *viper.Viper, cred bridge.Credentials, eventChan chan *bridge.Event, onConnect func()) (bridge.Bridger, error)

Types

type Slack

type Slack struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Slack) AddReaction added in v0.23.0

func (s *Slack) AddReaction(msgID, emoji string) error

func (*Slack) Connected

func (s *Slack) Connected() bool

func (*Slack) GetChannel

func (s *Slack) GetChannel(channelID string) (*bridge.ChannelInfo, error)

func (*Slack) GetChannelID

func (s *Slack) GetChannelID(name, teamID string) string

func (*Slack) GetChannelName

func (s *Slack) GetChannelName(channelID string) string

func (*Slack) GetChannelUsers

func (s *Slack) GetChannelUsers(channelID string) ([]*bridge.UserInfo, error)

func (*Slack) GetChannels

func (s *Slack) GetChannels() []*bridge.ChannelInfo
func (s *Slack) GetFileLinks(fileIDs []string) []string

func (*Slack) GetLastSentMsgs added in v0.27.1

func (s *Slack) GetLastSentMsgs() []string

func (*Slack) GetLastViewedAt

func (s *Slack) GetLastViewedAt(channelID string) int64

func (*Slack) GetMe

func (s *Slack) GetMe() *bridge.UserInfo

func (*Slack) GetPostThread added in v0.28.0

func (s *Slack) GetPostThread(channelID string) interface{}

func (*Slack) GetPosts

func (s *Slack) GetPosts(channelID string, limit int) interface{}

func (*Slack) GetPostsSince

func (s *Slack) GetPostsSince(channelID string, since int64) interface{}

func (*Slack) GetTeamName

func (s *Slack) GetTeamName(teamID string) string

func (*Slack) GetUser

func (s *Slack) GetUser(userID string) *bridge.UserInfo

func (*Slack) GetUserByUsername

func (s *Slack) GetUserByUsername(username string) *bridge.UserInfo

func (*Slack) GetUsers

func (s *Slack) GetUsers() []*bridge.UserInfo

func (*Slack) Invite

func (s *Slack) Invite(channelID, username string) error

func (*Slack) Join

func (s *Slack) Join(channelName string) (string, string, error)

func (*Slack) Kick

func (s *Slack) Kick(channelID, username string) error

func (*Slack) List

func (s *Slack) List() (map[string]string, error)

func (*Slack) Logout

func (s *Slack) Logout() error

func (*Slack) ModifyPost

func (s *Slack) ModifyPost(channelID, text string) error

func (*Slack) MsgChannel

func (s *Slack) MsgChannel(channelID, text string) (string, error)

func (*Slack) MsgChannelThread

func (s *Slack) MsgChannelThread(username, parentID, text string) (string, error)

func (*Slack) MsgUser

func (s *Slack) MsgUser(username, text string) (string, error)

func (*Slack) MsgUserThread

func (s *Slack) MsgUserThread(username, parentID, text string) (string, error)

func (*Slack) Nick

func (s *Slack) Nick(name string) error

func (*Slack) Part

func (s *Slack) Part(channelID string) error

func (*Slack) Protocol

func (s *Slack) Protocol() string

func (*Slack) RemoveReaction added in v0.23.0

func (s *Slack) RemoveReaction(msgID, emoji string) error

func (*Slack) SearchPosts

func (s *Slack) SearchPosts(search string) interface{}

func (*Slack) SearchUsers

func (s *Slack) SearchUsers(query string) ([]*bridge.UserInfo, error)

func (*Slack) SetStatus

func (s *Slack) SetStatus(status string) error

func (*Slack) SetTopic

func (s *Slack) SetTopic(channelID, text string) error

func (*Slack) StatusUser

func (s *Slack) StatusUser(name string) (string, error)

func (*Slack) StatusUsers

func (s *Slack) StatusUsers() (map[string]string, error)

func (*Slack) Topic

func (s *Slack) Topic(channelID string) string

func (*Slack) UpdateChannels

func (s *Slack) UpdateChannels() error

func (*Slack) UpdateLastViewed

func (s *Slack) UpdateLastViewed(channelID string)

func (*Slack) UpdateLastViewedUser

func (s *Slack) UpdateLastViewedUser(userID string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL