diff options
Diffstat (limited to 'pkg/domain/entities/images.go')
-rw-r--r-- | pkg/domain/entities/images.go | 74 |
1 files changed, 54 insertions, 20 deletions
diff --git a/pkg/domain/entities/images.go b/pkg/domain/entities/images.go index 707937a44..19a2c87f5 100644 --- a/pkg/domain/entities/images.go +++ b/pkg/domain/entities/images.go @@ -1,12 +1,12 @@ package entities import ( - "net/url" "time" "github.com/containers/image/v5/manifest" "github.com/containers/image/v5/types" "github.com/containers/libpod/pkg/inspect" + "github.com/containers/libpod/pkg/trust" docker "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/opencontainers/go-digest" @@ -50,7 +50,7 @@ func (i *Image) Id() string { } type ImageSummary struct { - ID string + ID string `json:"Id"` ParentId string `json:",omitempty"` RepoTags []string `json:",omitempty"` Created time.Time `json:",omitempty"` @@ -128,9 +128,10 @@ type ImagePullOptions struct { // CertDir is the path to certificate directories. Ignored for remote // calls. CertDir string - // Credentials for authenticating against the registry in the format - // USERNAME:PASSWORD. - Credentials string + // Username for authenticating against the registry. + Username string + // Password for authenticating against the registry. + Password string // OverrideArch will overwrite the local architecture for image pulls. OverrideArch string // OverrideOS will overwrite the local operating system (OS) for image @@ -141,8 +142,8 @@ type ImagePullOptions struct { Quiet bool // SignaturePolicy to use when pulling. Ignored for remote calls. SignaturePolicy string - // TLSVerify to enable/disable HTTPS and certificate verification. - TLSVerify types.OptionalBool + // SkipTLSVerify to skip HTTPS and certificate verification. + SkipTLSVerify types.OptionalBool } // ImagePullReport is the response from pulling one or more images. @@ -162,9 +163,10 @@ type ImagePushOptions struct { // transport. Default is same compression type as source. Ignored for remote // calls. Compress bool - // Credentials for authenticating against the registry in the format - // USERNAME:PASSWORD. - Credentials string + // Username for authenticating against the registry. + Username string + // Password for authenticating against the registry. + Password string // DigestFile, after copying the image, write the digest of the resulting // image to the file. Ignored for remote calls. DigestFile string @@ -183,8 +185,8 @@ type ImagePushOptions struct { // SignBy adds a signature at the destination using the specified key. // Ignored for remote calls. SignBy string - // TLSVerify to enable/disable HTTPS and certificate verification. - TLSVerify types.OptionalBool + // SkipTLSVerify to skip HTTPS and certificate verification. + SkipTLSVerify types.OptionalBool } // ImageSearchOptions are the arguments for searching images. @@ -198,8 +200,8 @@ type ImageSearchOptions struct { Limit int // NoTrunc will not truncate the output. NoTrunc bool - // TLSVerify to enable/disable HTTPS and certificate verification. - TLSVerify types.OptionalBool + // SkipTLSVerify to skip HTTPS and certificate verification. + SkipTLSVerify types.OptionalBool } // ImageSearchReport is the response from searching images. @@ -218,16 +220,15 @@ type ImageSearchReport struct { Automated string } +// Image List Options type ImageListOptions struct { - All bool `json:"all" schema:"all"` - Filter []string `json:"Filter,omitempty"` - Filters url.Values `json:"filters" schema:"filters"` + All bool `json:"all" schema:"all"` + Filter []string `json:"Filter,omitempty"` } type ImagePruneOptions struct { - All bool `json:"all" schema:"all"` - Filter []string `json:"filter" schema:"filter"` - Filters url.Values `json:"filters" schema:"filters"` + All bool `json:"all" schema:"all"` + Filter []string `json:"filter" schema:"filter"` } type ImagePruneReport struct { @@ -284,3 +285,36 @@ type ImageTreeOptions struct { type ImageTreeReport struct { Tree string // TODO: Refactor move presentation work out of server } + +// ShowTrustOptions are the cli options for showing trust +type ShowTrustOptions struct { + JSON bool + PolicyPath string + Raw bool + RegistryPath string +} + +// ShowTrustReport describes the results of show trust +type ShowTrustReport struct { + Raw []byte + SystemRegistriesDirPath string + JSONOutput []byte + Policies []*trust.TrustPolicy +} + +// SetTrustOptions describes the CLI options for setting trust +type SetTrustOptions struct { + PolicyPath string + PubKeysFile []string + Type string +} + +// SignOptions describes input options for the CLI signing +type SignOptions struct { + Directory string + SignBy string + CertDir string +} + +// SignReport describes the result of signing +type SignReport struct{} |