db

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 2 Imported by: 0 modules, 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddCapabilityParams

type AddCapabilityParams struct {
	ID         string `json:"id"`
	ServiceID  string `json:"serviceId"`
	Capability string `json:"capability"`
}

type CatalogProbe added in v0.5.0

type CatalogProbe struct {
	ID            int64  `json:"id"`
	CatalogID     string `json:"catalogId"`
	CycleID       string `json:"cycleId"`
	At            string `json:"at"`
	Query         string `json:"query"`
	Manual        bool   `json:"manual"`
	DurationMs    int64  `json:"durationMs"`
	Ok            bool   `json:"ok"`
	ErrorKind     string `json:"errorKind"`
	ErrorMessage  string `json:"errorMessage"`
	Results       int64  `json:"results"`
	WithSeeders   int64  `json:"withSeeders"`
	MedianSeeders int64  `json:"medianSeeders"`
	UniqueResults int64  `json:"uniqueResults"`
	Challenged    bool   `json:"challenged"`
	Solved        bool   `json:"solved"`
}

type ConfigEntry

type ConfigEntry struct {
	ID        string `json:"id"`
	Namespace string `json:"namespace"`
	Key       string `json:"key"`
	Value     string `json:"value"`
	UpdatedAt string `json:"updatedAt"`
}

type ConfigSubscription

type ConfigSubscription struct {
	ID        string `json:"id"`
	ServiceID string `json:"serviceId"`
	Namespace string `json:"namespace"`
}

type CreateAssignmentParams

type CreateAssignmentParams struct {
	ID        string `json:"id"`
	IndexerID string `json:"indexerId"`
	ServiceID string `json:"serviceId"`
	Overrides string `json:"overrides"`
}

type CreateDownloadClientParams

type CreateDownloadClientParams struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Kind      string `json:"kind"`
	Protocol  string `json:"protocol"`
	Enabled   bool   `json:"enabled"`
	Priority  int64  `json:"priority"`
	Host      string `json:"host"`
	Port      int64  `json:"port"`
	UseSsl    bool   `json:"useSsl"`
	Username  string `json:"username"`
	Password  string `json:"password"`
	Category  string `json:"category"`
	Directory string `json:"directory"`
	Settings  string `json:"settings"`
	CreatedAt string `json:"createdAt"`
	UpdatedAt string `json:"updatedAt"`
}

type CreateIndexerParams

type CreateIndexerParams struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Kind      string `json:"kind"`
	Enabled   bool   `json:"enabled"`
	Priority  int64  `json:"priority"`
	Url       string `json:"url"`
	ApiKey    string `json:"apiKey"`
	Settings  string `json:"settings"`
	CreatedAt string `json:"createdAt"`
	UpdatedAt string `json:"updatedAt"`
}

type CreateQualityProfileParams

type CreateQualityProfileParams struct {
	ID                   string  `json:"id"`
	Name                 string  `json:"name"`
	CutoffJson           string  `json:"cutoffJson"`
	QualitiesJson        string  `json:"qualitiesJson"`
	UpgradeAllowed       bool    `json:"upgradeAllowed"`
	UpgradeUntilJson     *string `json:"upgradeUntilJson"`
	MinCustomFormatScore int64   `json:"minCustomFormatScore"`
	UpgradeUntilCfScore  int64   `json:"upgradeUntilCfScore"`
	CreatedAt            string  `json:"createdAt"`
	UpdatedAt            string  `json:"updatedAt"`
}

type CreateServiceParams

type CreateServiceParams struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	Type       string `json:"type"`
	ApiUrl     string `json:"apiUrl"`
	ApiKey     string `json:"apiKey"`
	HealthUrl  string `json:"healthUrl"`
	Version    string `json:"version"`
	Status     string `json:"status"`
	LastSeen   string `json:"lastSeen"`
	Registered string `json:"registered"`
	Metadata   string `json:"metadata"`
}

type CreateTagParams

type CreateTagParams struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type DeleteAssignmentParams

type DeleteAssignmentParams struct {
	IndexerID string `json:"indexerId"`
	ServiceID string `json:"serviceId"`
}

type DeleteConfigEntryParams

type DeleteConfigEntryParams struct {
	Namespace string `json:"namespace"`
	Key       string `json:"key"`
}

type DownloadClient

type DownloadClient struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Kind      string `json:"kind"`
	Protocol  string `json:"protocol"`
	Enabled   bool   `json:"enabled"`
	Priority  int64  `json:"priority"`
	Host      string `json:"host"`
	Port      int64  `json:"port"`
	UseSsl    bool   `json:"useSsl"`
	Username  string `json:"username"`
	Password  string `json:"password"`
	Category  string `json:"category"`
	Directory string `json:"directory"`
	Settings  string `json:"settings"`
	CreatedAt string `json:"createdAt"`
	UpdatedAt string `json:"updatedAt"`
}

type FilterPreset

type FilterPreset struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Filters   string `json:"filters"`
	CreatedAt string `json:"createdAt"`
	UpdatedAt string `json:"updatedAt"`
}

type GetConfigEntryParams

type GetConfigEntryParams struct {
	Namespace string `json:"namespace"`
	Key       string `json:"key"`
}

type GetServiceByNameAndTypeParams

type GetServiceByNameAndTypeParams struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type Indexer

type Indexer struct {
	ID              string `json:"id"`
	Name            string `json:"name"`
	Kind            string `json:"kind"`
	Enabled         bool   `json:"enabled"`
	Priority        int64  `json:"priority"`
	Url             string `json:"url"`
	ApiKey          string `json:"apiKey"`
	Settings        string `json:"settings"`
	CreatedAt       string `json:"createdAt"`
	UpdatedAt       string `json:"updatedAt"`
	HealthStatus    string `json:"healthStatus"`
	HealthMessage   string `json:"healthMessage"`
	HealthCheckedAt string `json:"healthCheckedAt"`
	FailureCount    int64  `json:"failureCount"`
	LastError       string `json:"lastError"`
	LastSuccessAt   string `json:"lastSuccessAt"`
}

type IndexerAssignment

type IndexerAssignment struct {
	ID        string `json:"id"`
	IndexerID string `json:"indexerId"`
	ServiceID string `json:"serviceId"`
	Overrides string `json:"overrides"`
}

type IndexerOverlapEvent added in v0.5.0

type IndexerOverlapEvent struct {
	ID            int64  `json:"id"`
	IndexerID     string `json:"indexerId"`
	At            string `json:"at"`
	Results       int64  `json:"results"`
	UniqueResults int64  `json:"uniqueResults"`
	ComparedWith  int64  `json:"comparedWith"`
}

type IndexerSearchEvent added in v0.5.0

type IndexerSearchEvent struct {
	ID            int64  `json:"id"`
	IndexerID     string `json:"indexerId"`
	At            string `json:"at"`
	DurationMs    int64  `json:"durationMs"`
	Ok            bool   `json:"ok"`
	ErrorKind     string `json:"errorKind"`
	Results       int64  `json:"results"`
	WithSeeders   int64  `json:"withSeeders"`
	MedianSeeders int64  `json:"medianSeeders"`
	Challenged    bool   `json:"challenged"`
	Solved        bool   `json:"solved"`
	Query         string `json:"query"`
	Mode          string `json:"mode"`
}

type IndexerTag

type IndexerTag struct {
	IndexerID string `json:"indexerId"`
	TagID     string `json:"tagId"`
}

type InsertCatalogProbeParams added in v0.5.0

type InsertCatalogProbeParams struct {
	CatalogID     string `json:"catalogId"`
	CycleID       string `json:"cycleId"`
	At            string `json:"at"`
	Query         string `json:"query"`
	Manual        bool   `json:"manual"`
	DurationMs    int64  `json:"durationMs"`
	Ok            bool   `json:"ok"`
	ErrorKind     string `json:"errorKind"`
	ErrorMessage  string `json:"errorMessage"`
	Results       int64  `json:"results"`
	WithSeeders   int64  `json:"withSeeders"`
	MedianSeeders int64  `json:"medianSeeders"`
	Challenged    bool   `json:"challenged"`
	Solved        bool   `json:"solved"`
}

type InsertOverlapEventParams added in v0.5.0

type InsertOverlapEventParams struct {
	IndexerID     string `json:"indexerId"`
	At            string `json:"at"`
	Results       int64  `json:"results"`
	UniqueResults int64  `json:"uniqueResults"`
	ComparedWith  int64  `json:"comparedWith"`
}

type InsertSearchEventParams added in v0.5.0

type InsertSearchEventParams struct {
	IndexerID     string `json:"indexerId"`
	At            string `json:"at"`
	DurationMs    int64  `json:"durationMs"`
	Ok            bool   `json:"ok"`
	ErrorKind     string `json:"errorKind"`
	Results       int64  `json:"results"`
	WithSeeders   int64  `json:"withSeeders"`
	MedianSeeders int64  `json:"medianSeeders"`
	Challenged    bool   `json:"challenged"`
	Solved        bool   `json:"solved"`
	Query         string `json:"query"`
	Mode          string `json:"mode"`
}

type ListRecentQueriesParams added in v0.5.0

type ListRecentQueriesParams struct {
	Mode  string `json:"mode"`
	Limit int64  `json:"limit"`
}

type ListRecentQueriesRow added in v0.5.0

type ListRecentQueriesRow struct {
	Query  string      `json:"query"`
	LastAt interface{} `json:"lastAt"`
}

type QualityProfile

type QualityProfile struct {
	ID                   string  `json:"id"`
	Name                 string  `json:"name"`
	CutoffJson           string  `json:"cutoffJson"`
	QualitiesJson        string  `json:"qualitiesJson"`
	UpgradeAllowed       bool    `json:"upgradeAllowed"`
	UpgradeUntilJson     *string `json:"upgradeUntilJson"`
	MinCustomFormatScore int64   `json:"minCustomFormatScore"`
	UpgradeUntilCfScore  int64   `json:"upgradeUntilCfScore"`
	CreatedAt            string  `json:"createdAt"`
	UpdatedAt            string  `json:"updatedAt"`
}

type Querier

type Querier interface {
	// Capabilities
	AddCapability(ctx context.Context, arg AddCapabilityParams) error
	CountIndexersForTag(ctx context.Context, tagID string) (int64, error)
	// Service tags
	// Indexer tags
	// Counts
	CountServicesForTag(ctx context.Context, tagID string) (int64, error)
	// Assignments
	CreateAssignment(ctx context.Context, arg CreateAssignmentParams) (IndexerAssignment, error)
	CreateDownloadClient(ctx context.Context, arg CreateDownloadClientParams) (DownloadClient, error)
	CreateIndexer(ctx context.Context, arg CreateIndexerParams) (Indexer, error)
	CreateQualityProfile(ctx context.Context, arg CreateQualityProfileParams) (QualityProfile, error)
	CreateService(ctx context.Context, arg CreateServiceParams) (Service, error)
	CreateTag(ctx context.Context, arg CreateTagParams) (Tag, error)
	DeleteAssignment(ctx context.Context, arg DeleteAssignmentParams) error
	DeleteAssignmentsByIndexer(ctx context.Context, indexerID string) error
	DeleteCapabilities(ctx context.Context, serviceID string) error
	DeleteConfigEntry(ctx context.Context, arg DeleteConfigEntryParams) error
	DeleteDownloadClient(ctx context.Context, id string) error
	DeleteFilterPreset(ctx context.Context, id string) error
	DeleteIndexer(ctx context.Context, id string) error
	DeleteQualityProfile(ctx context.Context, id string) error
	DeleteService(ctx context.Context, id string) error
	DeleteTag(ctx context.Context, id string) error
	GetConfigEntry(ctx context.Context, arg GetConfigEntryParams) (ConfigEntry, error)
	GetDownloadClient(ctx context.Context, id string) (DownloadClient, error)
	GetIndexer(ctx context.Context, id string) (Indexer, error)
	GetQualityProfile(ctx context.Context, id string) (QualityProfile, error)
	GetService(ctx context.Context, id string) (Service, error)
	GetServiceByNameAndType(ctx context.Context, arg GetServiceByNameAndTypeParams) (Service, error)
	GetSharedMediaHandling(ctx context.Context) (SharedMediaHandling, error)
	InsertCatalogProbe(ctx context.Context, arg InsertCatalogProbeParams) (int64, error)
	InsertOverlapEvent(ctx context.Context, arg InsertOverlapEventParams) error
	InsertSearchEvent(ctx context.Context, arg InsertSearchEventParams) error
	ListAssignmentsByIndexer(ctx context.Context, indexerID string) ([]IndexerAssignment, error)
	ListAssignmentsByService(ctx context.Context, serviceID string) ([]IndexerAssignment, error)
	ListCapabilities(ctx context.Context, serviceID string) ([]string, error)
	ListCatalogProbesSince(ctx context.Context, at string) ([]CatalogProbe, error)
	ListDownloadClients(ctx context.Context) ([]DownloadClient, error)
	ListEnabledIndexers(ctx context.Context) ([]Indexer, error)
	ListFilterPresets(ctx context.Context) ([]FilterPreset, error)
	ListIndexers(ctx context.Context) ([]Indexer, error)
	// Indexers whose catalog definition vanished can only fail searches, so
	// they are withheld from services entirely; the service's next sync then
	// drops its local copy.
	ListIndexersForService(ctx context.Context, serviceID string) ([]Indexer, error)
	ListOverlapEventsSince(ctx context.Context, at string) ([]IndexerOverlapEvent, error)
	ListQualityProfiles(ctx context.Context) ([]QualityProfile, error)
	// Distinct recent real queries of one mode, newest first.
	ListRecentQueries(ctx context.Context, arg ListRecentQueriesParams) ([]ListRecentQueriesRow, error)
	ListSearchEventsSince(ctx context.Context, at string) ([]IndexerSearchEvent, error)
	ListServices(ctx context.Context) ([]Service, error)
	ListServicesByCapability(ctx context.Context, capability string) ([]Service, error)
	ListServicesByType(ctx context.Context, type_ string) ([]Service, error)
	ListTags(ctx context.Context) ([]Tag, error)
	PruneCatalogProbes(ctx context.Context, at string) error
	PruneOverlapEvents(ctx context.Context, at string) error
	PruneSearchEvents(ctx context.Context, at string) error
	SetCatalogProbeUnique(ctx context.Context, arg SetCatalogProbeUniqueParams) error
	SetConfigEntry(ctx context.Context, arg SetConfigEntryParams) (ConfigEntry, error)
	SetIndexerHealth(ctx context.Context, arg SetIndexerHealthParams) error
	SetIndexerSearchHealth(ctx context.Context, arg SetIndexerSearchHealthParams) error
	// Subscriptions
	Subscribe(ctx context.Context, arg SubscribeParams) error
	Unsubscribe(ctx context.Context, arg UnsubscribeParams) error
	UpdateDownloadClient(ctx context.Context, arg UpdateDownloadClientParams) (DownloadClient, error)
	UpdateIndexer(ctx context.Context, arg UpdateIndexerParams) (Indexer, error)
	UpdateQualityProfile(ctx context.Context, arg UpdateQualityProfileParams) (QualityProfile, error)
	UpdateService(ctx context.Context, arg UpdateServiceParams) (Service, error)
	UpdateServiceHeartbeat(ctx context.Context, arg UpdateServiceHeartbeatParams) error
	UpdateServiceStatus(ctx context.Context, arg UpdateServiceStatusParams) error
	UpdateSharedMediaHandling(ctx context.Context, arg UpdateSharedMediaHandlingParams) (SharedMediaHandling, error)
	UpdateTag(ctx context.Context, arg UpdateTagParams) (Tag, error)
	UpsertFilterPreset(ctx context.Context, arg UpsertFilterPresetParams) (FilterPreset, error)
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) AddCapability

func (q *Queries) AddCapability(ctx context.Context, arg AddCapabilityParams) error

Capabilities

func (*Queries) CountIndexersForTag

func (q *Queries) CountIndexersForTag(ctx context.Context, tagID string) (int64, error)

func (*Queries) CountServicesForTag

func (q *Queries) CountServicesForTag(ctx context.Context, tagID string) (int64, error)

Service tags Indexer tags Counts

func (*Queries) CreateAssignment

func (q *Queries) CreateAssignment(ctx context.Context, arg CreateAssignmentParams) (IndexerAssignment, error)

Assignments

func (*Queries) CreateDownloadClient

func (q *Queries) CreateDownloadClient(ctx context.Context, arg CreateDownloadClientParams) (DownloadClient, error)

func (*Queries) CreateIndexer

func (q *Queries) CreateIndexer(ctx context.Context, arg CreateIndexerParams) (Indexer, error)

func (*Queries) CreateQualityProfile

func (q *Queries) CreateQualityProfile(ctx context.Context, arg CreateQualityProfileParams) (QualityProfile, error)

func (*Queries) CreateService

func (q *Queries) CreateService(ctx context.Context, arg CreateServiceParams) (Service, error)

func (*Queries) CreateTag

func (q *Queries) CreateTag(ctx context.Context, arg CreateTagParams) (Tag, error)

func (*Queries) DeleteAssignment

func (q *Queries) DeleteAssignment(ctx context.Context, arg DeleteAssignmentParams) error

func (*Queries) DeleteAssignmentsByIndexer

func (q *Queries) DeleteAssignmentsByIndexer(ctx context.Context, indexerID string) error

func (*Queries) DeleteCapabilities

func (q *Queries) DeleteCapabilities(ctx context.Context, serviceID string) error

func (*Queries) DeleteConfigEntry

func (q *Queries) DeleteConfigEntry(ctx context.Context, arg DeleteConfigEntryParams) error

func (*Queries) DeleteDownloadClient

func (q *Queries) DeleteDownloadClient(ctx context.Context, id string) error

func (*Queries) DeleteFilterPreset

func (q *Queries) DeleteFilterPreset(ctx context.Context, id string) error

func (*Queries) DeleteIndexer

func (q *Queries) DeleteIndexer(ctx context.Context, id string) error

func (*Queries) DeleteQualityProfile

func (q *Queries) DeleteQualityProfile(ctx context.Context, id string) error

func (*Queries) DeleteService

func (q *Queries) DeleteService(ctx context.Context, id string) error

func (*Queries) DeleteTag

func (q *Queries) DeleteTag(ctx context.Context, id string) error

func (*Queries) GetConfigEntry

func (q *Queries) GetConfigEntry(ctx context.Context, arg GetConfigEntryParams) (ConfigEntry, error)

func (*Queries) GetDownloadClient

func (q *Queries) GetDownloadClient(ctx context.Context, id string) (DownloadClient, error)

func (*Queries) GetIndexer

func (q *Queries) GetIndexer(ctx context.Context, id string) (Indexer, error)

func (*Queries) GetQualityProfile

func (q *Queries) GetQualityProfile(ctx context.Context, id string) (QualityProfile, error)

func (*Queries) GetService

func (q *Queries) GetService(ctx context.Context, id string) (Service, error)

func (*Queries) GetServiceByNameAndType

func (q *Queries) GetServiceByNameAndType(ctx context.Context, arg GetServiceByNameAndTypeParams) (Service, error)

func (*Queries) GetSharedMediaHandling

func (q *Queries) GetSharedMediaHandling(ctx context.Context) (SharedMediaHandling, error)

func (*Queries) InsertCatalogProbe added in v0.5.0

func (q *Queries) InsertCatalogProbe(ctx context.Context, arg InsertCatalogProbeParams) (int64, error)

func (*Queries) InsertOverlapEvent added in v0.5.0

func (q *Queries) InsertOverlapEvent(ctx context.Context, arg InsertOverlapEventParams) error

func (*Queries) InsertSearchEvent added in v0.5.0

func (q *Queries) InsertSearchEvent(ctx context.Context, arg InsertSearchEventParams) error

func (*Queries) ListAssignmentsByIndexer

func (q *Queries) ListAssignmentsByIndexer(ctx context.Context, indexerID string) ([]IndexerAssignment, error)

func (*Queries) ListAssignmentsByService

func (q *Queries) ListAssignmentsByService(ctx context.Context, serviceID string) ([]IndexerAssignment, error)

func (*Queries) ListCapabilities

func (q *Queries) ListCapabilities(ctx context.Context, serviceID string) ([]string, error)

func (*Queries) ListCatalogProbesSince added in v0.5.0

func (q *Queries) ListCatalogProbesSince(ctx context.Context, at string) ([]CatalogProbe, error)

func (*Queries) ListDownloadClients

func (q *Queries) ListDownloadClients(ctx context.Context) ([]DownloadClient, error)

func (*Queries) ListEnabledIndexers

func (q *Queries) ListEnabledIndexers(ctx context.Context) ([]Indexer, error)

func (*Queries) ListFilterPresets

func (q *Queries) ListFilterPresets(ctx context.Context) ([]FilterPreset, error)

func (*Queries) ListIndexers

func (q *Queries) ListIndexers(ctx context.Context) ([]Indexer, error)

func (*Queries) ListIndexersForService

func (q *Queries) ListIndexersForService(ctx context.Context, serviceID string) ([]Indexer, error)

Indexers whose catalog definition vanished can only fail searches, so they are withheld from services entirely; the service's next sync then drops its local copy.

func (*Queries) ListOverlapEventsSince added in v0.5.0

func (q *Queries) ListOverlapEventsSince(ctx context.Context, at string) ([]IndexerOverlapEvent, error)

func (*Queries) ListQualityProfiles

func (q *Queries) ListQualityProfiles(ctx context.Context) ([]QualityProfile, error)

func (*Queries) ListRecentQueries added in v0.5.0

func (q *Queries) ListRecentQueries(ctx context.Context, arg ListRecentQueriesParams) ([]ListRecentQueriesRow, error)

Distinct recent real queries of one mode, newest first.

func (*Queries) ListSearchEventsSince added in v0.5.0

func (q *Queries) ListSearchEventsSince(ctx context.Context, at string) ([]IndexerSearchEvent, error)

func (*Queries) ListServices

func (q *Queries) ListServices(ctx context.Context) ([]Service, error)

func (*Queries) ListServicesByCapability

func (q *Queries) ListServicesByCapability(ctx context.Context, capability string) ([]Service, error)

func (*Queries) ListServicesByType

func (q *Queries) ListServicesByType(ctx context.Context, type_ string) ([]Service, error)

func (*Queries) ListTags

func (q *Queries) ListTags(ctx context.Context) ([]Tag, error)

func (*Queries) PruneCatalogProbes added in v0.5.0

func (q *Queries) PruneCatalogProbes(ctx context.Context, at string) error

func (*Queries) PruneOverlapEvents added in v0.5.0

func (q *Queries) PruneOverlapEvents(ctx context.Context, at string) error

func (*Queries) PruneSearchEvents added in v0.5.0

func (q *Queries) PruneSearchEvents(ctx context.Context, at string) error

func (*Queries) SetCatalogProbeUnique added in v0.5.0

func (q *Queries) SetCatalogProbeUnique(ctx context.Context, arg SetCatalogProbeUniqueParams) error

func (*Queries) SetConfigEntry

func (q *Queries) SetConfigEntry(ctx context.Context, arg SetConfigEntryParams) (ConfigEntry, error)

func (*Queries) SetIndexerHealth added in v0.4.0

func (q *Queries) SetIndexerHealth(ctx context.Context, arg SetIndexerHealthParams) error

func (*Queries) SetIndexerSearchHealth added in v0.4.0

func (q *Queries) SetIndexerSearchHealth(ctx context.Context, arg SetIndexerSearchHealthParams) error

func (*Queries) Subscribe

func (q *Queries) Subscribe(ctx context.Context, arg SubscribeParams) error

Subscriptions

func (*Queries) Unsubscribe

func (q *Queries) Unsubscribe(ctx context.Context, arg UnsubscribeParams) error

func (*Queries) UpdateDownloadClient

func (q *Queries) UpdateDownloadClient(ctx context.Context, arg UpdateDownloadClientParams) (DownloadClient, error)

func (*Queries) UpdateIndexer

func (q *Queries) UpdateIndexer(ctx context.Context, arg UpdateIndexerParams) (Indexer, error)

func (*Queries) UpdateQualityProfile

func (q *Queries) UpdateQualityProfile(ctx context.Context, arg UpdateQualityProfileParams) (QualityProfile, error)

func (*Queries) UpdateService

func (q *Queries) UpdateService(ctx context.Context, arg UpdateServiceParams) (Service, error)

func (*Queries) UpdateServiceHeartbeat

func (q *Queries) UpdateServiceHeartbeat(ctx context.Context, arg UpdateServiceHeartbeatParams) error

func (*Queries) UpdateServiceStatus

func (q *Queries) UpdateServiceStatus(ctx context.Context, arg UpdateServiceStatusParams) error

func (*Queries) UpdateSharedMediaHandling

func (q *Queries) UpdateSharedMediaHandling(ctx context.Context, arg UpdateSharedMediaHandlingParams) (SharedMediaHandling, error)

func (*Queries) UpdateTag

func (q *Queries) UpdateTag(ctx context.Context, arg UpdateTagParams) (Tag, error)

func (*Queries) UpsertFilterPreset

func (q *Queries) UpsertFilterPreset(ctx context.Context, arg UpsertFilterPresetParams) (FilterPreset, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type Service

type Service struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	Type       string `json:"type"`
	ApiUrl     string `json:"apiUrl"`
	ApiKey     string `json:"apiKey"`
	HealthUrl  string `json:"healthUrl"`
	Version    string `json:"version"`
	Status     string `json:"status"`
	LastSeen   string `json:"lastSeen"`
	Registered string `json:"registered"`
	Metadata   string `json:"metadata"`
}

type ServiceCapability

type ServiceCapability struct {
	ID         string `json:"id"`
	ServiceID  string `json:"serviceId"`
	Capability string `json:"capability"`
}

type ServiceTag

type ServiceTag struct {
	ServiceID string `json:"serviceId"`
	TagID     string `json:"tagId"`
}

type SetCatalogProbeUniqueParams added in v0.5.0

type SetCatalogProbeUniqueParams struct {
	UniqueResults int64 `json:"uniqueResults"`
	ID            int64 `json:"id"`
}

type SetConfigEntryParams

type SetConfigEntryParams struct {
	ID        string `json:"id"`
	Namespace string `json:"namespace"`
	Key       string `json:"key"`
	Value     string `json:"value"`
	UpdatedAt string `json:"updatedAt"`
}

type SetIndexerHealthParams added in v0.4.0

type SetIndexerHealthParams struct {
	HealthStatus    string `json:"healthStatus"`
	HealthMessage   string `json:"healthMessage"`
	HealthCheckedAt string `json:"healthCheckedAt"`
	ID              string `json:"id"`
}

type SetIndexerSearchHealthParams added in v0.4.0

type SetIndexerSearchHealthParams struct {
	HealthStatus    string `json:"healthStatus"`
	HealthMessage   string `json:"healthMessage"`
	HealthCheckedAt string `json:"healthCheckedAt"`
	FailureCount    int64  `json:"failureCount"`
	LastError       string `json:"lastError"`
	LastSuccessAt   string `json:"lastSuccessAt"`
	ID              string `json:"id"`
}

type SharedMediaHandling

type SharedMediaHandling struct {
	ID                  int64  `json:"id"`
	ColonReplacement    string `json:"colonReplacement"`
	ImportExtraFiles    bool   `json:"importExtraFiles"`
	ExtraFileExtensions string `json:"extraFileExtensions"`
	RenameFiles         bool   `json:"renameFiles"`
	UpdatedAt           string `json:"updatedAt"`
}

type SubscribeParams

type SubscribeParams struct {
	ID        string `json:"id"`
	ServiceID string `json:"serviceId"`
	Namespace string `json:"namespace"`
}

type Tag

type Tag struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type UnsubscribeParams

type UnsubscribeParams struct {
	ServiceID string `json:"serviceId"`
	Namespace string `json:"namespace"`
}

type UpdateDownloadClientParams

type UpdateDownloadClientParams struct {
	Name      string `json:"name"`
	Kind      string `json:"kind"`
	Protocol  string `json:"protocol"`
	Enabled   bool   `json:"enabled"`
	Priority  int64  `json:"priority"`
	Host      string `json:"host"`
	Port      int64  `json:"port"`
	UseSsl    bool   `json:"useSsl"`
	Username  string `json:"username"`
	Password  string `json:"password"`
	Category  string `json:"category"`
	Directory string `json:"directory"`
	Settings  string `json:"settings"`
	UpdatedAt string `json:"updatedAt"`
	ID        string `json:"id"`
}

type UpdateIndexerParams

type UpdateIndexerParams struct {
	Name      string `json:"name"`
	Kind      string `json:"kind"`
	Enabled   bool   `json:"enabled"`
	Priority  int64  `json:"priority"`
	Url       string `json:"url"`
	ApiKey    string `json:"apiKey"`
	Settings  string `json:"settings"`
	UpdatedAt string `json:"updatedAt"`
	ID        string `json:"id"`
}

type UpdateQualityProfileParams

type UpdateQualityProfileParams struct {
	Name                 string  `json:"name"`
	CutoffJson           string  `json:"cutoffJson"`
	QualitiesJson        string  `json:"qualitiesJson"`
	UpgradeAllowed       bool    `json:"upgradeAllowed"`
	UpgradeUntilJson     *string `json:"upgradeUntilJson"`
	MinCustomFormatScore int64   `json:"minCustomFormatScore"`
	UpgradeUntilCfScore  int64   `json:"upgradeUntilCfScore"`
	UpdatedAt            string  `json:"updatedAt"`
	ID                   string  `json:"id"`
}

type UpdateServiceHeartbeatParams

type UpdateServiceHeartbeatParams struct {
	LastSeen string `json:"lastSeen"`
	ID       string `json:"id"`
}

type UpdateServiceParams

type UpdateServiceParams struct {
	Name      string `json:"name"`
	ApiUrl    string `json:"apiUrl"`
	ApiKey    string `json:"apiKey"`
	HealthUrl string `json:"healthUrl"`
	Version   string `json:"version"`
	Metadata  string `json:"metadata"`
	LastSeen  string `json:"lastSeen"`
	ID        string `json:"id"`
}

type UpdateServiceStatusParams

type UpdateServiceStatusParams struct {
	Status   string `json:"status"`
	LastSeen string `json:"lastSeen"`
	ID       string `json:"id"`
}

type UpdateSharedMediaHandlingParams

type UpdateSharedMediaHandlingParams struct {
	ColonReplacement    string `json:"colonReplacement"`
	ImportExtraFiles    bool   `json:"importExtraFiles"`
	ExtraFileExtensions string `json:"extraFileExtensions"`
	RenameFiles         bool   `json:"renameFiles"`
	UpdatedAt           string `json:"updatedAt"`
}

type UpdateTagParams

type UpdateTagParams struct {
	Name string `json:"name"`
	ID   string `json:"id"`
}

type UpsertFilterPresetParams

type UpsertFilterPresetParams struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Filters   string `json:"filters"`
	CreatedAt string `json:"createdAt"`
	UpdatedAt string `json:"updatedAt"`
}

Jump to

Keyboard shortcuts

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