maintainerr

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMaintainerrService

func NewMaintainerrService() models.ServiceHealthChecker

Types

type Collection

type Collection struct {
	ID                int     `json:"id"`
	PlexID            int     `json:"plexId"`
	LibraryID         int     `json:"libraryId"`
	Title             string  `json:"title"`
	Description       string  `json:"description"`
	IsActive          bool    `json:"isActive"`
	ArrAction         int     `json:"arrAction"`
	VisibleOnHome     bool    `json:"visibleOnHome"`
	DeleteAfterDays   int     `json:"deleteAfterDays"`
	ManualCollection  bool    `json:"manualCollection"`
	ListExclusions    bool    `json:"listExclusions"`
	ForceOverseerr    bool    `json:"forceOverseerr"`
	Type              int     `json:"type"`
	KeepLogsForMonths int     `json:"keepLogsForMonths"`
	AddDate           string  `json:"addDate"`
	Media             []Media `json:"media"`
}

type ErrMaintainerr

type ErrMaintainerr struct {
	Op       string // Operation that failed
	Err      error  // Underlying error
	HttpCode int    // HTTP status code if applicable
}

Custom error types for better error handling

func (*ErrMaintainerr) Error

func (e *ErrMaintainerr) Error() string

func (*ErrMaintainerr) Unwrap

func (e *ErrMaintainerr) Unwrap() error

type MaintainerrService

type MaintainerrService struct {
	core.ServiceCore
}

func (*MaintainerrService) CheckHealth

func (s *MaintainerrService) CheckHealth(url, apiKey string) (models.ServiceHealth, int)

func (*MaintainerrService) GetCollections

func (s *MaintainerrService) GetCollections(url, apiKey string) ([]Collection, error)

func (*MaintainerrService) GetHealthEndpoint

func (s *MaintainerrService) GetHealthEndpoint(baseURL string) string

type Media

type Media struct {
	ID           int       `json:"id"`
	CollectionID int       `json:"collectionId"`
	PlexID       int       `json:"plexId"`
	TmdbID       int       `json:"tmdbId"`
	AddDate      time.Time `json:"addDate"`
	ImagePath    string    `json:"image_path"`
	IsManual     bool      `json:"isManual"`
}

type StatusResponse

type StatusResponse struct {
	Version         string `json:"version"`
	UpdateAvailable bool   `json:"updateAvailable"`
}

Jump to

Keyboard shortcuts

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