Documentation
¶
Overview ¶
Package library manages Pilot library records and their series counts.
Index ¶
- Variables
- type CreateRequest
- type Library
- type Service
- func (s *Service) Create(ctx context.Context, req CreateRequest) (Library, error)
- func (s *Service) Delete(ctx context.Context, id string) error
- func (s *Service) Get(ctx context.Context, id string) (Library, error)
- func (s *Service) List(ctx context.Context) ([]Library, error)
- func (s *Service) Stats(ctx context.Context, id string) (Stats, error)
- func (s *Service) Update(ctx context.Context, id string, req UpdateRequest) (Library, error)
- type Stats
- type UpdateRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("library not found")
ErrNotFound is returned when a library does not exist.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateRequest struct {
Name string
RootPath string
DefaultQualityProfileID string
NamingFormat *string
FolderFormat *string
MinFreeSpaceGB int
Tags []string
}
CreateRequest carries the fields needed to create a library.
type Library ¶
type Library struct {
ID string
Name string
RootPath string
DefaultQualityProfileID string
NamingFormat *string
FolderFormat *string
MinFreeSpaceGB int
Tags []string
CreatedAt time.Time
UpdatedAt time.Time
}
Library is the domain representation of a library record.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service manages library records.
func NewService ¶
NewService creates a new Service backed by the given querier and event bus.
func (*Service) Delete ¶
Delete removes a library by ID. Returns ErrNotFound if the library does not exist.
func (*Service) Get ¶
Get returns a library by ID. Returns ErrNotFound if no library with that ID exists.
type UpdateRequest ¶
type UpdateRequest = CreateRequest
UpdateRequest carries the fields needed to update a library. It is identical in shape to CreateRequest.
Click to show internal directories.
Click to hide internal directories.