Documentation
¶
Overview ¶
Package mediaserver manages media server configurations (Plex, Emby, Jellyfin).
Index ¶
- Variables
- type Config
- type CreateRequest
- type Service
- func (s *Service) Create(ctx context.Context, req CreateRequest) (Config, error)
- func (s *Service) Delete(ctx context.Context, id string) error
- func (s *Service) Get(ctx context.Context, id string) (Config, error)
- func (s *Service) List(ctx context.Context) ([]Config, error)
- func (s *Service) Test(ctx context.Context, id string) error
- func (s *Service) Update(ctx context.Context, id string, req UpdateRequest) (Config, error)
- type UpdateRequest
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 ¶
NewService creates a new Service.
type UpdateRequest ¶
type UpdateRequest = CreateRequest
UpdateRequest carries the fields needed to update a media server config.
Click to show internal directories.
Click to hide internal directories.