Documentation ¶
Overview ¶
Package api provides data model interfaces.
Index ¶
- type API
- type ChangeType
- type Collection
- type MockAPI
- func (_m *MockAPI) Authenticate(token *oauth2.Token) error
- func (_m *MockAPI) Changed(typ ChangeType, data interface{})
- func (_m *MockAPI) Clipboards() *clipboard.List
- func (_m *MockAPI) Db() *db.List
- func (_m *MockAPI) Exec(_a0 string) error
- func (_m *MockAPI) History() list.List
- func (_m *MockAPI) Library() *spotify_library.List
- func (_m *MockAPI) List() list.List
- func (_m *MockAPI) Multibar() *multibar.Multibar
- func (_m *MockAPI) PlayerStatus() player.State
- func (_m *MockAPI) Quit()
- func (_m *MockAPI) Sequencer() *keys.Sequencer
- func (_m *MockAPI) SetList(_a0 list.List)
- func (_m *MockAPI) Spotify() (*spotify.Client, error)
- func (_m *MockAPI) Styles() style.Stylesheet
- func (_m *MockAPI) UI() UI
- type MockCollection
- type MockOptions
- type MockTableWidget
- func (_m *MockTableWidget) ColumnNames() []string
- func (_m *MockTableWidget) GetVisibleBoundaries() (int, int)
- func (_m *MockTableWidget) List() list.List
- func (_m *MockTableWidget) PositionReadout() string
- func (_m *MockTableWidget) ScrollViewport(_a0 int, _a1 bool)
- func (_m *MockTableWidget) SetColumns(_a0 []string)
- func (_m *MockTableWidget) SetList(_a0 list.List)
- func (_m *MockTableWidget) Size() (int, int)
- type MockUI
- type Options
- type TableWidget
- type UI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { // Authenticate sets an OAuth2 token that should be used for Spotify calls. Authenticate(token *oauth2.Token) error // Changed notifies the program that some internal state has changed. Changed(typ ChangeType, data interface{}) // Clipboards is a list of clipboards. Clipboards() *clipboard.List // Db returns the database of lists. Db() *db.List // Exec executes a command through the command-line interface. Exec(string) error // History returns a list with all tracks played back during the current session. History() list.List // Return the global multibar instance. Multibar() *multibar.Multibar // Library returns a list of entry points to the Spotify library. Library() *spotify_library.List // List returns the active list. List() list.List // PlayerStatus returns the current MPD player status. PlayerStatus() player.State // Quit shuts down PMS. Quit() // Sequencer returns a pointer to the key sequencer that receives key events. Sequencer() *keys.Sequencer // SetList sets the active list. SetList(list.List) // Spotify returns a Spotify client. Spotify() (*spotify.Client, error) // Styles returns the current stylesheet. Styles() style.Stylesheet // UI returns the global UI object. UI() UI }
API defines a set of commands that should be available to commands run through the command-line interface.
type ChangeType ¶
type ChangeType int
const ( ChangeNone ChangeType = iota // noop ChangeList // some list has changes in row data, title, or other ChangeOption // a setting has been changed ChangePlayerStateInvalid // player state is no longer valid due to a server command ChangeDevice // playback device changed )
type Collection ¶
type MockAPI ¶
MockAPI is an autogenerated mock type for the API type
func (*MockAPI) Authenticate ¶
Authenticate provides a mock function with given fields: token
func (*MockAPI) Changed ¶
func (_m *MockAPI) Changed(typ ChangeType, data interface{})
Changed provides a mock function with given fields: typ, data
func (*MockAPI) Clipboards ¶
Clipboards provides a mock function with given fields:
func (*MockAPI) Library ¶
func (_m *MockAPI) Library() *spotify_library.List
Library provides a mock function with given fields:
func (*MockAPI) PlayerStatus ¶
PlayerStatus provides a mock function with given fields:
func (*MockAPI) Styles ¶
func (_m *MockAPI) Styles() style.Stylesheet
Styles provides a mock function with given fields:
type MockCollection ¶
MockCollection is an autogenerated mock type for the Collection type
func (*MockCollection) ActivateIndex ¶
func (_m *MockCollection) ActivateIndex(_a0 int) error
ActivateIndex provides a mock function with given fields: _a0
func (*MockCollection) Index ¶
func (_m *MockCollection) Index() (int, error)
Index provides a mock function with given fields:
func (*MockCollection) Len ¶
func (_m *MockCollection) Len() int
Len provides a mock function with given fields:
func (*MockCollection) Remove ¶
func (_m *MockCollection) Remove(_a0 int) error
Remove provides a mock function with given fields: _a0
func (*MockCollection) ValidIndex ¶
func (_m *MockCollection) ValidIndex(_a0 int) bool
ValidIndex provides a mock function with given fields: _a0
type MockOptions ¶
MockOptions is an autogenerated mock type for the Options type
func (*MockOptions) AllKeys ¶
func (_m *MockOptions) AllKeys() []string
AllKeys provides a mock function with given fields:
func (*MockOptions) Get ¶
func (_m *MockOptions) Get(_a0 string) interface{}
Get provides a mock function with given fields: _a0
func (*MockOptions) GetBool ¶
func (_m *MockOptions) GetBool(_a0 string) bool
GetBool provides a mock function with given fields: _a0
func (*MockOptions) GetInt ¶
func (_m *MockOptions) GetInt(_a0 string) int
GetInt provides a mock function with given fields: _a0
func (*MockOptions) GetString ¶
func (_m *MockOptions) GetString(_a0 string) string
GetString provides a mock function with given fields: _a0
func (*MockOptions) Set ¶
func (_m *MockOptions) Set(_a0 string, _a1 interface{})
Set provides a mock function with given fields: _a0, _a1
type MockTableWidget ¶
MockTableWidget is an autogenerated mock type for the TableWidget type
func (*MockTableWidget) ColumnNames ¶
func (_m *MockTableWidget) ColumnNames() []string
ColumnNames provides a mock function with given fields:
func (*MockTableWidget) GetVisibleBoundaries ¶
func (_m *MockTableWidget) GetVisibleBoundaries() (int, int)
GetVisibleBoundaries provides a mock function with given fields:
func (*MockTableWidget) List ¶
func (_m *MockTableWidget) List() list.List
List provides a mock function with given fields:
func (*MockTableWidget) PositionReadout ¶
func (_m *MockTableWidget) PositionReadout() string
PositionReadout provides a mock function with given fields:
func (*MockTableWidget) ScrollViewport ¶
func (_m *MockTableWidget) ScrollViewport(_a0 int, _a1 bool)
ScrollViewport provides a mock function with given fields: _a0, _a1
func (*MockTableWidget) SetColumns ¶
func (_m *MockTableWidget) SetColumns(_a0 []string)
SetColumns provides a mock function with given fields: _a0
func (*MockTableWidget) SetList ¶
func (_m *MockTableWidget) SetList(_a0 list.List)
SetList provides a mock function with given fields: _a0
func (*MockTableWidget) Size ¶
func (_m *MockTableWidget) Size() (int, int)
Size provides a mock function with given fields:
type MockUI ¶
MockUI is an autogenerated mock type for the UI type
func (*MockUI) Refresh ¶
func (_m *MockUI) Refresh()
Refresh provides a mock function with given fields:
func (*MockUI) TableWidget ¶
func (_m *MockUI) TableWidget() TableWidget
TableWidget provides a mock function with given fields:
type TableWidget ¶
type UI ¶
type UI interface { Refresh() TableWidget() TableWidget }