Documentation
¶
Overview ¶
Package api is a generated GoMock package.
Package api is a generated GoMock package.
Package api provides a client for using the Spotify API.
Index ¶
- Variables
- func ResetClientManager() error
- type Client
- type ClientConfig
- type ClientManager
- type MockClient
- type MockClientManager
- func (m *MockClientManager) CloseClient() error
- func (m *MockClientManager) EXPECT() *MockClientManagerMockRecorder
- func (m *MockClientManager) GetClient() (Client, error)
- func (m *MockClientManager) InitializeClient(ctx context.Context, config *ClientConfig) error
- func (m *MockClientManager) IsClientInitialized() bool
- type MockClientManagerMockRecorder
- type MockClientMockRecorder
Constants ¶
This section is empty.
Variables ¶
var (
// GetClientManagerFunc is a function to get the client manager.
GetClientManagerFunc = getClientManager
)
Functions ¶
func ResetClientManager ¶
func ResetClientManager() error
ResetClientManager resets the client manager.
Types ¶
type Client ¶
type Client interface {
Auth(chan<- string, string) (proxy.Client, string, error)
Close() error
Open() proxy.Client
UpdateConfig(*ClientConfig)
}
Client is an interface that contains the client.
type ClientConfig ¶
type ClientConfig struct {
// SpotifyID is the Spotify client ID.
SpotifyID string
// SpotifySecret is the Spotify client secret.
SpotifySecret string
// SpotifyRedirectUri is the Spotify redirect URI.
SpotifyRedirectUri string
// SpotifyRefreshToken is the Spotify refresh token.
SpotifyRefreshToken string
}
ClientConfig is a struct that contains the configuration of the client.
type ClientManager ¶
type ClientManager interface {
CloseClient() error
GetClient() (Client, error)
InitializeClient(ctx context.Context, config *ClientConfig) error
IsClientInitialized() bool
}
ClientManager is an interface that manages api clients.
func GetClientManager ¶
func GetClientManager() ClientManager
GetClientManager gets the client manager.
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface.
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance.
func (*MockClient) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClient) UpdateConfig ¶
func (m *MockClient) UpdateConfig(arg0 *ClientConfig)
UpdateConfig mocks base method.
type MockClientManager ¶
type MockClientManager struct {
// contains filtered or unexported fields
}
MockClientManager is a mock of ClientManager interface.
func NewMockClientManager ¶
func NewMockClientManager(ctrl *gomock.Controller) *MockClientManager
NewMockClientManager creates a new mock instance.
func (*MockClientManager) CloseClient ¶
func (m *MockClientManager) CloseClient() error
CloseClient mocks base method.
func (*MockClientManager) EXPECT ¶
func (m *MockClientManager) EXPECT() *MockClientManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClientManager) GetClient ¶
func (m *MockClientManager) GetClient() (Client, error)
GetClient mocks base method.
func (*MockClientManager) InitializeClient ¶
func (m *MockClientManager) InitializeClient(ctx context.Context, config *ClientConfig) error
InitializeClient mocks base method.
func (*MockClientManager) IsClientInitialized ¶
func (m *MockClientManager) IsClientInitialized() bool
IsClientInitialized mocks base method.
type MockClientManagerMockRecorder ¶
type MockClientManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockClientManagerMockRecorder is the mock recorder for MockClientManager.
func (*MockClientManagerMockRecorder) CloseClient ¶
func (mr *MockClientManagerMockRecorder) CloseClient() *gomock.Call
CloseClient indicates an expected call of CloseClient.
func (*MockClientManagerMockRecorder) GetClient ¶
func (mr *MockClientManagerMockRecorder) GetClient() *gomock.Call
GetClient indicates an expected call of GetClient.
func (*MockClientManagerMockRecorder) InitializeClient ¶
func (mr *MockClientManagerMockRecorder) InitializeClient(ctx, config any) *gomock.Call
InitializeClient indicates an expected call of InitializeClient.
func (*MockClientManagerMockRecorder) IsClientInitialized ¶
func (mr *MockClientManagerMockRecorder) IsClientInitialized() *gomock.Call
IsClientInitialized indicates an expected call of IsClientInitialized.
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient.
func (*MockClientMockRecorder) Auth ¶
func (mr *MockClientMockRecorder) Auth(arg0, arg1 any) *gomock.Call
Auth indicates an expected call of Auth.
func (*MockClientMockRecorder) Close ¶
func (mr *MockClientMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockClientMockRecorder) Open ¶
func (mr *MockClientMockRecorder) Open() *gomock.Call
Open indicates an expected call of Open.
func (*MockClientMockRecorder) UpdateConfig ¶
func (mr *MockClientMockRecorder) UpdateConfig(arg0 any) *gomock.Call
UpdateConfig indicates an expected call of UpdateConfig.