mediaserver

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 9 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

Overview

Package mediaserver manages media server configurations (Plex, Emby, Jellyfin).

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("media server not found")

ErrNotFound is returned when a media server config does not exist.

Functions

This section is empty.

Types

type Config

type Config struct {
	ID        string
	Name      string
	Kind      string // "plex", "emby", "jellyfin"
	Enabled   bool
	Settings  json.RawMessage
	CreatedAt time.Time
	UpdatedAt time.Time
}

Config is the domain representation of a stored media server configuration.

type CreateRequest

type CreateRequest struct {
	Name     string
	Kind     string
	Enabled  bool
	Settings json.RawMessage
}

CreateRequest carries the fields needed to create a media server config.

type Service

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

Service manages media server configurations.

func NewService

func NewService(q dbgen.Querier, reg *registry.Registry) *Service

NewService creates a new Service.

func (*Service) Create

func (s *Service) Create(ctx context.Context, req CreateRequest) (Config, error)

Create persists a new media server configuration.

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, id string) error

Delete removes a media server config. Returns ErrNotFound if absent.

func (*Service) Get

func (s *Service) Get(ctx context.Context, id string) (Config, error)

Get returns a media server config by ID. Returns ErrNotFound if absent.

func (*Service) List

func (s *Service) List(ctx context.Context) ([]Config, error)

List returns all media server configs ordered by name.

func (*Service) Test

func (s *Service) Test(ctx context.Context, id string) error

Test instantiates the media server plugin and verifies connectivity. Returns ErrNotFound if the config does not exist.

func (*Service) Update

func (s *Service) Update(ctx context.Context, id string, req UpdateRequest) (Config, error)

Update replaces the mutable fields of a media server config. Returns ErrNotFound if the config does not exist.

type UpdateRequest

type UpdateRequest = CreateRequest

UpdateRequest carries the fields needed to update a media server config.

Jump to

Keyboard shortcuts

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