added struct GpgPublicKey and ProviderPackageResponse
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user