image_optimizer/updater/
github_release.rs

1use serde::Deserialize;
2
3/// GitHub release information from the GitHub API.
4///
5/// This struct represents the JSON response from GitHub's releases API endpoint.
6/// It contains the essential information needed for the self-update process.
7#[derive(Deserialize)]
8pub struct GitHubRelease {
9    /// The git tag name for this release (e.g., "v1.3.0").
10    pub tag_name: String,
11    /// List of downloadable assets (binaries) for this release.
12    pub assets: Vec<GitHubAsset>,
13}
14
15/// A downloadable asset from a GitHub release.
16///
17/// This struct represents individual files attached to a GitHub release,
18/// typically containing compiled binaries for different platforms.
19#[derive(Deserialize)]
20pub struct GitHubAsset {
21    /// The filename of the asset (e.g., "image-optimizer-x86_64-apple-darwin").
22    pub name: String,
23    /// Direct download URL for the asset.
24    pub browser_download_url: String,
25}