Documentation ¶
Index ¶
- func AddWrappersToOverseerr(o *goverseerr.Overseerr)
- func DeleteOverseerrProfile(profileName string) error
- func EmailValidator(in string) error
- func GetAllOverseerrProfiles() map[string]OverseerrProfile
- func LocaleValidator(l string) error
- func NonEmptyValidator(in string) error
- func URLValidator(u string) error
- func WriteOverseerrProfile(profileName string, profile OverseerrProfile, overwrite bool) error
- type OverseerrAuthConfig
- type OverseerrAuthType
- type OverseerrProfile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddWrappersToOverseerr ¶
func AddWrappersToOverseerr(o *goverseerr.Overseerr)
AddWrappersToOverseerr ensures that all overseerr requests will be logged
func DeleteOverseerrProfile ¶
WriteOverseerrProfile writes a profile to the configuration
func EmailValidator ¶
func GetAllOverseerrProfiles ¶
func GetAllOverseerrProfiles() map[string]OverseerrProfile
GetAllOverseerrProfiles returns all configured overseerr profiles and panics if fails
func LocaleValidator ¶
func NonEmptyValidator ¶
func URLValidator ¶
func WriteOverseerrProfile ¶
func WriteOverseerrProfile(profileName string, profile OverseerrProfile, overwrite bool) error
WriteOverseerrProfile writes a profile to the configuration
Types ¶
type OverseerrAuthConfig ¶
type OverseerrAuthConfig struct { Type OverseerrAuthType `json:"type"` Key string `json:"key,omitempty"` Email string `json:"email,omitempty"` Password string `json:"password,omitempty"` PlexToken string `json:"plexToken,omitempty"` }
OverseerrAuthConfig contains the authorization details for an account
type OverseerrAuthType ¶
type OverseerrAuthType string
const ( OverseerrAuthTypeKey OverseerrAuthType = "key" OverseerrAuthTypeLocal OverseerrAuthType = "local" OverseerrAuthTypePlex OverseerrAuthType = "plex" )
func SelectProfileAuthType ¶
func SelectProfileAuthType() OverseerrAuthType
type OverseerrProfile ¶
type OverseerrProfile struct { URL string `json:"url"` CustomHeaders map[string]string `json:"customHeaders"` Locale string `json:"locale" default:"en"` Auth OverseerrAuthConfig `json:"auth"` }
OverseerrProfile contains all the details to login to an account on Overseerr
func GetOverseerrProfile ¶
func GetOverseerrProfile(profileName string) (OverseerrProfile, error)
GetOverseerrProfile returns a configured overseerr profile if it exists. If not, an error is returned
func (OverseerrProfile) Connect ¶
func (p OverseerrProfile) Connect() (*goverseerr.Overseerr, error)
Connect creates a logged in Overseerr instance from a profile
func (OverseerrProfile) QuickValidate ¶
func (c OverseerrProfile) QuickValidate() error
QuickValidate ensures both the URL and Locale are valid for a profile