slack

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: MIT Imports: 18 Imported by: 0

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()) (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) 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) 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, channelID 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) 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, channelID, 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, username, 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) 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) 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, name 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