Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface {
Aliases() []string
Description() string
IsAdminCommand() bool
Execute(user *gumble.User, args ...string) (string, bool, error)
}
Command is an interface that all commands must implement.
type Playlist ¶
type Playlist interface {
GetID() string
GetTitle() string
GetSubmitter() string
GetService() string
}
Playlist is an interface of methods that must be implemented by playlists.
type Queue ¶
type Queue interface {
Length() int
Reset()
AppendTrack(Track) error
InsertTrack(int, Track) error
CurrentTrack() (Track, error)
GetTrack(int) Track
PeekNextTrack() (Track, error)
Traverse(func(int, Track))
ShuffleTracks()
RandomNextTrack(bool)
Skip()
SkipPlaylist()
PlayCurrent() error
PauseCurrent() error
ResumeCurrent() error
StopCurrent() error
}
Queue is the interface which should be interacted with for queue operations. Using the Queue interface ensures thread safety.
type Service ¶
type Service interface {
GetReadableName() string
GetFormat() string
CheckAPIKey() error
CheckURL(string) bool
GetTracks(string, *gumble.User) ([]Track, error)
}
Service is an interface of methods to be implemented by various service types, such as YouTube or SoundCloud.
type SkipTracker ¶
type SkipTracker interface {
AddTrackSkip(*gumble.User) error
AddPlaylistSkip(*gumble.User) error
RemoveTrackSkip(*gumble.User) error
RemovePlaylistSkip(*gumble.User) error
NumTrackSkips() int
NumPlaylistSkips() int
ResetTrackSkips()
ResetPlaylistSkips()
}
SkipTracker is the interface which should be interacted with for skip operations. Using the SkipTracker interface ensures thread safety.
type Track ¶
type Track interface {
GetID() string
GetURL() string
GetTitle() string
GetAuthor() string
GetAuthorURL() string
GetSubmitter() string
GetService() string
GetFilename() string
GetThumbnailURL() string
GetDuration() time.Duration
GetPlaybackOffset() time.Duration
GetPlaylist() Playlist
}
Track is an interface of methods that must be implemented by tracks.
Click to show internal directories.
Click to hide internal directories.