added struct GpgPublicKey and ProviderPackageResponse

This commit is contained in:
henk
2026-05-14 12:57:51 +02:00
parent a94a3f187c
commit e0800a6a6b

View File

@@ -58,6 +58,7 @@ type ProviderPlatform struct {
Arch ProviderPlatformArch
}
// MarshalJSON implementeert json.Marshaler interface
func (p ProviderPlatform) MarshalJSON() ([]byte, error) {
return json.Marshal(struct {
Os string `json:"os"`
@@ -68,6 +69,7 @@ func (p ProviderPlatform) MarshalJSON() ([]byte, error) {
})
}
// UnmarshalJSON implementeert json.Unmarshaler interface
func (p *ProviderPlatform) UnmarshalJSON(data []byte) error {
var temp struct {
Os string `json:"os"`
@@ -95,3 +97,27 @@ type ProviderVersion struct {
Protocols []string `json:"protocols"`
Platforms []ProviderPlatform `json:"platforms"`
}
type ProviderVersions struct {
Versions []ProviderVersion `json:"versions"`
}
type GpgPublicKey struct {
KeyId string `json:"key_id"`
AsciiArmor string `json:"ascii_armor"`
TrustSignature string `json:"trust_signature"`
Source string `json:"source"`
SourceUrl string `json:"source_url"`
}
type ProviderPackageResponse struct {
Protocols []string `json:"protocols"`
Os string `json:"os"`
Arch string `json:"arch"`
Filename string `json:"filename"`
DownloadUrl string `json:"download_url"`
ShasumsUrl string `json:"shasums_url"`
ShasumsSignatureUrl string `json:"shasums_signature_url"`
Shasum string `json:"shasum"`
SigningKeys map[string][]GpgPublicKey `json:"signing_keys"`
}