Files
software-station/internal/models/models.go
Sudo-Ivan 4c60e3cf4a
All checks were successful
renovate / renovate (push) Successful in 2m8s
CI / build (push) Successful in 10m24s
Update asset verification and user experience
- Added SRI hash injection during frontend build to improve security.
- Updated ESLint configuration to include 'navigator' as a global variable.
- Introduced a new `settingsStore` to manage user preferences for asset verification.
- Enhanced `SoftwareCard` and `VerificationModal` components to display contributor information and security checks.
- Updated `verificationStore` to handle expanded toast notifications for detailed verification steps.
- Implemented a new `CodeBlock` component for displaying code snippets with syntax highlighting.
- Improved API documentation and added new endpoints for fetching software and asset details.
2025-12-27 16:29:05 -06:00

55 lines
1.4 KiB
Go

package models
import "time"
type Asset struct {
Name string `json:"name"`
Size int64 `json:"size"`
URL string `json:"url"`
OS string `json:"os"`
SHA256 string `json:"sha256,omitempty"`
IsSBOM bool `json:"is_sbom"`
}
type Contributor struct {
Username string `json:"username"`
AvatarURL string `json:"avatar_url"`
GPGKeys []string `json:"gpg_keys,omitempty"`
}
type SourceSecurity struct {
Domain string `json:"domain"`
TLSValid bool `json:"tls_valid"`
}
type Release struct {
TagName string `json:"tag_name"`
Body string `json:"body,omitempty"`
CreatedAt time.Time `json:"created_at"`
Assets []Asset `json:"assets"`
Contributors []Contributor `json:"contributors,omitempty"`
Security *SourceSecurity `json:"security,omitempty"`
}
type Software struct {
Name string `json:"name"`
Owner string `json:"owner"`
Description string `json:"description"`
Releases []Release `json:"releases"`
GiteaURL string `json:"gitea_url"`
Topics []string `json:"topics"`
License string `json:"license,omitempty"`
IsPrivate bool `json:"is_private"`
AvatarURL string `json:"avatar_url,omitempty"`
}
type FingerprintData struct {
Known bool `json:"known"`
TotalBytes int64 `json:"total_bytes"`
}
type SoftwareResponse struct {
GiteaURL string `json:"gitea_url"`
Software []Software `json:"software"`
}