Cleanup display of trust with transports

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2022-02-16 06:44:45 -05:00
parent d3903a8591
commit 6f7a803d06
8 changed files with 197 additions and 44 deletions

View File

@ -2,11 +2,11 @@ package trust
// Policy describes a basic trust policy configuration
type Policy struct {
Name string `json:"name"`
Transport string `json:"transport"`
Name string `json:"name,omitempty"`
RepoName string `json:"repo_name,omitempty"`
Keys []string `json:"keys,omitempty"`
SignatureStore string `json:"sigstore"`
Transport string `json:"transport"`
SignatureStore string `json:"sigstore,omitempty"`
Type string `json:"type"`
GPGId string `json:"gpg_id,omitempty"`
}

View File

@ -21,7 +21,7 @@ import (
// PolicyContent struct for policy.json file
type PolicyContent struct {
Default []RepoContent `json:"default"`
Transports TransportsContent `json:"transports"`
Transports TransportsContent `json:"transports,omitempty"`
}
// RepoContent struct used under each repo