Documentation ¶
Index ¶
- func DefaultMockQueuerGetTrackFunc(id spotify.ID) (*spotify.FullTrack, error)
- type DummyCallback
- type DummyPublisher
- type InMemoryMessageCounter
- type InMemoryPreferenceStore
- func (s *InMemoryPreferenceStore) AddPreference(p *preferences.Preference) error
- func (s *InMemoryPreferenceStore) DeletePreference(id string) error
- func (s *InMemoryPreferenceStore) GetPreference(id string) (*preferences.Preference, error)
- func (s *InMemoryPreferenceStore) UpdatePreference(p *preferences.Preference) error
- type InMemoryUserStore
- type MockQueuer
- func (m *MockQueuer) GetTrack(ctx context.Context, id spotify.ID, opts ...spotify.RequestOption) (*spotify.FullTrack, error)
- func (m *MockQueuer) QueueSong(ctx context.Context, trackID spotify.ID) error
- func (m *MockQueuer) Search(ctx context.Context, query string, t spotify.SearchType, ...) (*spotify.SearchResult, error)
- type MockReadCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultMockQueuerGetTrackFunc ¶
func DefaultMockQueuerGetTrackFunc(id spotify.ID) (*spotify.FullTrack, error)
Types ¶
type DummyCallback ¶
func (*DummyCallback) Callback ¶
func (c *DummyCallback) Callback(a *util.AuthConfig, u db.UserStore, e *helix.EventSubChannelPointsCustomRewardRedemptionEvent, success bool) error
func (*DummyCallback) CheckUser ¶
func (c *DummyCallback) CheckUser(context.Context, *spotify.Client, *helix.EventSubChannelPointsCustomRewardRedemptionEvent)
type DummyPublisher ¶
func (DummyPublisher) Publish ¶
func (p DummyPublisher) Publish(client queue.Queuer, url string, pref *preferences.Preference) (spotify.ID, error)
type InMemoryMessageCounter ¶
func (*InMemoryMessageCounter) AddMessage ¶
func (c *InMemoryMessageCounter) AddMessage(m *metrics.Message)
func (*InMemoryMessageCounter) MessagesForUser ¶ added in v1.3.1
func (c *InMemoryMessageCounter) MessagesForUser(string) []*metrics.Message
func (*InMemoryMessageCounter) RunningCount ¶
func (c *InMemoryMessageCounter) RunningCount(int) uint64
func (*InMemoryMessageCounter) TotalMessages ¶
func (c *InMemoryMessageCounter) TotalMessages() uint64
type InMemoryPreferenceStore ¶
type InMemoryPreferenceStore struct {
Data map[string]*preferences.Preference
}
func (*InMemoryPreferenceStore) AddPreference ¶
func (s *InMemoryPreferenceStore) AddPreference(p *preferences.Preference) error
func (*InMemoryPreferenceStore) DeletePreference ¶
func (s *InMemoryPreferenceStore) DeletePreference(id string) error
func (*InMemoryPreferenceStore) GetPreference ¶
func (s *InMemoryPreferenceStore) GetPreference(id string) (*preferences.Preference, error)
func (*InMemoryPreferenceStore) UpdatePreference ¶
func (s *InMemoryPreferenceStore) UpdatePreference(p *preferences.Preference) error
type InMemoryUserStore ¶
InMemoryUserStore is used for mocking and unit testing
func (*InMemoryUserStore) DeleteUser ¶
func (s *InMemoryUserStore) DeleteUser(id string) error
func (*InMemoryUserStore) GetUser ¶
func (s *InMemoryUserStore) GetUser(id string) (*users.User, error)
func (*InMemoryUserStore) UpdateUser ¶
func (s *InMemoryUserStore) UpdateUser(user *users.User) error
type MockQueuer ¶
type MockQueuer struct { ShouldFail bool Messages []spotify.ID Explicit bool GetTrackFunc func(spotify.ID) (*spotify.FullTrack, error) }
func (*MockQueuer) GetTrack ¶
func (m *MockQueuer) GetTrack(ctx context.Context, id spotify.ID, opts ...spotify.RequestOption) (*spotify.FullTrack, error)
type MockReadCloser ¶
type MockReadCloser struct{}
func (MockReadCloser) Close ¶
func (m MockReadCloser) Close() error
Click to show internal directories.
Click to hide internal directories.