Add initial implementation of *arr service client
- Created `client.go` for the main client structure and methods to interact with *arr services. - Added `types.go` to define data structures for system status, movies, and series. - Implemented `radarr.go` for Radarr-specific client methods including health checks and movie retrieval. - Introduced `interfaces.go` to define service interfaces for common operations across *arr services. - Established a basic `main.go` for application entry point. - Included a tutorial markdown file to guide users through building the client and understanding Go concepts. - Initialized `go.mod` for module management. - Organized code into appropriate packages for better structure and maintainability.
This commit is contained in:
45
types.go
Normal file
45
types.go
Normal file
@@ -0,0 +1,45 @@
|
||||
package main
|
||||
|
||||
import "time"
|
||||
|
||||
type SystemStatus struct {
|
||||
Version string `json:"version"`
|
||||
BuildTime string `json:"buildTime"`
|
||||
IsDebug bool `json:"isDebug"`
|
||||
IsProduction bool `json:"isProduction"`
|
||||
IsAdmin bool `json:"isAdmin"`
|
||||
IsUserInteractive bool `json:"isUserInteractive"`
|
||||
StartupPath string `json:"startupPath"`
|
||||
AppData string `json:"appData"`
|
||||
OsName string `json:"osName"`
|
||||
OSVersion string `json:"osVersion"`
|
||||
}
|
||||
|
||||
type Movie struct {
|
||||
ID int `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Year int `json:"year"`
|
||||
Path string `json:"path"`
|
||||
Monitored bool `json:"monitored"`
|
||||
Added time.Time `json:"added"`
|
||||
QualityProfileID int `json:"qualityProfileId"`
|
||||
ImdbID string `json:"imdbId"`
|
||||
RmdbID int `json:"tmdbId"`
|
||||
}
|
||||
|
||||
type Series struct {
|
||||
ID int `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Year int `json:"year"`
|
||||
Path string `json:"path"`
|
||||
Monitored bool `json:"monitored"`
|
||||
Added time.Time `json:"added"`
|
||||
QualityProfileID int `json:"qualityProfileId"`
|
||||
TvdbID int `json:"tvdbId"`
|
||||
Seasons []Season `json:"seasons"`
|
||||
}
|
||||
|
||||
type Season struct {
|
||||
SeasonNumber int `json:"seasonNumber"`
|
||||
Monitored bool `json:"monitored"`
|
||||
}
|
||||
Reference in New Issue
Block a user