Documentation
¶
Index ¶
- Constants
- type ActiveMedia
- type AddMappingParams
- type AllMappingsResponse
- type ClientResponse
- type DeleteClientParams
- type DeleteMappingParams
- type ErrorObject
- type HistoryResponse
- type HistoryResponseEntry
- type IndexingStatusResponse
- type LogDownloadResponse
- type MappingResponse
- type MediaIndexParams
- type MediaResponse
- type MediaStartedParams
- type NewClientParams
- type Notification
- type PaginationInfo
- type PlaytimeLimitReachedParams
- type PlaytimeLimitWarningParams
- type PlaytimeLimitsResponse
- type PlaytimeStatusResponse
- type ReaderInfo
- type ReaderResponse
- type ReaderWriteParams
- type ReadersResponse
- type RequestObject
- type ResponseErrorObject
- type ResponseObject
- type RunParams
- type RunScriptParams
- type SearchParams
- type SearchResultMedia
- type SearchResults
- type SettingsResponse
- type System
- type SystemsResponse
- type TagsResponse
- type TokenResponse
- type TokensResponse
- type UpdateActiveMediaParams
- type UpdateMappingParams
- type UpdatePlaytimeLimitsParams
- type UpdateSettingsParams
- type VersionResponse
Constants ¶
View Source
const ( NotificationReadersConnected = "readers.added" NotificationReadersDisconnected = "readers.removed" NotificationRunning = "running" NotificationTokensAdded = "tokens.added" NotificationTokensRemoved = "tokens.removed" NotificationStopped = "media.stopped" NotificationStarted = "media.started" NotificationMediaIndexing = "media.indexing" // TODO: rename to generating NotificationPlaytimeLimitReached = "playtime.limit.reached" NotificationPlaytimeLimitWarning = "playtime.limit.warning" )
View Source
const ( PlaytimeLimitReasonSession = "session" PlaytimeLimitReasonDaily = "daily" )
View Source
const ( MethodLaunch = "launch" // DEPRECATED MethodRun = "run" MethodRunScript = "run.script" MethodStop = "stop" MethodTokens = "tokens" MethodMedia = "media" MethodMediaGenerate = "media.generate" MethodMediaGenerateCancel = "media.generate.cancel" MethodMediaIndex = "media.index" // DEPRECATED MethodMediaSearch = "media.search" MethodMediaTags = "media.tags" MethodMediaActive = "media.active" MethodMediaActiveUpdate = "media.active.update" MethodSettings = "settings" MethodSettingsUpdate = "settings.update" MethodSettingsReload = "settings.reload" MethodSettingsLogsDownload = "settings.logs.download" MethodPlaytimeLimits = "settings.playtime.limits" MethodPlaytimeLimitsUpdate = "settings.playtime.limits.update" MethodPlaytime = "playtime" MethodClients = "clients" MethodClientsNew = "clients.new" MethodClientsDelete = "clients.delete" MethodSystems = "systems" MethodLaunchersRefresh = "launchers.refresh" MethodHistory = "tokens.history" MethodMappings = "mappings" MethodMappingsNew = "mappings.new" MethodMappingsDelete = "mappings.delete" MethodMappingsUpdate = "mappings.update" MethodMappingsReload = "mappings.reload" MethodReaders = "readers" MethodReadersWrite = "readers.write" MethodReadersWriteCancel = "readers.write.cancel" MethodVersion = "version" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveMedia ¶
type ActiveMedia struct {
Started time.Time `json:"started"`
LauncherID string `json:"launcherId"`
SystemID string `json:"systemId"`
SystemName string `json:"systemName"`
Path string `json:"mediaPath"`
Name string `json:"mediaName"`
}
func NewActiveMedia ¶ added in v2.7.0
func NewActiveMedia(systemID, systemName, path, name, launcherID string) *ActiveMedia
NewActiveMedia creates a new ActiveMedia with the current timestamp.
func (*ActiveMedia) Equal ¶
func (a *ActiveMedia) Equal(with *ActiveMedia) bool
type AddMappingParams ¶
type AllMappingsResponse ¶
type AllMappingsResponse struct {
Mappings []MappingResponse `json:"mappings"`
}
type ClientResponse ¶
type DeleteClientParams ¶
type DeleteClientParams struct {
ID string `json:"id"`
}
type DeleteMappingParams ¶
type DeleteMappingParams struct {
ID int `json:"id"`
}
type ErrorObject ¶
type HistoryResponse ¶
type HistoryResponse struct {
Entries []HistoryResponseEntry `json:"entries"`
}
type HistoryResponseEntry ¶
type IndexingStatusResponse ¶
type IndexingStatusResponse struct {
TotalSteps *int `json:"totalSteps,omitempty"`
CurrentStep *int `json:"currentStep,omitempty"`
CurrentStepDisplay *string `json:"currentStepDisplay,omitempty"`
TotalFiles *int `json:"totalFiles,omitempty"`
TotalMedia *int `json:"totalMedia,omitempty"`
Exists bool `json:"exists"`
Indexing bool `json:"indexing"`
Optimizing bool `json:"optimizing"`
}
type LogDownloadResponse ¶
type MappingResponse ¶
type MediaIndexParams ¶
type MediaIndexParams struct {
Systems *[]string `json:"systems"`
}
type MediaResponse ¶
type MediaResponse struct {
Database IndexingStatusResponse `json:"database"`
Active []ActiveMedia `json:"active"`
}
type MediaStartedParams ¶
type NewClientParams ¶
type NewClientParams struct {
Name string `json:"name"`
}
type Notification ¶
type Notification struct {
Method string `json:"method"`
Params json.RawMessage `json:"params"`
}
type PaginationInfo ¶ added in v2.7.0
type PlaytimeLimitReachedParams ¶ added in v2.7.0
type PlaytimeLimitReachedParams struct {
Reason string `json:"reason"`
}
type PlaytimeLimitWarningParams ¶ added in v2.7.0
type PlaytimeLimitsResponse ¶ added in v2.7.0
type PlaytimeStatusResponse ¶ added in v2.7.0
type PlaytimeStatusResponse struct {
SessionStarted *string `json:"sessionStarted,omitempty"`
SessionDuration *string `json:"sessionDuration,omitempty"`
SessionCumulativeTime *string `json:"sessionCumulativeTime,omitempty"`
SessionRemaining *string `json:"sessionRemaining,omitempty"`
CooldownRemaining *string `json:"cooldownRemaining,omitempty"`
DailyUsageToday *string `json:"dailyUsageToday,omitempty"`
DailyRemaining *string `json:"dailyRemaining,omitempty"`
State string `json:"state"`
SessionActive bool `json:"sessionActive"`
LimitsEnabled bool `json:"limitsEnabled"`
}
type ReaderInfo ¶
type ReaderResponse ¶
type ReaderWriteParams ¶
type ReaderWriteParams struct {
Text string `json:"text"`
}
type ReadersResponse ¶
type ReadersResponse struct {
Readers []ReaderInfo `json:"readers"`
}
type RequestObject ¶
type ResponseErrorObject ¶
type ResponseErrorObject struct {
Error *ErrorObject `json:"error"`
JSONRPC string `json:"jsonrpc"`
ID uuid.UUID `json:"id"`
}
ResponseErrorObject exists for sending errors, so we can omit result from the response, but so nil responses are still returned when using the main ResponseObject.
type ResponseObject ¶
type ResponseObject struct {
Result any `json:"result"`
Error *ErrorObject `json:"error,omitempty"`
JSONRPC string `json:"jsonrpc"`
ID uuid.UUID `json:"id"`
}
type RunScriptParams ¶
type RunScriptParams struct {
Name *string `json:"name"`
Cmds []models.ZapScriptCmd `json:"cmds"`
ZapScript int `json:"zapscript"`
Unsafe bool `json:"unsafe"`
}
type SearchParams ¶
type SearchResultMedia ¶
type SearchResults ¶
type SearchResults struct {
Pagination *PaginationInfo `json:"pagination,omitempty"`
Results []SearchResultMedia `json:"results"`
Total int `json:"total"`
}
type SettingsResponse ¶
type SettingsResponse struct {
ReadersScanMode string `json:"readersScanMode"`
ReadersScanIgnoreSystem []string `json:"readersScanIgnoreSystems"`
ReadersScanExitDelay float32 `json:"readersScanExitDelay"`
RunZapScript bool `json:"runZapScript"`
DebugLogging bool `json:"debugLogging"`
AudioScanFeedback bool `json:"audioScanFeedback"`
ReadersAutoDetect bool `json:"readersAutoDetect"`
}
type SystemsResponse ¶
type SystemsResponse struct {
Systems []System `json:"systems"`
}
type TagsResponse ¶ added in v2.7.0
type TokenResponse ¶
type TokensResponse ¶
type TokensResponse struct {
Last *TokenResponse `json:"last,omitempty"`
Active []TokenResponse `json:"active"`
}
type UpdateActiveMediaParams ¶
type UpdateMappingParams ¶
type UpdatePlaytimeLimitsParams ¶ added in v2.7.0
type UpdateSettingsParams ¶
type UpdateSettingsParams struct {
RunZapScript *bool `json:"runZapScript"`
DebugLogging *bool `json:"debugLogging"`
AudioScanFeedback *bool `json:"audioScanFeedback"`
ReadersAutoDetect *bool `json:"readersAutoDetect"`
ReadersScanMode *string `json:"readersScanMode"`
ReadersScanExitDelay *float32 `json:"readersScanExitDelay"`
ReadersScanIgnoreSystem *[]string `json:"readersScanIgnoreSystems"`
}
type VersionResponse ¶
Click to show internal directories.
Click to hide internal directories.