Documentation ¶
Index ¶
- type Controller
- func (t *Controller) AddFavorite(userID, ident string) error
- func (t *Controller) CheckAdmin(userID string) error
- func (t *Controller) Close() error
- func (t *Controller) CreateSound(req CreateSoundRequest) (Sound, error)
- func (t *Controller) DownloadAllSounds() (rc io.ReadCloser, err error)
- func (t *Controller) GenerateApiKey(userID string) (string, error)
- func (t *Controller) GetAdmins(executorID string) ([]User, error)
- func (t *Controller) GetApiKey(userID string) (string, error)
- func (t *Controller) GetCurrentState(userID string) (EventStatePayload, error)
- func (t *Controller) GetFastTrigger(userID string) (string, error)
- func (t *Controller) GetFavorites(userID string) ([]string, error)
- func (t *Controller) GetGuildFilter(userID string) (GuildFilters, error)
- func (t *Controller) GetPlaybackLog(guildID, ident, userID string, limit, offset int) ([]PlaybackLogEntry, error)
- func (t *Controller) GetPlaybackStats(guildID, userID string) ([]PlaybackStats, error)
- func (t *Controller) GetSelfUser() discordgo.User
- func (t *Controller) GetSound(uid string) (Sound, error)
- func (t *Controller) GetSoundFromYoutube(req CreateSoundRequest) (Sound, error)
- func (t *Controller) GetSoundReader(uid string) (io.ReadCloser, int64, error)
- func (t *Controller) GetState() (StateStats, error)
- func (t *Controller) GetTwitchState(userid string) (TwitchState, error)
- func (t *Controller) GetUserByApiKey(token string) (string, error)
- func (t *Controller) GetVolume(userID string) (int, error)
- func (t *Controller) HasSharedGuild(userID string) (bool, error)
- func (t *Controller) ImportSounds(userID string, f io.ReadCloser, mimeType string) (ImportResult, error)
- func (t *Controller) JoinChannel(userID string) error
- func (t *Controller) LeaveChannel(guildID, userID string) error
- func (t *Controller) LeaveTwitch(userid string) error
- func (t *Controller) ListSounds(order string, tagsMust []string, tagsNot []string) ([]Sound, error)
- func (t *Controller) Play(userID, ident string) error
- func (t *Controller) PlayRandom(userID string, tagsMust []string, tagsNot []string) error
- func (t *Controller) RemoveAdmin(executorID, userID string) error
- func (t *Controller) RemoveApiKey(userID string) error
- func (t *Controller) RemoveFavorite(userID, ident string) error
- func (t *Controller) RemoveSound(id, userID string) error
- func (t *Controller) SetAdmin(executorID, userID string) (User, error)
- func (t *Controller) SetFastTrigger(userID, ident string) error
- func (t *Controller) SetGuildFilter(userID string, f GuildFilters) error
- func (t *Controller) SetVolume(userID string, volume int) error
- func (t *Controller) Stop(userID string) error
- func (t *Controller) TwitchListSounds(username string, order string) ([]Sound, error)
- func (t *Controller) TwitchPlay(username string, ident string) (bool, ratelimit.Reservation, error)
- func (t *Controller) TwitchState(username string) (TwitchAPIState, error)
- func (t *Controller) UpdateSound(newSound UpdateSoundRequest, userID string) (Sound, error)
- func (t *Controller) UpdateTwitchSettings(userid string, setting *TwitchSettings, join bool) error
- func (t *Controller) UploadSound(r io.Reader, size int64, mimeType string) (string, time.Time, error)
- type ControllerEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { *eventbus.EventBus[ControllerEvent] // contains filtered or unexported fields }
func (*Controller) AddFavorite ¶
func (t *Controller) AddFavorite(userID, ident string) error
func (*Controller) CheckAdmin ¶
func (t *Controller) CheckAdmin(userID string) error
func (*Controller) Close ¶
func (t *Controller) Close() error
func (*Controller) CreateSound ¶
func (t *Controller) CreateSound(req CreateSoundRequest) (Sound, error)
func (*Controller) DownloadAllSounds ¶ added in v1.4.0
func (t *Controller) DownloadAllSounds() (rc io.ReadCloser, err error)
func (*Controller) GenerateApiKey ¶
func (t *Controller) GenerateApiKey(userID string) (string, error)
func (*Controller) GetAdmins ¶
func (t *Controller) GetAdmins(executorID string) ([]User, error)
func (*Controller) GetCurrentState ¶
func (t *Controller) GetCurrentState(userID string) (EventStatePayload, error)
func (*Controller) GetFastTrigger ¶
func (t *Controller) GetFastTrigger(userID string) (string, error)
func (*Controller) GetFavorites ¶
func (t *Controller) GetFavorites(userID string) ([]string, error)
func (*Controller) GetGuildFilter ¶
func (t *Controller) GetGuildFilter(userID string) (GuildFilters, error)
func (*Controller) GetPlaybackLog ¶
func (t *Controller) GetPlaybackLog( guildID, ident, userID string, limit, offset int, ) ([]PlaybackLogEntry, error)
func (*Controller) GetPlaybackStats ¶
func (t *Controller) GetPlaybackStats( guildID, userID string, ) ([]PlaybackStats, error)
func (*Controller) GetSelfUser ¶
func (t *Controller) GetSelfUser() discordgo.User
func (*Controller) GetSound ¶
func (t *Controller) GetSound(uid string) (Sound, error)
func (*Controller) GetSoundFromYoutube ¶ added in v1.3.0
func (t *Controller) GetSoundFromYoutube(req CreateSoundRequest) (Sound, error)
func (*Controller) GetSoundReader ¶ added in v1.2.0
func (t *Controller) GetSoundReader(uid string) (io.ReadCloser, int64, error)
func (*Controller) GetState ¶
func (t *Controller) GetState() (StateStats, error)
func (*Controller) GetTwitchState ¶ added in v1.5.0
func (t *Controller) GetTwitchState(userid string) (TwitchState, error)
func (*Controller) GetUserByApiKey ¶
func (t *Controller) GetUserByApiKey(token string) (string, error)
func (*Controller) HasSharedGuild ¶ added in v1.5.0
func (t *Controller) HasSharedGuild(userID string) (bool, error)
func (*Controller) ImportSounds ¶ added in v1.4.0
func (t *Controller) ImportSounds(userID string, f io.ReadCloser, mimeType string) (ImportResult, error)
func (*Controller) JoinChannel ¶
func (t *Controller) JoinChannel(userID string) error
func (*Controller) LeaveChannel ¶
func (t *Controller) LeaveChannel(guildID, userID string) error
func (*Controller) LeaveTwitch ¶ added in v1.5.0
func (t *Controller) LeaveTwitch(userid string) error
func (*Controller) ListSounds ¶
func (t *Controller) ListSounds( order string, tagsMust []string, tagsNot []string, ) ([]Sound, error)
func (*Controller) Play ¶
func (t *Controller) Play(userID, ident string) error
func (*Controller) PlayRandom ¶
func (t *Controller) PlayRandom(userID string, tagsMust []string, tagsNot []string) error
func (*Controller) RemoveAdmin ¶
func (t *Controller) RemoveAdmin(executorID, userID string) error
func (*Controller) RemoveApiKey ¶
func (t *Controller) RemoveApiKey(userID string) error
func (*Controller) RemoveFavorite ¶
func (t *Controller) RemoveFavorite(userID, ident string) error
func (*Controller) RemoveSound ¶
func (t *Controller) RemoveSound(id, userID string) error
func (*Controller) SetAdmin ¶
func (t *Controller) SetAdmin(executorID, userID string) (User, error)
func (*Controller) SetFastTrigger ¶
func (t *Controller) SetFastTrigger(userID, ident string) error
func (*Controller) SetGuildFilter ¶
func (t *Controller) SetGuildFilter(userID string, f GuildFilters) error
func (*Controller) Stop ¶
func (t *Controller) Stop(userID string) error
func (*Controller) TwitchListSounds ¶ added in v1.5.0
func (t *Controller) TwitchListSounds(username string, order string) ([]Sound, error)
func (*Controller) TwitchPlay ¶ added in v1.5.0
func (t *Controller) TwitchPlay(username string, ident string) (bool, ratelimit.Reservation, error)
func (*Controller) TwitchState ¶ added in v1.5.0
func (t *Controller) TwitchState(username string) (TwitchAPIState, error)
func (*Controller) UpdateSound ¶
func (t *Controller) UpdateSound(newSound UpdateSoundRequest, userID string) (Sound, error)
func (*Controller) UpdateTwitchSettings ¶ added in v1.5.0
func (t *Controller) UpdateTwitchSettings(userid string, setting *TwitchSettings, join bool) error
type ControllerEvent ¶
Click to show internal directories.
Click to hide internal directories.