Documentation
¶
Overview ¶
Package updater provides functionality to check for and apply updates.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHubRelease ¶
type GitHubRelease struct {
TagName string `json:"tag_name"`
Name string `json:"name"`
Body string `json:"body"`
HTMLURL string `json:"html_url"`
PublishedAt time.Time `json:"published_at"`
Prerelease bool `json:"prerelease"`
Draft bool `json:"draft"`
}
GitHubRelease represents a GitHub release from the API.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles version checking and updates.
func NewService ¶
NewService creates a new updater service.
func (*Service) ApplyUpdate ¶
ApplyUpdate performs the update by pulling new container images and restarting services. This is designed to work in containerized deployments using Podman/Docker Compose.
func (*Service) CheckForUpdates ¶
func (s *Service) CheckForUpdates(ctx context.Context) (*UpdateInfo, error)
CheckForUpdates queries GitHub for the latest release and compares with current version.
type UpdateInfo ¶
type UpdateInfo struct {
CurrentVersion string `json:"current_version"`
LatestVersion string `json:"latest_version"`
UpdateAvailable bool `json:"update_available"`
ReleaseURL string `json:"release_url,omitempty"`
ReleaseNotes string `json:"release_notes,omitempty"`
PublishedAt string `json:"published_at,omitempty"`
}
UpdateInfo contains information about available updates.
Click to show internal directories.
Click to hide internal directories.