slack

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 26 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg *config.Config, cred bridge.Credentials, eventChan chan *bridge.Event, onConnect func(), onWsError ...func(error)) (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(ctx context.Context, msgID, emoji string) error

func (*Slack) BridgeConfig added in v0.31.0

func (s *Slack) BridgeConfig() *config.BridgeConfig

func (*Slack) Config added in v0.31.0

func (s *Slack) Config() any

func (*Slack) Connected

func (s *Slack) Connected() bool

func (*Slack) CreateChannel added in v0.32.0

func (s *Slack) CreateChannel(ctx context.Context, channelName string, channelType string) (*bridge.ChannelInfo, error)

func (*Slack) FormatterConfig added in v0.31.0

func (s *Slack) FormatterConfig() *config.FormatterConfig

func (*Slack) GetChannel

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

func (*Slack) GetChannelCount added in v0.32.0

func (s *Slack) GetChannelCount() int

func (*Slack) GetChannelID

func (s *Slack) GetChannelID(ctx context.Context, name, teamID string) string

func (*Slack) GetChannelName

func (s *Slack) GetChannelName(ctx context.Context, channelID string) string

func (*Slack) GetChannelUsers

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

func (*Slack) GetChannels

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

func (*Slack) GetDMChannelID added in v0.34.0

func (s *Slack) GetDMChannelID(ctx context.Context, userID string) string

func (*Slack) GetDMChannelName added in v0.32.0

func (s *Slack) GetDMChannelName(userID1 string, userID2 string) string

func (*Slack) GetDMOtherUserID added in v0.32.0

func (s *Slack) GetDMOtherUserID(channelName, myUserID string) (string, bool)

func (*Slack) GetDMUser added in v0.32.0

func (s *Slack) GetDMUser(ctx context.Context, channelName string) *bridge.UserInfo

func (*Slack) GetDMUserIDs added in v0.32.0

func (s *Slack) GetDMUserIDs(channelName string) (string, string, bool)

func (*Slack) GetFilesInfo added in v0.32.0

func (s *Slack) GetFilesInfo(ctx context.Context, fileIDs []string) []*bridge.File

func (*Slack) GetLastSentMsgs added in v0.27.1

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

func (*Slack) GetLastViewedAt

func (s *Slack) GetLastViewedAt(ctx context.Context, channelID string) int64

func (*Slack) GetMe

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

func (*Slack) GetPostChannelID added in v0.34.0

func (s *Slack) GetPostChannelID(ctx context.Context, postID string) string

func (*Slack) GetPostSizeLimit added in v0.33.0

func (s *Slack) GetPostSizeLimit() int

func (*Slack) GetPostThread added in v0.28.0

func (s *Slack) GetPostThread(ctx context.Context, postID string) []*bridge.Event

func (*Slack) GetPosts

func (s *Slack) GetPosts(ctx context.Context, channelID string, limit int) []*bridge.Event

func (*Slack) GetPostsSince

func (s *Slack) GetPostsSince(ctx context.Context, channelID string, since int64) []*bridge.Event

func (*Slack) GetReplayEvents added in v0.32.0

func (s *Slack) GetReplayEvents(ctx context.Context, channelID string, since int64) []*bridge.Event

func (*Slack) GetTeamName

func (s *Slack) GetTeamName(ctx context.Context, teamID string) string

func (*Slack) GetUser

func (s *Slack) GetUser(ctx context.Context, userID string) *bridge.UserInfo

func (*Slack) GetUserByUsername

func (s *Slack) GetUserByUsername(ctx context.Context, username string) *bridge.UserInfo

func (*Slack) GetUserChannels added in v0.32.0

func (s *Slack) GetUserChannels(ctx context.Context, userID string) ([]string, error)

func (*Slack) GetUserCount added in v0.32.0

func (s *Slack) GetUserCount() int

func (*Slack) GetUsers

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

func (*Slack) HasCustomStatus added in v0.34.0

func (s *Slack) HasCustomStatus(userID string) bool

func (*Slack) Invite

func (s *Slack) Invite(ctx context.Context, channelID, username string) error

func (*Slack) IsChannelMember added in v0.31.0

func (s *Slack) IsChannelMember(channelID string) bool

func (*Slack) IsDMChannelName added in v0.32.0

func (s *Slack) IsDMChannelName(channelName string) bool

func (*Slack) IsOnline added in v0.33.0

func (s *Slack) IsOnline(status string) bool

func (*Slack) Join

func (s *Slack) Join(ctx context.Context, channelName string) (string, string, error)

func (*Slack) Kick

func (s *Slack) Kick(ctx context.Context, channelID, username string) error

func (*Slack) List

func (s *Slack) List(ctx context.Context) (map[string]string, error)

func (*Slack) Logout

func (s *Slack) Logout(ctx context.Context) error

func (*Slack) ModifyPost

func (s *Slack) ModifyPost(ctx context.Context, msgID, text string) error

func (*Slack) MsgChannel

func (s *Slack) MsgChannel(ctx context.Context, channelID, text string) (string, error)

func (*Slack) MsgChannelThread

func (s *Slack) MsgChannelThread(ctx context.Context, channelID, parentID, text string) (string, error)

func (*Slack) MsgUser

func (s *Slack) MsgUser(ctx context.Context, username, text string) (string, error)

func (*Slack) MsgUserThread

func (s *Slack) MsgUserThread(ctx context.Context, username, parentID, text string) (string, error)

func (*Slack) Nick

func (s *Slack) Nick(ctx context.Context, name string) error

func (*Slack) NormalizePostID added in v0.34.0

func (s *Slack) NormalizePostID(msgID string) string

func (*Slack) Part

func (s *Slack) Part(ctx context.Context, channelID string) error

func (*Slack) Ping added in v0.32.0

func (s *Slack) Ping(ctx context.Context, proto ...string) error

func (*Slack) PostURL added in v0.35.0

func (s *Slack) PostURL(ctx context.Context, postID string, events []*bridge.Event) string

func (*Slack) Protocol

func (s *Slack) Protocol() string

func (*Slack) RemoveReaction added in v0.23.0

func (s *Slack) RemoveReaction(ctx context.Context, msgID, emoji string) error

func (*Slack) SearchPosts

func (s *Slack) SearchPosts(ctx context.Context, search string) []*bridge.Event

func (*Slack) SearchUsers

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

func (*Slack) SendTyping added in v0.33.0

func (s *Slack) SendTyping(ctx context.Context, channelName string)

func (*Slack) SetStatus

func (s *Slack) SetStatus(ctx context.Context, status string) error

func (*Slack) SetTopic

func (s *Slack) SetTopic(ctx context.Context, channelID, text string) error

func (*Slack) StatusUser

func (s *Slack) StatusUser(ctx context.Context, userID string) (string, error)

func (*Slack) StatusUsers

func (s *Slack) StatusUsers(ctx context.Context) (map[string]string, error)

func (*Slack) Topic

func (s *Slack) Topic(ctx context.Context, channelID string) string

func (*Slack) UpdateChannels

func (s *Slack) UpdateChannels(ctx context.Context) error

func (*Slack) UpdateLastViewed

func (s *Slack) UpdateLastViewed(ctx context.Context, channelID string)

func (*Slack) UpdateLastViewedUser

func (s *Slack) UpdateLastViewedUser(ctx context.Context, userID string) error

Jump to

Keyboard shortcuts

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