models

package
v2.6.0-beta7 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: GPL-3.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
)
View Source
const (
	MethodLaunch               = "launch" // DEPRECATED
	MethodRun                  = "run"
	MethodRunScript            = "run.script"
	MethodStop                 = "stop"
	MethodTokens               = "tokens"
	MethodMedia                = "media"
	MethodMediaGenerate        = "media.generate"
	MethodMediaIndex           = "media.index" // DEPRECATED
	MethodMediaSearch          = "media.search"
	MethodMediaActive          = "media.active"
	MethodMediaActiveUpdate    = "media.active.update"
	MethodSettings             = "settings"
	MethodSettingsUpdate       = "settings.update"
	MethodSettingsReload       = "settings.reload"
	MethodSettingsLogsDownload = "settings.logs.download"
	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 (*ActiveMedia) Equal

func (a *ActiveMedia) Equal(with *ActiveMedia) bool

type AddMappingParams

type AddMappingParams struct {
	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 AllMappingsResponse

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

type ClientResponse

type ClientResponse struct {
	Name    string    `json:"name"`
	Address string    `json:"address"`
	Secret  string    `json:"secret"`
	ID      uuid.UUID `json:"id"`
}

type DeleteClientParams

type DeleteClientParams struct {
	ID string `json:"id"`
}

type DeleteMappingParams

type DeleteMappingParams struct {
	ID int `json:"id"`
}

type ErrorObject

type ErrorObject struct {
	Message string `json:"message"`
	Code    int    `json:"code"`
}

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 IndexingStatusResponse

type IndexingStatusResponse struct {
	TotalSteps         *int    `json:"totalSteps,omitempty"`
	CurrentStep        *int    `json:"currentStep,omitempty"`
	CurrentStepDisplay *string `json:"currentStepDisplay,omitempty"`
	TotalFiles         *int    `json:"totalFiles,omitempty"`
	Exists             bool    `json:"exists"`
	Indexing           bool    `json:"indexing"`
}

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 MediaIndexParams

type MediaIndexParams struct {
	Systems *[]string `json:"systems"`
}

type MediaResponse

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

type MediaStartedParams

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

type NewClientParams

type NewClientParams struct {
	Name string `json:"name"`
}

type Notification

type Notification struct {
	Method string
	Params json.RawMessage
}

type ReaderInfo

type ReaderInfo struct {
	ID           string   `json:"id"`
	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 ReaderWriteParams

type ReaderWriteParams struct {
	Text string `json:"text"`
}

type ReadersResponse

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

type RequestObject

type RequestObject struct {
	JSONRPC string          `json:"jsonrpc"`
	ID      *uuid.UUID      `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      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 RunParams

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

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 SearchParams struct {
	Systems    *[]string `json:"systems"`
	MaxResults *int      `json:"maxResults"`
	Query      string    `json:"query"`
}

type SearchResultMedia

type SearchResultMedia struct {
	System System `json:"system"`
	Name   string `json:"name"`
	Path   string `json:"path"`
}

type SearchResults

type SearchResults struct {
	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 System

type System struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Category string `json:"category"`
}

type SystemsResponse

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

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"`
}

type TokensResponse

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

type UpdateActiveMediaParams

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

type UpdateMappingParams

type UpdateMappingParams struct {
	Label    *string `json:"label"`
	Enabled  *bool   `json:"enabled"`
	Type     *string `json:"type"`
	Match    *string `json:"match"`
	Pattern  *string `json:"pattern"`
	Override *string `json:"override"`
	ID       int     `json:"id"`
}

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

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