diff options
author | Miloslav Trmač <mitr@redhat.com> | 2022-08-25 01:11:07 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2022-08-25 01:52:59 +0200 |
commit | ad0c785f8e0846112b301872ffc8a7ea276c82a5 (patch) | |
tree | f732731ab962afa15d43643f76f0baa6b047f08c /pkg/trust | |
parent | a7e88c8dacd56d266173d3fa04c66eb1a964b332 (diff) | |
download | podman-ad0c785f8e0846112b301872ffc8a7ea276c82a5.tar.gz podman-ad0c785f8e0846112b301872ffc8a7ea276c82a5.tar.bz2 podman-ad0c785f8e0846112b301872ffc8a7ea276c82a5.zip |
Reorganize the types in policy.go a bit
... to go from top to bottom.
Should not change behavior.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'pkg/trust')
-rw-r--r-- | pkg/trust/policy.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/trust/policy.go b/pkg/trust/policy.go index a41982c13..daa7698b2 100644 --- a/pkg/trust/policy.go +++ b/pkg/trust/policy.go @@ -23,6 +23,12 @@ type policyContent struct { Transports transportsContent `json:"transports,omitempty"` } +// transportsContent contains policies for individual transports (= c/image/v5/signature.Policy.Transports) +type transportsContent map[string]repoMap + +// repoMap maps a scope name to requirements that apply to that scope (= c/image/v5/signature.PolicyTransportScopes) +type repoMap map[string][]repoContent + // repoContent is a single policy requirement (one of possibly several for a scope), representing all of the individual alternatives in a single merged struct // (= c/image/v5/signature.{PolicyRequirement,pr*}) type repoContent struct { @@ -34,12 +40,6 @@ type repoContent struct { SignedIdentity json.RawMessage `json:"signedIdentity,omitempty"` } -// repoMap maps a scope name to requirements that apply to that scope (= c/image/v5/signature.PolicyTransportScopes) -type repoMap map[string][]repoContent - -// transportsContent contains policies for individual transports (= c/image/v5/signature.Policy.Transports) -type transportsContent map[string]repoMap - // DefaultPolicyPath returns a path to the default policy of the system. func DefaultPolicyPath(sys *types.SystemContext) string { systemDefaultPolicyPath := "/etc/containers/policy.json" |