Versions in this module Expand all Collapse all v1 v1.5.1 Jul 28, 2024 v1.5.0 Jul 9, 2024 Changes in this version + const SubStreamEvents + const SubStreamStatus + var IndexInstance = NewIndex() + func HandleStopGame(platform platforms.Platform) http.HandlerFunc + func LoggerMiddleware(logger *zerolog.Logger) func(next http.Handler) http.Handler + func RunApiServer(pl platforms.Platform, cfg *config.UserConfig, st *state.State, ...) + type AddMappingRequest struct + Enabled bool + Label string + Match string + Override string + Pattern string + Type string + func (amr *AddMappingRequest) Bind(r *http.Request) error + type AllMappingsResponse struct + Mappings []MappingResponse + func (amr *AllMappingsResponse) Render(w http.ResponseWriter, r *http.Request) error + type HistoryReponseEntry struct + Data string + Success bool + Text string + Time time.Time + Type string + UID string + type HistoryResponse struct + Entries []HistoryReponseEntry + func (hr *HistoryResponse) Render(w http.ResponseWriter, r *http.Request) error + type Index struct + CurrentDesc string + CurrentStep int + Indexing bool + TotalFiles int + TotalSteps int + func NewIndex() *Index + func (s *Index) Exists(platform platforms.Platform) bool + func (s *Index) GenerateIndex(platform platforms.Platform, cfg *config.UserConfig) + func (s *Index) SetEventHook(hook *func(st *Index)) + type IndexResponse struct + CurrentDesc string + CurrentStep int + Exists bool + Indexing bool + TotalFiles int + TotalSteps int + type LaunchRequest struct + Data string + Metadata *LaunchRequestMetadata + Text string + Type string + UID string + func (lr *LaunchRequest) Bind(r *http.Request) error + type LaunchRequestMetadata struct + ToyModel *string + type MappingResponse struct + Added string + type PlayingResponse struct + Game string + GameName string + GamePath string + System string + SystemName string + type ReaderResponse struct + Connected bool + Device string + Info string + type ReaderStatusResponse struct + Connected bool + Type string + type ReaderWriteRequest struct + Text string + func (rwr *ReaderWriteRequest) Bind(r *http.Request) error + type SearchResultGame struct + Name string + Path string + System System + type SearchResults struct + Results []SearchResultGame + Total int + func (sr *SearchResults) Render(w http.ResponseWriter, r *http.Request) error + type SettingsResponse struct + AllowCommands bool + ConnectionString string + Debug bool + DisableSounds bool + ExitGame bool + ExitGameBlocklist []string + ExitGameDelay int8 + Launching bool + ProbeDevice bool + func (sr *SettingsResponse) Render(w http.ResponseWriter, r *http.Request) error + type StatusResponse struct + ActiveToken TokenResponse + GamesIndex IndexResponse + LastToken TokenResponse + Launching bool + Playing PlayingResponse + Reader ReaderStatusResponse + Readers []ReaderResponse + func (sr *StatusResponse) Render(w http.ResponseWriter, r *http.Request) error + type System struct + Category string + Id string + Name string + type SystemsResponse struct + Systems []System + func (sr *SystemsResponse) Render(w http.ResponseWriter, _ *http.Request) error + type TokenResponse struct + Data string + ScanTime time.Time + Text string + Type string + UID string + type UpdateMappingRequest struct + Enabled *bool + Label *string + Match *string + Override *string + Pattern *string + Type *string + func (umr *UpdateMappingRequest) Bind(r *http.Request) error + type UpdateSettingsRequest struct + AllowCommands *bool + ConnectionString *string + Debug *bool + DisableSounds *bool + ExitGame *bool + ExitGameBlocklist *[]string + ExitGameDelay *int8 + Launching *bool + ProbeDevice *bool + func (usr *UpdateSettingsRequest) Bind(r *http.Request) error + type VersionResponse struct + Platform string + Version string + func (vr *VersionResponse) Render(w http.ResponseWriter, r *http.Request) error