Documentation ¶
Index ¶
- func Bot(ctx context.Context, logger logr.Logger, controller *twitch.Controller, ...)
- func GetTwitchIDContext(ctx context.Context) string
- func NewGrpc(ctx context.Context, logger logr.Logger, serverFlags *gateway.ServerFlags, ...) error
- func NewListenCommand(logger *logging.Logger) *cobra.Command
- func SetTwitchIDContext(ctx context.Context, twitch_id string) context.Context
- type IRCClient
- type TwitchChatServer
- type TwitchIDKey
- type TwitchSinker
- func (t *TwitchSinker) MapBadges(badges map[string]int) map[string]int64
- func (t *TwitchSinker) MapEmotes(emotes []*twitchIRC.Emote) []*messages.Emote
- func (t *TwitchSinker) MapUser(user twitchIRC.User) *messages.User
- func (t *TwitchSinker) NewClearChatMessageHandler(ctx context.Context, f func(twitchIRC.ClearChatMessage)) func(twitchIRC.ClearChatMessage)
- func (t *TwitchSinker) NewClearMessageHandler(ctx context.Context, f func(twitchIRC.ClearMessage)) func(twitchIRC.ClearMessage)
- func (t *TwitchSinker) NewGlobalUserStateMessageHandler(ctx context.Context, f func(twitchIRC.GlobalUserStateMessage)) func(twitchIRC.GlobalUserStateMessage)
- func (t *TwitchSinker) NewNoticeMessageHandler(ctx context.Context, f func(twitchIRC.NoticeMessage)) func(twitchIRC.NoticeMessage)
- func (t *TwitchSinker) NewPrivateMessageHandler(ctx context.Context, f func(twitchIRC.PrivateMessage)) func(twitchIRC.PrivateMessage)
- func (t *TwitchSinker) NewReconnectMessageHandler(ctx context.Context, f func(twitchIRC.ReconnectMessage)) func(twitchIRC.ReconnectMessage)
- func (t *TwitchSinker) NewRoomStateMessageHandler(ctx context.Context, f func(twitchIRC.RoomStateMessage)) func(twitchIRC.RoomStateMessage)
- func (t *TwitchSinker) NewUserJoinMessageHandler(ctx context.Context, f func(twitchIRC.UserJoinMessage)) func(twitchIRC.UserJoinMessage)
- func (t *TwitchSinker) NewUserNoticeMessageHandler(ctx context.Context, f func(twitchIRC.UserNoticeMessage)) func(twitchIRC.UserNoticeMessage)
- func (t *TwitchSinker) NewUserPartMessageHandler(ctx context.Context, f func(twitchIRC.UserPartMessage)) func(twitchIRC.UserPartMessage)
- func (t *TwitchSinker) NewUserStateMessageHandler(ctx context.Context, f func(twitchIRC.UserStateMessage)) func(twitchIRC.UserStateMessage)
- func (t *TwitchSinker) NewWhisperMessageHandler(ctx context.Context, f func(twitchIRC.WhisperMessage)) func(twitchIRC.WhisperMessage)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bot ¶
func Bot(ctx context.Context, logger logr.Logger, controller *twitch.Controller, sink *TwitchSinker, loginChan chan string)
Bot create a loop that reacts to login events and spins up a new IRC client to twitch chat. This allows us to listen for messages on the channels we subscribe to, and send them off to the sink for processing.
func GetTwitchIDContext ¶
Types ¶
type TwitchChatServer ¶
type TwitchChatServer struct { chat.UnimplementedTwitchChatServer grpcUtils.DisabledAuth // contains filtered or unexported fields }
func NewChatServer ¶
func NewChatServer(logger logr.Logger, controller *twitch.Controller) *TwitchChatServer
func (TwitchChatServer) Send ¶
func (t TwitchChatServer) Send(ctx context.Context, msg *chat.TwitchChatRequest) (*chat.TwitchChatResponse, error)
type TwitchIDKey ¶
type TwitchIDKey struct{}
type TwitchSinker ¶
type TwitchSinker struct {
Client sink.TwitchMessageSinkClient
}
func NewTwitchSinker ¶
func NewTwitchSinker(client grpc.ClientConnInterface) *TwitchSinker
func (*TwitchSinker) MapBadges ¶
func (t *TwitchSinker) MapBadges(badges map[string]int) map[string]int64
func (*TwitchSinker) MapEmotes ¶
func (t *TwitchSinker) MapEmotes(emotes []*twitchIRC.Emote) []*messages.Emote
func (*TwitchSinker) NewClearChatMessageHandler ¶
func (t *TwitchSinker) NewClearChatMessageHandler(ctx context.Context, f func(twitchIRC.ClearChatMessage)) func(twitchIRC.ClearChatMessage)
func (*TwitchSinker) NewClearMessageHandler ¶
func (t *TwitchSinker) NewClearMessageHandler(ctx context.Context, f func(twitchIRC.ClearMessage)) func(twitchIRC.ClearMessage)
func (*TwitchSinker) NewGlobalUserStateMessageHandler ¶
func (t *TwitchSinker) NewGlobalUserStateMessageHandler(ctx context.Context, f func(twitchIRC.GlobalUserStateMessage)) func(twitchIRC.GlobalUserStateMessage)
func (*TwitchSinker) NewNoticeMessageHandler ¶
func (t *TwitchSinker) NewNoticeMessageHandler(ctx context.Context, f func(twitchIRC.NoticeMessage)) func(twitchIRC.NoticeMessage)
func (*TwitchSinker) NewPrivateMessageHandler ¶
func (t *TwitchSinker) NewPrivateMessageHandler(ctx context.Context, f func(twitchIRC.PrivateMessage)) func(twitchIRC.PrivateMessage)
func (*TwitchSinker) NewReconnectMessageHandler ¶
func (t *TwitchSinker) NewReconnectMessageHandler(ctx context.Context, f func(twitchIRC.ReconnectMessage)) func(twitchIRC.ReconnectMessage)
func (*TwitchSinker) NewRoomStateMessageHandler ¶
func (t *TwitchSinker) NewRoomStateMessageHandler(ctx context.Context, f func(twitchIRC.RoomStateMessage)) func(twitchIRC.RoomStateMessage)
func (*TwitchSinker) NewUserJoinMessageHandler ¶
func (t *TwitchSinker) NewUserJoinMessageHandler(ctx context.Context, f func(twitchIRC.UserJoinMessage)) func(twitchIRC.UserJoinMessage)
func (*TwitchSinker) NewUserNoticeMessageHandler ¶
func (t *TwitchSinker) NewUserNoticeMessageHandler(ctx context.Context, f func(twitchIRC.UserNoticeMessage)) func(twitchIRC.UserNoticeMessage)
func (*TwitchSinker) NewUserPartMessageHandler ¶
func (t *TwitchSinker) NewUserPartMessageHandler(ctx context.Context, f func(twitchIRC.UserPartMessage)) func(twitchIRC.UserPartMessage)
func (*TwitchSinker) NewUserStateMessageHandler ¶
func (t *TwitchSinker) NewUserStateMessageHandler(ctx context.Context, f func(twitchIRC.UserStateMessage)) func(twitchIRC.UserStateMessage)
func (*TwitchSinker) NewWhisperMessageHandler ¶
func (t *TwitchSinker) NewWhisperMessageHandler(ctx context.Context, f func(twitchIRC.WhisperMessage)) func(twitchIRC.WhisperMessage)
Click to show internal directories.
Click to hide internal directories.