models

package
v2.11.0-beta2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

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
	NotificationTokensStaged         = "tokens.staged"
	NotificationTokensStagedReady    = "tokens.staged.ready" //nolint:gosec // not a credential
	NotificationPlaytimeLimitReached = "playtime.limit.reached"
	NotificationPlaytimeLimitWarning = "playtime.limit.warning"
	NotificationInboxAdded           = "inbox.added"
	NotificationClientsPaired        = "clients.paired"
)
View Source
const (
	PlaytimeLimitReasonSession = "session"
	PlaytimeLimitReasonDaily   = "daily"
)
View Source
const (
	MethodLaunch               = "launch" // DEPRECATED
	MethodRun                  = "run"
	MethodConfirm              = "confirm"
	MethodRunScript            = "run.script"
	MethodStop                 = "stop"
	MethodTokens               = "tokens"
	MethodMedia                = "media"
	MethodMediaGenerate        = "media.generate"
	MethodMediaGenerateCancel  = "media.generate.cancel"
	MethodMediaGenerateResume  = "media.generate.resume"
	MethodMediaIndex           = "media.index" // DEPRECATED
	MethodMediaSearch          = "media.search"
	MethodMediaTags            = "media.tags"
	MethodMediaActive          = "media.active"
	MethodMediaHistory         = "media.history"
	MethodMediaHistoryTop      = "media.history.top"
	MethodMediaLookup          = "media.lookup"
	MethodMediaBrowse          = "media.browse"
	MethodMediaControl         = "media.control"
	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"
	MethodClientsDelete        = "clients.delete"
	MethodClientsPairStart     = "clients.pair.start"
	MethodClientsPairCancel    = "clients.pair.cancel"
	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"
	MethodHealthCheck          = "health"
	MethodInbox                = "inbox"
	MethodInboxDelete          = "inbox.delete"
	MethodInboxClear           = "inbox.clear"
	MethodSettingsAuthClaim    = "settings.auth.claim"
	MethodUpdateCheck          = "update.check"
	MethodUpdateApply          = "update.apply"
	MethodInputKeyboard        = "input.keyboard"
	MethodInputGamepad         = "input.gamepad"
	MethodScreenshot           = "screenshot"
)

Variables

View Source
var ErrInvalidRPCID = errors.New("JSON-RPC ID cannot be an object or array")

ErrInvalidRPCID is returned when an ID is an object or array.

View Source
var NullRPCID = RPCID{RawMessage: []byte("null")}

NullRPCID represents a null JSON-RPC ID.

Functions

func ClientErr added in v2.11.0

func ClientErr(err error) error

ClientErr wraps an error as a ClientError.

func ClientErrf added in v2.11.0

func ClientErrf(format string, a ...any) error

ClientErrf creates a new formatted ClientError.

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"`
	LauncherControls []string  `json:"launcherControls,omitempty"`
}

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 ActiveMediaResponse added in v2.9.0

type ActiveMediaResponse struct {
	ZapScript string `json:"zapScript"`
	ActiveMedia
}

ActiveMediaResponse is the API response type for active media, including ZapScript.

type AddMappingParams

type AddMappingParams struct {
	Label    string `json:"label" validate:"max=255"`
	Type     string `json:"type" validate:"required,oneof=id value data uid text"`
	Match    string `json:"match" validate:"required,oneof=exact partial regex"`
	Pattern  string `json:"pattern" validate:"required"`
	Override string `json:"override"`
	Enabled  bool   `json:"enabled"`
}

type AllMappingsResponse

type AllMappingsResponse struct {
	Mappings []MappingResponse `json:"mappings"`
}

type BrowseEntry added in v2.10.0

type BrowseEntry struct {
	SystemID  *string            `json:"systemId,omitempty"`
	RelPath   *string            `json:"relativePath,omitempty"`
	ZapScript *string            `json:"zapScript,omitempty"`
	FileCount *int               `json:"fileCount,omitempty"`
	Group     *string            `json:"group,omitempty"`
	Name      string             `json:"name"`
	Path      string             `json:"path"`
	Type      string             `json:"type"`
	Tags      []database.TagInfo `json:"tags,omitempty"`
}

type BrowseParams added in v2.10.0

type BrowseParams struct {
	Path       *string `json:"path,omitempty"`
	MaxResults *int    `json:"maxResults,omitempty" validate:"omitempty,gt=0,max=1000"`
	Cursor     *string `json:"cursor,omitempty"`
	Letter     *string `json:"letter,omitempty" validate:"omitempty,letter"`
	Sort       *string `json:"sort,omitempty" validate:"omitempty,oneof=name-asc name-desc filename-asc filename-desc"`
}

type BrowseResults added in v2.10.0

type BrowseResults struct {
	Pagination *PaginationInfo `json:"pagination,omitempty"`
	Path       string          `json:"path"`
	Entries    []BrowseEntry   `json:"entries"`
	TotalFiles int             `json:"totalFiles"`
}

type ClientError added in v2.11.0

type ClientError struct {
	Err error
}

ClientError wraps an error to indicate it is an expected client-facing error (bad input, validation failure, expected operational state) rather than an internal server error. The API server uses this to log at Warn level instead of Error, keeping expected failures out of Sentry.

func (*ClientError) Error added in v2.11.0

func (e *ClientError) Error() string

func (*ClientError) Unwrap added in v2.11.0

func (e *ClientError) Unwrap() error

type ClientResponse

type ClientResponse struct {
	Name    string    `json:"name"`
	Address string    `json:"address"`
	Secret  string    `json:"secret"` //nolint:gosec // G117: pairing secret, not a credential
	ID      uuid.UUID `json:"id"`
}

type ClientsDeleteParams added in v2.11.0

type ClientsDeleteParams struct {
	ClientID string `json:"clientId"`
}

ClientsDeleteParams is the parameters object for the clients.delete RPC method.

type ClientsPairStartResponse added in v2.11.0

type ClientsPairStartResponse struct {
	PIN       string `json:"pin"`
	ExpiresAt int64  `json:"expiresAt"`
}

ClientsPairStartResponse is the response for the clients.pair.start RPC method.

type ClientsPairedNotification added in v2.11.0

type ClientsPairedNotification struct {
	ClientID   string `json:"clientId"`
	ClientName string `json:"clientName"`
}

ClientsPairedNotification is the payload for the clients.paired notification, broadcast when a client successfully completes the PAKE pairing flow.

type ClientsResponse added in v2.11.0

type ClientsResponse struct {
	Clients []PairedClient `json:"clients"`
}

ClientsResponse is the response for the clients RPC method.

type DeleteClientParams

type DeleteClientParams struct {
	ID string `json:"id" validate:"required,min=1"`
}

type DeleteInboxParams added in v2.8.0

type DeleteInboxParams struct {
	ID int64 `json:"id" validate:"gt=0"`
}

type DeleteMappingParams

type DeleteMappingParams struct {
	ID int `json:"id" validate:"gt=0"`
}

type ErrorObject

type ErrorObject struct {
	// Data is optional structured detail about the error. Per JSON-RPC 2.0
	// §5.1 it MUST be a member of the error object, not a sibling.
	Data    any    `json:"data,omitempty"`
	Message string `json:"message"`
	Code    int    `json:"code"`
}

type HealthCheckResponse added in v2.7.1

type HealthCheckResponse struct {
	Status string `json:"status"`
}

type HistoryResponse

type HistoryResponse struct {
	Entries []HistoryResponseEntry `json:"entries"`
}

type HistoryResponseEntry

type HistoryResponseEntry struct {
	Time    time.Time `json:"time"`
	Type    string    `json:"type"`
	UID     string    `json:"uid"`
	Text    string    `json:"text"`
	Data    string    `json:"data"`
	Success bool      `json:"success"`
}

type InboxMessage added in v2.8.0

type InboxMessage struct {
	CreatedAt time.Time `json:"createdAt"`
	Title     string    `json:"title"`
	Body      string    `json:"body,omitempty"`
	Category  string    `json:"category,omitempty"`
	ID        int64     `json:"id"`
	Severity  int       `json:"severity"`
	ProfileID int64     `json:"profileId,omitempty"`
}

type InboxResponse added in v2.8.0

type InboxResponse struct {
	Messages []InboxMessage `json:"messages"`
}

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"`
	Paused             bool    `json:"paused"`
}

type InputGamepadParams added in v2.10.0

type InputGamepadParams struct {
	Buttons string `json:"buttons" validate:"required,min=1"`
}

type InputKeyboardParams added in v2.10.0

type InputKeyboardParams struct {
	Keys string `json:"keys" validate:"required,min=1"`
}

type LogDownloadResponse

type LogDownloadResponse struct {
	Filename string `json:"filename"`
	Content  string `json:"content"`
	Size     int    `json:"size"`
}

type MappingResponse

type MappingResponse struct {
	ID       string `json:"id"`
	Added    string `json:"added"`
	Label    string `json:"label"`
	Type     string `json:"type"`
	Match    string `json:"match"`
	Pattern  string `json:"pattern"`
	Override string `json:"override"`
	Enabled  bool   `json:"enabled"`
}

type MediaControlParams added in v2.10.0

type MediaControlParams struct {
	Args   map[string]string `json:"args,omitempty"`
	Action string            `json:"action" validate:"required,min=1"`
}

type MediaHistoryParams added in v2.10.0

type MediaHistoryParams struct {
	Systems     *[]string `json:"systems,omitempty" validate:"omitempty,dive,min=1"`
	FuzzySystem *bool     `json:"fuzzySystem,omitempty"`
	Limit       *int      `json:"limit,omitempty" validate:"omitempty,gt=0,max=100"`
	Cursor      *string   `json:"cursor,omitempty"`
}

type MediaHistoryResponse added in v2.10.0

type MediaHistoryResponse struct {
	Pagination *PaginationInfo             `json:"pagination,omitempty"`
	Entries    []MediaHistoryResponseEntry `json:"entries"`
}

type MediaHistoryResponseEntry added in v2.10.0

type MediaHistoryResponseEntry struct {
	EndedAt    *string `json:"endedAt,omitempty"`
	SystemID   string  `json:"systemId"`
	SystemName string  `json:"systemName"`
	MediaName  string  `json:"mediaName"`
	MediaPath  string  `json:"mediaPath"`
	LauncherID string  `json:"launcherId"`
	StartedAt  string  `json:"startedAt"`
	PlayTime   int     `json:"playTime"`
}

type MediaHistoryTopEntry added in v2.10.0

type MediaHistoryTopEntry struct {
	SystemID      string `json:"systemId"`
	SystemName    string `json:"systemName"`
	MediaName     string `json:"mediaName"`
	MediaPath     string `json:"mediaPath"`
	LastPlayedAt  string `json:"lastPlayedAt"`
	TotalPlayTime int    `json:"totalPlayTime"`
	SessionCount  int    `json:"sessionCount"`
}

type MediaHistoryTopParams added in v2.10.0

type MediaHistoryTopParams struct {
	Systems     *[]string `json:"systems,omitempty" validate:"omitempty,dive,min=1"`
	FuzzySystem *bool     `json:"fuzzySystem,omitempty"`
	Since       *string   `json:"since,omitempty"`
	Limit       *int      `json:"limit,omitempty" validate:"omitempty,gt=0,max=100"`
}

type MediaHistoryTopResponse added in v2.10.0

type MediaHistoryTopResponse struct {
	Entries []MediaHistoryTopEntry `json:"entries"`
}

type MediaIndexParams

type MediaIndexParams struct {
	Systems     *[]string `json:"systems" validate:"omitempty,dive,min=1"`
	FuzzySystem *bool     `json:"fuzzySystem,omitempty"`
}

type MediaLookupMatch added in v2.10.0

type MediaLookupMatch struct {
	System     System             `json:"system"`
	Name       string             `json:"name"`
	Path       string             `json:"path"`
	ZapScript  string             `json:"zapScript"`
	Tags       []database.TagInfo `json:"tags"`
	Confidence float64            `json:"confidence"`
}

type MediaLookupParams added in v2.10.0

type MediaLookupParams struct {
	FuzzySystem *bool  `json:"fuzzySystem,omitempty"`
	Name        string `json:"name" validate:"required,min=1"`
	System      string `json:"system" validate:"required,min=1"`
}

type MediaLookupResponse added in v2.10.0

type MediaLookupResponse struct {
	Match *MediaLookupMatch `json:"match"`
}

type MediaResponse

type MediaResponse struct {
	Database IndexingStatusResponse `json:"database"`
	Active   []ActiveMediaResponse  `json:"active"`
}

type MediaStartedParams

type MediaStartedParams struct {
	SystemID   string `json:"systemId" validate:"required"`
	SystemName string `json:"systemName" validate:"required"`
	MediaPath  string `json:"mediaPath" validate:"required"`
	MediaName  string `json:"mediaName" validate:"required"`
}

type MediaStoppedParams added in v2.10.0

type MediaStoppedParams struct {
	SystemID   string `json:"systemId"`
	SystemName string `json:"systemName"`
	MediaName  string `json:"mediaName"`
	MediaPath  string `json:"mediaPath"`
	LauncherID string `json:"launcherId"`
	Elapsed    int    `json:"elapsed"`
}

type NewClientParams

type NewClientParams struct {
	Name string `json:"name" validate:"required,min=1,max=255"`
}

type Notification

type Notification struct {
	Method string          `json:"method"`
	Params json.RawMessage `json:"params"`
}

type NotificationObject added in v2.9.0

type NotificationObject struct {
	JSONRPC string          `json:"jsonrpc"`
	Method  string          `json:"method"`
	Params  json.RawMessage `json:"params,omitempty"`
}

type PaginationInfo added in v2.7.0

type PaginationInfo struct {
	NextCursor  *string `json:"nextCursor,omitempty"`
	HasNextPage bool    `json:"hasNextPage"`
	PageSize    int     `json:"pageSize"`
}

type PairedClient added in v2.11.0

type PairedClient struct {
	ClientID   string `json:"clientId"`
	ClientName string `json:"clientName"`
	CreatedAt  int64  `json:"createdAt"`
	LastSeenAt int64  `json:"lastSeenAt"`
}

PairedClient represents a client paired via the API encryption flow. PairingKey and AuthToken are intentionally omitted from the public API surface — only the metadata identifying the client is exposed.

type PlaytimeLimitReachedParams added in v2.7.0

type PlaytimeLimitReachedParams struct {
	Reason string `json:"reason"`
}

type PlaytimeLimitWarningParams added in v2.7.0

type PlaytimeLimitWarningParams struct {
	Interval  string `json:"interval"`
	Remaining string `json:"remaining"`
}

type PlaytimeLimitsResponse added in v2.7.0

type PlaytimeLimitsResponse struct {
	Daily        *string  `json:"daily,omitempty"`
	Session      *string  `json:"session,omitempty"`
	SessionReset *string  `json:"sessionReset,omitempty"`
	Retention    *int     `json:"retention,omitempty"`
	Warnings     []string `json:"warnings,omitempty"`
	Enabled      bool     `json:"enabled"`
}

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 RPCID added in v2.8.0

type RPCID struct {
	json.RawMessage
}

RPCID represents a JSON-RPC 2.0 request/response ID. Per spec, ID can be a String, Number, or Null value. We use json.RawMessage to preserve the exact JSON representation, ensuring IDs are echoed back exactly as received.

func NewNumberID added in v2.8.0

func NewNumberID(n int64) RPCID

NewNumberID creates an RPCID from an integer value.

func NewStringID added in v2.8.0

func NewStringID(s string) RPCID

NewStringID creates an RPCID from a string value.

func (*RPCID) Equal added in v2.8.0

func (id *RPCID) Equal(other RPCID) bool

Equal compares two RPCIDs for byte-level equality.

func (*RPCID) IsAbsent added in v2.8.0

func (id *RPCID) IsAbsent() bool

IsAbsent returns true if the ID field was not present in the JSON. This indicates a notification in JSON-RPC 2.0.

func (*RPCID) IsAbsentOrNull added in v2.8.0

func (id *RPCID) IsAbsentOrNull() bool

IsAbsentOrNull returns true if the ID is either absent or explicitly null. For JSON-RPC 2.0, absent means notification (no response), while null means request with null ID (must respond). Use IsAbsent() to distinguish.

func (*RPCID) IsNull added in v2.8.0

func (id *RPCID) IsNull() bool

IsNull returns true if the ID is explicitly JSON null. Note: This returns false for absent IDs - use IsAbsent() for that.

func (*RPCID) Key added in v2.8.0

func (id *RPCID) Key() string

Key returns a string suitable for use as a map key. This is the raw JSON representation of the ID.

func (RPCID) MarshalJSON added in v2.8.0

func (id RPCID) MarshalJSON() ([]byte, error)

MarshalJSON returns the raw JSON bytes of the ID.

func (*RPCID) String added in v2.8.0

func (id *RPCID) String() string

String returns the string representation for logging/debugging. Note: If the ID is a JSON string "foo", this returns "foo" (with quotes).

func (*RPCID) UnmarshalJSON added in v2.8.0

func (id *RPCID) UnmarshalJSON(data []byte) error

UnmarshalJSON enforces JSON-RPC 2.0 spec compliance by rejecting objects and arrays as ID values at parse time.

type ReaderConnection added in v2.9.0

type ReaderConnection struct {
	Enabled  *bool  `json:"enabled,omitempty"`
	Driver   string `json:"driver" validate:"required,min=1"`
	Path     string `json:"path"`
	IDSource string `json:"idSource,omitempty"`
}

func (ReaderConnection) IsEnabled added in v2.11.0

func (r ReaderConnection) IsEnabled() bool

IsEnabled returns whether this connection is enabled. nil (omitted) and true both mean enabled; only explicit false disables.

type ReaderInfo

type ReaderInfo struct {
	ID           string   `json:"id"`
	ReaderID     string   `json:"readerId"`
	Driver       string   `json:"driver"`
	Info         string   `json:"info"`
	Capabilities []string `json:"capabilities"`
	Connected    bool     `json:"connected"`
}

type ReaderResponse

type ReaderResponse struct {
	Driver    string `json:"driver"`
	Path      string `json:"path"`
	Connected bool   `json:"connected"`
}

type ReaderWriteCancelParams added in v2.9.0

type ReaderWriteCancelParams struct {
	ReaderID *string `json:"readerId,omitempty"`
}

type ReaderWriteParams

type ReaderWriteParams struct {
	ReaderID *string `json:"readerId,omitempty"`
	Text     string  `json:"text" validate:"required"`
}

type ReadersResponse

type ReadersResponse struct {
	Readers []ReaderInfo `json:"readers"`
}

type RequestObject

type RequestObject struct {
	JSONRPC string          `json:"jsonrpc"`
	ID      RPCID           `json:"id,omitempty"`
	Method  string          `json:"method"`
	Params  json.RawMessage `json:"params,omitempty"`
}

type ResponseErrorObject

type ResponseErrorObject struct {
	Error   *ErrorObject `json:"error"`
	JSONRPC string       `json:"jsonrpc"`
	ID      RPCID        `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      RPCID        `json:"id"`
}

type ResponseWithCallback added in v2.10.0

type ResponseWithCallback struct {
	Result     any
	AfterWrite func()
}

ResponseWithCallback wraps a method result with a function that should be called after the response has been written to the client. This allows handlers to defer side effects (like triggering a restart) until the client has received the response, without relying on arbitrary sleep timers.

type RunParams

type RunParams struct {
	Type   *string `json:"type"`
	UID    *string `json:"uid"`
	Text   *string `json:"text"`
	Data   *string `json:"data" validate:"omitempty,hexdata"`
	Unsafe bool    `json:"unsafe"`
}

type RunScriptParams

type RunScriptParams struct {
	Name      *string                  `json:"name"`
	Cmds      []zapscript.ZapScriptCmd `json:"cmds"`
	ZapScript int                      `json:"zapscript"`
	Unsafe    bool                     `json:"unsafe"`
}

type ScreenshotResponse added in v2.10.0

type ScreenshotResponse struct {
	Path string `json:"path"`
	Data string `json:"data"` // base64 encoded
	Size int    `json:"size"` // original byte count
}

type SearchParams

type SearchParams struct {
	Systems     *[]string `json:"systems" validate:"omitempty,dive,min=1"`
	FuzzySystem *bool     `json:"fuzzySystem,omitempty"`
	MaxResults  *int      `json:"maxResults" validate:"omitempty,gt=0,max=1000"`
	Cursor      *string   `json:"cursor,omitempty"`
	Tags        *[]string `json:"tags,omitempty" validate:"omitempty,dive,min=1"`
	Letter      *string   `json:"letter,omitempty" validate:"omitempty,letter"`
	Query       *string   `json:"query"`
}

type SearchResultMedia

type SearchResultMedia struct {
	System    System             `json:"system"`
	Name      string             `json:"name"`
	Path      string             `json:"path"`
	ZapScript string             `json:"zapScript"`
	Tags      []database.TagInfo `json:"tags"`
}

type SearchResults

type SearchResults struct {
	Pagination *PaginationInfo     `json:"pagination,omitempty"`
	Results    []SearchResultMedia `json:"results"`
	Total      int                 `json:"total"`
}

type SettingsAuthClaimParams added in v2.10.0

type SettingsAuthClaimParams struct {
	ClaimURL string `json:"claimUrl" validate:"required,url"`
	Token    string `json:"token" validate:"required"`
}

type SettingsAuthClaimResponse added in v2.10.0

type SettingsAuthClaimResponse struct {
	Domains []string `json:"domains"`
}

type SettingsResponse

type SettingsResponse struct {
	UpdateChannel             string             `json:"updateChannel"`
	ReadersScanMode           string             `json:"readersScanMode"`
	ReadersScanIgnoreSystem   []string           `json:"readersScanIgnoreSystems"`
	ReadersConnect            []ReaderConnection `json:"readersConnect"`
	ReadersScanExitDelay      float32            `json:"readersScanExitDelay"`
	LaunchGuardTimeout        float32            `json:"launchGuardTimeout"`
	LaunchGuardDelay          float32            `json:"launchGuardDelay"`
	AudioVolume               int                `json:"audioVolume"`
	RunZapScript              bool               `json:"runZapScript"`
	DebugLogging              bool               `json:"debugLogging"`
	AudioScanFeedback         bool               `json:"audioScanFeedback"`
	ReadersAutoDetect         bool               `json:"readersAutoDetect"`
	ErrorReporting            bool               `json:"errorReporting"`
	LaunchGuardEnabled        bool               `json:"launchGuardEnabled"`
	LaunchGuardRequireConfirm bool               `json:"launchGuardRequireConfirm"`
}

type System

type System struct {
	ReleaseDate  *string `json:"releaseDate,omitempty"`
	Manufacturer *string `json:"manufacturer,omitempty"`
	ID           string  `json:"id,omitempty"`
	Name         string  `json:"name,omitempty"`
	Category     string  `json:"category,omitempty"`
}

type SystemsResponse

type SystemsResponse struct {
	Systems []System `json:"systems"`
}

type TagsResponse added in v2.7.0

type TagsResponse struct {
	Tags []database.TagInfo `json:"tags"`
}

type TokenResponse

type TokenResponse struct {
	ScanTime time.Time `json:"scanTime"`
	Type     string    `json:"type"`
	UID      string    `json:"uid"`
	Text     string    `json:"text"`
	Data     string    `json:"data"`
	ReaderID string    `json:"readerId,omitempty"`
}

type TokensResponse

type TokensResponse struct {
	Last   *TokenResponse  `json:"last,omitempty"`
	Active []TokenResponse `json:"active"`
}

type UpdateActiveMediaParams

type UpdateActiveMediaParams struct {
	SystemID  string `json:"systemId" validate:"required"`
	MediaPath string `json:"mediaPath" validate:"required"`
	MediaName string `json:"mediaName" validate:"required"`
}

type UpdateApplyResponse added in v2.10.0

type UpdateApplyResponse struct {
	PreviousVersion string `json:"previousVersion"`
	NewVersion      string `json:"newVersion"`
}

type UpdateCheckResponse added in v2.10.0

type UpdateCheckResponse struct {
	CurrentVersion  string `json:"currentVersion"`
	LatestVersion   string `json:"latestVersion,omitempty"`
	ReleaseNotes    string `json:"releaseNotes,omitempty"`
	UpdateAvailable bool   `json:"updateAvailable"`
}

type UpdateMappingParams

type UpdateMappingParams struct {
	Label    *string `json:"label" validate:"omitempty,max=255"`
	Enabled  *bool   `json:"enabled"`
	Type     *string `json:"type" validate:"omitempty,oneof=id value data uid text"`
	Match    *string `json:"match" validate:"omitempty,oneof=exact partial regex"`
	Pattern  *string `json:"pattern" validate:"omitempty,min=1"`
	Override *string `json:"override"`
	ID       int     `json:"id" validate:"gt=0"`
}

type UpdatePlaytimeLimitsParams added in v2.7.0

type UpdatePlaytimeLimitsParams struct {
	Enabled      *bool     `json:"enabled"`
	Daily        *string   `json:"daily" validate:"omitempty,duration"`
	Session      *string   `json:"session" validate:"omitempty,duration"`
	SessionReset *string   `json:"sessionReset" validate:"omitempty,duration"`
	Warnings     *[]string `json:"warnings" validate:"omitempty,dive,duration"`
	Retention    *int      `json:"retention" validate:"omitempty,gte=0"`
}

type UpdateSettingsParams

type UpdateSettingsParams struct {
	RunZapScript              *bool               `json:"runZapScript"`
	DebugLogging              *bool               `json:"debugLogging"`
	AudioScanFeedback         *bool               `json:"audioScanFeedback"`
	ReadersAutoDetect         *bool               `json:"readersAutoDetect"`
	ErrorReporting            *bool               `json:"errorReporting"`
	UpdateChannel             *string             `json:"updateChannel" validate:"omitempty,oneof=stable beta"`
	ReadersScanMode           *string             `json:"readersScanMode" validate:"omitempty,oneof=tap hold"`
	ReadersScanExitDelay      *float32            `json:"readersScanExitDelay" validate:"omitempty,gte=0"`
	ReadersScanIgnoreSystem   *[]string           `json:"readersScanIgnoreSystems" validate:"omitempty,dive,system"`
	ReadersConnect            *[]ReaderConnection `json:"readersConnect,omitempty"`
	AudioVolume               *int                `json:"audioVolume" validate:"omitempty,gte=0,lte=200"`
	LaunchGuardEnabled        *bool               `json:"launchGuardEnabled"`
	LaunchGuardTimeout        *float32            `json:"launchGuardTimeout" validate:"omitempty,gte=-1"`
	LaunchGuardDelay          *float32            `json:"launchGuardDelay" validate:"omitempty,gte=0"`
	LaunchGuardRequireConfirm *bool               `json:"launchGuardRequireConfirm"`
}

type VersionResponse

type VersionResponse struct {
	Version  string `json:"version"`
	Platform string `json:"platform"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL